[Nagiosplug-devel] [Nagios-devel] check_ifstatus.pl and check_ifoperstatus.pl
Russell Scibetti
russell at fcfcn.org
Mon Dec 23 12:27:02 CET 2002
I have found a definite bug in check_ifstatus.pl from Nagiosplug 1.3b2.
There is a closing curly brace missing to end the
foreach $key (keys %ifStatus) {
loop that starts at line 185. This is a definite problem that's easy to
fix.
There is also a potential other problem with this and the
check_ifoperstatus.pl plugin. Both have the line "use POSIX;" in the
plugin. However, with this line in, I get this error:
PROMPT:/usr/local/nagios/infra/libexec> ./check_ifoperstatus
Prototype mismatch: sub main::NULL vs () at
/usr/lib/perl5/5.6.0/Exporter.pm line 57.
Exporter::import('INTEGER', 'INTEGER32', 'OCTET_STRING', 'NULL',
'OBJECT_IDENTIFIER', 'IPADDRESS', 'COUNTER', 'COUNTER32', ...) called at
./check_ifoperstatus line 40
main::BEGIN() called at
/usr/lib/perl5/site_perl/5.6.0/Net/SNMP.pm line 40
require 0 called at /usr/lib/perl5/site_perl/5.6.0/Net/SNMP.pm
line 4
When I comment out that line (and fix the missing curly brace), both
plugins work fine. So, my question is, what is the use POSIX line
supposed to be doing, and is it necessary?
I have included a context diff patch that adds the curly brace and
comments out the use POSIX line in check_ifstatus.pl. Thanks.
-Russell Scibetti
--
Russell Scibetti
Quadrix Solutions, Inc.
http://www.quadrix.com
(732) 235-2335, ext. 7038
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Nagios-devel mailing list
Nagios-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-devel
More information about the Devel
mailing list