check_snmp CPU with Cisco Switch

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.
Locked
sartecat
Posts: 33
Joined: Tue Jun 20, 2017 1:11 pm

check_snmp CPU with Cisco Switch

Post by sartecat »

So I downloaded CISCO-SMI.my and CISCO-ENVMON-MIB.my into my /usr/share/snmp/mibs directory.

When I do an snmpwalk, it returns a value of Gauge32: 23

[root@nagios-server-model libexec]# snmpwalk -v2c -c maunakea 172.16.0.4 .1.3.6.1.4.1.9.9.109.1.1.1.1.7SNMPv2-SMI::enterprises.9.9.109.1.1.1.1.7.1 = Gauge32: 23

But when I use the ./check_snmp, it says SNMP is OK but no such instance exists.

[root@nagios-server-model libexec]# ./check_snmp -P 2c -C maunakea 172.16.0.4 -o 1.3.6.1.4.1.9.9.109.1.1.1.1.7
SNMP OK - No Such Instance currently exists at this OID |

I looked it up and said that I need to run snmpwalk for the tree. So I did smpwalk -v2c -c maunakea 172.16.0.4 .1.3.6.1.4.1.9.9 and rerun the commands, but it still gave me the same response.

How do I go about fixing this?
Last edited by sartecat on Fri Jul 07, 2017 3:34 pm, edited 1 time in total.
User avatar
tacolover101
Posts: 432
Joined: Mon Apr 10, 2017 11:55 am

Re: check_snmp CPU with Cisco Switch

Post by tacolover101 »

it looks like you forgot .1 at the end of your check_snmp command.
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: check_snmp CPU with Cisco Switch

Post by tgriep »

It looks like you forgot to specify the -H in the command for the hostaddress. Try this to see if it works.

Code: Select all

./check_snmp -P 2c -C maunakea -H 172.16.0.4 -o 1.3.6.1.4.1.9.9.109.1.1.1.1.7
Be sure to check out our Knowledgebase for helpful articles and solutions!
sartecat
Posts: 33
Joined: Tue Jun 20, 2017 1:11 pm

Re: check_snmp CPU with Cisco Switch

Post by sartecat »

That works! Thank you!
Locked