i had this dumb issue today.
The plugin check_iostat returned wrong perfdata. check_multi discards perfdata that is not returned like its defined in the nagios developer guidelines so i wasnt able to get perfdata from my check_iostat checks within a check_multi Service.
So i just 'patched' (is it possible to "patch" shell scripts? - dont think so ;-) ) the plugins.
I Just replaced the last lines where the performance data is returned with my own ones which do replace all 'comma' with 'dots'. It is looking like this:
UPDATE: I recognized that the whole perfdata output wrong, not even the issue with the commata there was even an issue with the order of the returned values, here is how it is working for me:
# Perfdata support
#${ECHO} "$msg|ioread=${ioread}c;${CRITICALREAD};${WARNINGREAD};0;iowrite=${iowrite}c;${CRITICALWRITE};${WARNINGWRITE};0; \n"
MYPERF="$msg|ioread=${ioread}kByte/s;${WARNINGREAD};${CRITICALREAD};0;0;iowrite=${iowrite}kByte/s;${CRITICALWRITE};${WARNINGWRITE};0;"
MYPERF=`echo "$MYPERF" | sed 's/\(,\)\([0-9]*\)/\.\2/g'`
echo $MYPERF
exit ${exitstatus}
Hope this helps somebody.
bohboh,
kratediggah
Wednesday, September 3, 2008
Monday, September 1, 2008
Nagios Check Fails: Can't locate utils.pm in @INC (@INC
i had this issue today several times. It is caused because a particular plugin isn't able to locate the utils.pm file. In my case this was caused by a wrong defined lib include path in following plugins:
check_generic, check_snmp_int, check_multi, check_file_age
It's pretty easy to fix it, just change:
use lib "/usr/local/nagios/libexec" ;
to
use lib "/usr/lib/nagios/plugins" ;
and everything will be fine.
bohboh,
kratediggah
check_generic, check_snmp_int, check_multi, check_file_age
It's pretty easy to fix it, just change:
use lib "/usr/local/nagios/libexec" ;
to
use lib "/usr/lib/nagios/plugins" ;
and everything will be fine.
bohboh,
kratediggah
Subscribe to:
Posts (Atom)