Currently I have Nagios monitoring our linux servers and sending out e-mail notifications as well as paging. I’m trying to get some information from our Cisco routers to work within Nagios and am at a loss.
I have MRTG set up on another host that uses SNMP to gather the information from our Cisco devices. But as you know, MRTG just graphs the data for historical purposes and not for alerts. I’ve read the Nagios docs on SNMP traps. Kinda confused about what that’s telling me to do.
My understanding is that Nagios can monitor any script that’s created to query a device/service. So this would mean that I would need to have a script that can walk the oid(s) I want to look at, evaluate the data they return, print out an appropriate message, then exit accordingly.
Sounds simple enough but it’s not working. From the Nagios host, I issue the ./check_snmp command followed by the host I want to query, the community string for that host, the OID, followed by the warning and critical ranges. I get an error message that there is “NO DATA RECEIVED FROM HOST”. Here is the command that I used to query a cisco router:
/.check_snmp -H (IP) -o (OID) -w (#:#) -c (#:#)
NO DATA RECEIVED FROM HOST
Not sure why I am getting this message. I do know that on my MRTG host I can issue the snmpwalk and snmpget commands to gather data. I do NOT have those binaries on my Nagios host. I DO have the NET-SNMP package installed which ‘should have’ those tools.
Anyway, if anyone could help, it would be greatly appreciated or atleast point me to the documentation that could help. Thank in advance.