[Nagiosplug-devel] Error when executing check_ifoperstatus plugin

Gavin Carr gavin at openfusion.com.au
Wed Mar 14 23:42:04 CET 2007


Hi Santhosh,

On Wed, Mar 14, 2007 at 06:33:26PM +0530, Santhosh Injineri wrote:
> Hi - I am new to nagios so thanks in advance for any assistance, we have
> been haing real problems with this.
> 
> when i execute the command ./check_ifoperstatus -k 22 -H localhost i am
> getting out put as
> 
> OUTPUT: Can't locate object method "session" via package "Net::SNMP"
> (perhaps you forgot to load "Net::SNMP"?) at ./check_ifoperstatus line 443.
> 
> where Line No 443 is
> 
>   442          if ( $snmp_version =~ /[12]/ ) {
>   443          ($session, $error) = Net::SNMP->session(
>   444                          -hostname  => $hostname,
>   445                          -community => $community,
>   446                          -port      => $port,
>   447                          -version        => $snmp_version,
>   448                          -maxmsgsize => $maxmsgsize
>   449                  );
>   450
> 
> Can any one please assist me how to come resolve this problem and please
> tell me if any set up is needed for Net::SNMP????

Is that the first error you get? It looks like there's a problem with your
Net::SNMP, but I'd have expected it to blow up on the 'use Net::SNMP' line
earlier.

What does the following give you?

  perl -MNet::SNMP -e 'printf "%vd\n", $Net::SNMP::VERSION'


Cheers,
Gavin





More information about the Devel mailing list