Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
I am trying to load a custom mib and display the custom mib info on the nagios web console. I:
1) Copied the custom mibs to /usr/share/snmp/mibs
2) Installed the nagios plugins using the quickstart guide that installed check_snmp as well
3) Uncommented the cfg_file=/usr/local/nagios/etc/objects/switch.cfg line in /usr/local/nagios/etc/nagios.cfg
4) Edited the switch.cfg file in /usr/local/nagios/etc/objects/ as follows:
a) Edited the hosts obejct
b) Edited the hostgroup object
c) Edited the service definition with the check_name as follows:
check_command check_snmp!-P 2c -C public -o .1.3.6.1.4.1.24659.10.0 -m all
after verifying nagios for errors and restarting nagios services, I see the following on the web console: Img attached..
Separately running check_snmp results in an error:
./check_snmp -P 2c -C public -m ALL -H 10.10.86.204 -o .1.3.6.1.4.1.24659.10.0
SNMP OK - = No Such Instance currently exists at this OID |
In this case it sounds very much like the device you're querying doesn't support the particular OID you're asking for. The community string is correct, else the check would have timed out.
What happens if you hit the device in question with a directed query for that OID? If you walk (or bulkwalk) the device, do you see the OID in that listing?
I realized that check_snmp can only query a single oid instance. The oid I was providing previously was the parent oid for the entire mib. Once I queried the a particular oid instance, the information was returned correctly.
./check_snmp -P 2c -C public -m ALL -H 10.10.86.204 -o .1.3.6.1.4.1.24659.10.1.2
Is there a way to walk the entire mib with check_snmp?
muffadalq wrote:Is there a way to walk the entire mib with check_snmp?
Not easily, nor would one want to.
For a check to be useful it needs to check one datum (if it's a simple check) to compare to the threshold data; if you're custom-writing an SNMP check then you can query for multiple OIDs and then make decisions in the plugin based on the return vaules.