You are using a Nagios plugin in MRTG. While some Nagios plugins have an 'MRTG Mode', it seems that this one doesn't (or if it does, you've not enabled it).
A Nagios plugin should output one line of text, with a message followed by '|' and the perfstats data as var=value sets. It then exits with a status of 0,1,2 or 3 depending on the tests. An MRTG plugin should output 4 lines of text; two with numbers and then two more optionally holding uptime and system name (though these can be left blank). It should always exit with status 0. In order to make this work with MRTG, you'll need to modify the plugin to output MRTG status, or use a wrapper script like this: # check_nwstat_mrtg perfstat=`/usr/lib/nagios/plugins/check_nwstat $* | cut -f2 -d '|'` val=`echo "$perfstat"|sed 's/^.*=//'|sed 's/;.*//'` echo $val echo $val echo '' echo "$perfstat" exit 0 Steve Steve Shipway University of Auckland ITS UNIX Systems Design Lead [email protected] Ph: +64 9 373 7599 ext 86487 ________________________________________ From: [email protected] [[email protected]] on behalf of PeteH [[email protected]] ... Target[VCH-NA1.SYS]: `/usr/lib/nagios/plugins/check_nwstat 10.5.1.9 -v VKFSYS | cut -f2 -d =` ... nagios1:/etc/init.d # /usr/lib/nagios/plugins/check_nwstat 10.5.1.9 -v VKFSYS 1126912 KB free on volume SYS|KBFreeSYS=1126912;0;0;; nagios1:/etc/init.d # /usr/lib/nagios/plugins/check_nwstat 10.5.1.9 -v VKFSYS | cut -f2 -d = 1126912;0;0;; _______________________________________________ mrtg mailing list [email protected] https://lists.oetiker.ch/cgi-bin/listinfo/mrtg
