From: Cook, G. <GW...@ma...> - 2004-06-16 15:37:26
|
per...@li... wrote: > The check_ifstatus patch seems to output Performance Data incorrectly. > I've patched it and included the patch below. For future reference, > please let me know if I should submit this somewhere on sf.net, or if > sending to the list is ok. Thanks. >=20 > *** check_ifstatus.orig 2004-06-16 08:11:54.000000000 -0600 > --- check_ifstatus 2004-06-16 08:12:31.000000000 -0600 > *************** > *** 207,213 **** > $ifexclude, > $ifunused); > } > ! my $perfdata =3D > sprintf("up:%d,down:%d,dormant:%d,excluded:%d,unused:%d",$ifup > ,$ifdown,$ ifdormant,$ifexclude,$ifunused); > print ("$state: $answer |$perfdata\n"); > exit $ERRORS{$state}; >=20 > --- 207,213 ---- > $ifexclude, > $ifunused); > } > ! my $perfdata =3D > = sprintf("up=3D%d,down=3D%d,dormant=3D%d,excluded=3D%d,unused=3D%d",$ifup > ,$ifdown,$ ifdormant,$ifexclude,$ifunused); > print ("$state: $answer |$perfdata\n"); > exit $ERRORS{$state}; =20 Looks like I was somewhat overzealous, and did not do enough testing. While the patch above does allow Nagios to process the performance data from the check_ifstatus plugin, the $PERFDATA output is still not formatted correctly. I'll look at it again when I have some more time, although I'm going to have to study up on the output method first, so it may take me a while. Garry W. Cook, CCNA Network Infrastructure Manager MACTEC, Inc. - http://www.mactec.com/ 303.308.6228 (Office) - 720.220.1862 (Mobile) |