Nagios plug-in check_snmp receives NO SNMP data from a CISCO Router
Solution 1
Add the version to the check_snmp
command
Solution 2
Maybe the MIBS for your Cisco Switches aren't loaded.
What happens if you do:
sudo /usr/local/nagios/libexec/check_snmp -H 192.168.1.1 -C Routers -o 1.3.6.1.2.1.1.5.0
instead of sysUpTime.0
?
If that works, then it is the MIBs - see net-snmp wiki for a tutorial on how to install and use MIBS. Otherwise check your syntax as pointed out by Mike Weber
Related videos on Youtube
Shehryar
Updated on September 18, 2022Comments
-
Shehryar over 1 year
I have tried setting up Nagios on Ubuntu 10.10, successfully installed and can login to web interface, I am however stuck on configuring snmp or I am doing something wrong here, i have followed various sites / nagios wiki to setup configuration (cfg) files.
When I check on the web interface, it gives the following error on one of my cisco router:
Current Status: UNKNOWN (for 0d 2h 55m 56s) Status Information:
SNMP problem - No data received from host CMD: /usr/bin/snmpget -t 1 -r 5 -m RFC1213-MIB -v 1 [authpriv] 192.168.1.1:161
ifOperStatus.1On the command-line itself, when I type the following, it just sits there waiting and waiting :
sudo /usr/local/nagios/libexec/check_snmp -H 192.168.1.1 -C Routers -o sysUpTime.0
When I type the following command : I get an OK
/usr/bin/snmpget -v1 192.168.1.1:161 1.3.6.1.2.1.1.5.0 -c "Routers"
I have configured SNMP properly on our cisco device as we can collect SNMP Data via two other monitoring tool (SolarWinds and Manage Engine), we are tempted towards Nagios as its opensource.
Will be grateful if someone could assist in rectifying this situation and guide me with setting up nagios to monitor Cisco Routers, Switches and a Few Servers.
We want to monitor Bandwidth, cpu utilization, uptime and other necessary counters.
-
Greg Petersen over 12 yearsPlease post the
check_snmp
command definition? Did you take a look at the Nagios log? -
Shehryar over 12 yearsHi Quanta, I will get the requested information by tomorrow, also excuse me for sounding a complete dumbo - but where and how can I get the check_snmp definition ? This is my first time with Nagios.- Thanks
-
-
Shehryar over 12 yearsDo i get the version from the nagios-plugins ? or if you could please tell me as to how can I check the version, that would be helpful.-Thanks
-
Shehryar over 12 yearsThanks dunxd, will post requested information tomorrow - thanks for your input, please keep an eye on this, I need to get this up and running, I want to learn and use Nagios :-)
-
dunxd over 12 yearsIt's the version of SNMP in use on the equipment you are monitoring. You specific -v1 in your
snmpget
command. Run the check_snmp command without any flags to get the syntax. Mine uses-P
to declare the SNMP version to use. It's an optional variable. I think the default would be 2c, so if your equipment only uses version 1 you would need to declare it when invokingcheck_snmp