check_snmp returning status Unknown "No OIDs specified"
Posted: Tue Nov 23, 2010 10:40 am
I have just installed Nagios on Ubuntu server 10.04 LTS using the quickstart instructions. All the localhost checks are working. I am trying to add monitoring for a cisco switch. The ping check is working, but when I try to monitor a port or system uptime I get a service status of Unknown and status information of "No OIDs specified".
here is the service configuration
define service{
use generic-service
host_name myswitch
service_description PortCheck
check_command check_snmp!-C xxx -o 1.3.6.1.2.1.2.2.1.8.1 -r 1 -m RFC1213-MIB
}
When I run check_snmp from command line it returns properly
/usr/local/nagios/libexec/check_snmp -H 172.22.2.10 -C xxx -o 1.3.6.1.2.1.2.2.1.8.1 -r 1 -m RFC1213-MIB
SNMP OK - 2 | RFC1213-MIB::ifOperStatus.1=2
It is returning a value of 2 meaning the port is down which is what is expected, but when you view the service from the web interface it shows as status Unknown.
I have the following snmp packages installed on the server:
i libnet-snmp-perl - Script SNMP connections
i A libsnmp-base - SNMP (Simple Network Management Protocol)
i libsnmp-dev - SNMP (Simple Network Management Protocol)
i libsnmp-info-perl - Object Oriented Perl5 Interface to Network
i libsnmp-mib-compiler-perl - a MIB Compiler supporting SMIv1 and SMIv2
i libsnmp-multi-perl - Perform SNMP operations on multiple hosts
i libsnmp-perl - SNMP (Simple Network Management Protocol)
i libsnmp-session-perl - Perl support for accessing SNMP-aware devi
i A libsnmp15 - SNMP (Simple Network Management Protocol)
i snmp - SNMP (Simple Network Management Protocol)
i snmpd - SNMP (Simple Network Management Protocol)
Strangely I get the same result in the web interface even if I put the wrong community string into the service configuration whereas the command line reports back an error like:
External command error: Timeout: No Response from 172.22.2.10:161.
Again, as expected.
Not seeing anything in syslog. What am I missing?
here is the service configuration
define service{
use generic-service
host_name myswitch
service_description PortCheck
check_command check_snmp!-C xxx -o 1.3.6.1.2.1.2.2.1.8.1 -r 1 -m RFC1213-MIB
}
When I run check_snmp from command line it returns properly
/usr/local/nagios/libexec/check_snmp -H 172.22.2.10 -C xxx -o 1.3.6.1.2.1.2.2.1.8.1 -r 1 -m RFC1213-MIB
SNMP OK - 2 | RFC1213-MIB::ifOperStatus.1=2
It is returning a value of 2 meaning the port is down which is what is expected, but when you view the service from the web interface it shows as status Unknown.
I have the following snmp packages installed on the server:
i libnet-snmp-perl - Script SNMP connections
i A libsnmp-base - SNMP (Simple Network Management Protocol)
i libsnmp-dev - SNMP (Simple Network Management Protocol)
i libsnmp-info-perl - Object Oriented Perl5 Interface to Network
i libsnmp-mib-compiler-perl - a MIB Compiler supporting SMIv1 and SMIv2
i libsnmp-multi-perl - Perform SNMP operations on multiple hosts
i libsnmp-perl - SNMP (Simple Network Management Protocol)
i libsnmp-session-perl - Perl support for accessing SNMP-aware devi
i A libsnmp15 - SNMP (Simple Network Management Protocol)
i snmp - SNMP (Simple Network Management Protocol)
i snmpd - SNMP (Simple Network Management Protocol)
Strangely I get the same result in the web interface even if I put the wrong community string into the service configuration whereas the command line reports back an error like:
External command error: Timeout: No Response from 172.22.2.10:161.
Again, as expected.
Not seeing anything in syslog. What am I missing?