[Nagiosplug-devel] RE: [Perfparse-users] Check_ifstatus patch

Cook, Garry GWCOOK at mactec.com
Wed Jun 16 08:38:04 CEST 2004


perfparse-users-admin at lists.sourceforge.net 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.
> 
> *** 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 =
> sprintf("up:%d,down:%d,dormant:%d,excluded:%d,unused:%d",$ifup
> ,$ifdown,$ ifdormant,$ifexclude,$ifunused);
>   print ("$state: $answer |$perfdata\n");
>   exit $ERRORS{$state};
> 
> --- 207,213 ----
>                         $ifexclude,
>                         $ifunused);
>      }
> ! my $perfdata =
> sprintf("up=%d,down=%d,dormant=%d,excluded=%d,unused=%d",$ifup
> ,$ifdown,$ ifdormant,$ifexclude,$ifunused);
>   print ("$state: $answer |$perfdata\n");
>   exit $ERRORS{$state};
 
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)




More information about the Devel mailing list