2 BUGS? Nagios cuts off perfomance data and ignore process_perf_data

Andrew Voronin av at co.ru
Tue Feb 17 16:03:27 CET 2004


I have nagios 1.2 installed (from ports) in FreeBSD environment. It 
works excellent, except one little thing. I have a lot of self-made perl 
scripts, that checks out cisco routers, and almost all of them provide 
perfomance data, like this one:

 >check_cisco_mem -H x.x.x.x -C xxxxx -w 80,80,80,80 -c 90,90,90,90 -W 
15,15,15,15 -O 10,10,10,10
I/O-2 mem usage: 5 MB of 8 MB [67%], L. block in I/O-2 pool: 2 MB [29%]; 
Processor mem usage: 26 MB of 87 MB [30%], L. block in Processor pool: 
53 MB [61%]; I/O mem usage: 0 MB of 32 MB [2%], L. block in I/O pool: 31 
MB [97%]; |IO-2_mem_free=32.93 IO-2_mem_block=29.80 
Processor_mem_free=69.70 Processor_mem_block=61.45 IO_mem_free=97.56 
IO_mem_block=97.06

So, i have "process_performance_data=1" in nagios.cfg, and 
"process_perf_data 1" in template for some hosts. Also:

define command{ 

	command_name    process-service-perfdata
	command_line    PD="$PERFDATA$" H=$HOSTNAME$ 
/usr/local/var/nagios/collect>> 
/usr/local/var/nagios/service-perfdata.out 2>&1
}

and collect:

#!/bin/bash
umask g+rw
if [ -n "$PD" ]; then echo "$H $PD"; fi


And finally, i have result in service-perfdata.out (formatted):

msk-myt3-col1 Processor_mem_free=86.91 Processor_mem_block=84.90 
IO_mem_free=91.11 IO_mem_block=91.11 PCI_mem_free=85.25 PCI_mem_block=85.25

msk-myt3-pe2 Processor_mem_free=67.83 Processor_mem_block=66.22 
IO_mem_free=75.90 IO_mem_block=75.78

msk-myt3-gw2 IO-2_mem_free=34.50 IO-2_mem_block=30.59 
Processor_mem_free=69.73 Processor_mem_block=61.45 IO_mem_free=97.56 
IO_mem_block

msk-myt3-oam-gw Processor_mem_free=87.05 Processor_mem_block=85.34 
IO_mem_free=53.91 IO_mem_block=53.91

msk-mgu-pe1 IO-2_mem_free=89.34 IO-2_mem_block=89.34 
Processor_mem_free=83.85 Processor_mem_block=69.78 IO_mem_free=98.60 
IO_mem_b


Here a promlem! Look carefully at "msk-myt3-gw2" or "msk-mgu-pe1" 
record. After "IO_mem_block" should be "=<digits>.<digits>", but nagios 
cut it off randomly! Why?! You can see here, is not most long string, so 
too many symbols in output - its not a problem!

So another problem is: nagios ignore "process_perf_data" in template. So 
i can enable perf data by "process_performance_data", and it doesnt 
matter, process_perf_data is 0 or 1 for service, perf data will be 
collected.

-- 
Andrew Voronin
MultiService Network group
Data Transmission Department, JSC Combellga
(+7-095) 9319950 (#1824)


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list