check_snmp_cisco_ifstatus - Error message

I receive the following error message when I run the following command.

./check_snmp_cisco_ifstatus -H ipaddress -c community

Can’t locate object method “session” via package “Net::SNMP” (perhaps you forgot to load “Net::SNMP”?) at ./check_snmp_cisco_ifstatus line 124.

did you install the snmpd package on your monitoring server? it is required for check_snmp to work…

Luca

Are you referring to the snmpd daemon? It comes installed with FC4 as far as I know. I made sure it was in startup for run level three and it is running.

According to the REQUIREMENTS file with the plugins,
check_snmp:
- Requires the NET-SNMP package available from
net-snmp.sourceforge.net
or try this:
perl -MCPAN -e ‘install Net::SNMP’

Net::SNMP is not the same as net-snmp as per net-snmp.org's documentation.

As for Net-SNMP is was installed via apt-get I believe. I wasnt the one who installed it, but that’s what I was told.

I may reinstall NET-SNMP.

Also we are not using check_snmp, but the cisco plugin from nagiosexchange.org. check_snmp works just fine.

[quote=“Adrnalnrsh”]I receive the following error message when I run the following command.

./check_snmp_cisco_ifstatus -H ipaddress -c community

Can’t locate object method “session” via package “Net::SNMP” (perhaps you forgot to load “Net::SNMP”?) at ./check_snmp_cisco_ifstatus line 124.[/quote]

According to your report, the plugin is complaining that you don’t have the perl module Net::SNMP. I do realize it’s not the same thing as net-snmp. I’m only suggesting that since your error is complaining about the perl module, that parhaps, you should install the perl module. But if you wish to reinstall net-snmp, then by all means…

It says its already installed.

k, how about a link so I can download that plugin and try it.

downloads.altinity.com/nagios-pl … nmp.tar.gz

Net::SNMP is required for your plugin and it works just fine on my machine. Of course, I have the Net::SNMP perl module installed.
i came across a script that shows you what modules you have installed.
I named it perlmodules.sh

Put this in a file and execute the file. Of course, give the file execute permission.

#!/usr/bin/perl

use ExtUtils::Installed;
my $instmod = ExtUtils::Installed->new();
foreach my $module ($instmod->modules()) {
my $version = $instmod->version($module) || “???”;
print “$module – $version\n”;
}

Thanks, I ran the script and here’s what came back.

Crypt::DES – 2.05
Net::SNMP –
Perl – 5.8.6

If you copy/pasted just as I posted the script, you will notice that it shows perl in /usr/bin/perl.
Perhaps you have more than one perl installed.
which perl
shows what? On mine it shows /usr/bin/perl

But, I looked inside your perl script, and I don’t see that it does anything more/less than the check_snmp script that you already have. I’d try that, before I’d spend anymore time with this one.