Page 1 of 1
monitor Cisco CPU utilisation with SNMP
Posted: Thu Feb 26, 2015 3:09 am
by ramil85
i've activated SNMP protocol on cisco switch. And from cisco site i found object id for cpu:
http://www.cisco.com/c/en/us/support/do ... -snmp.html
from my linux i can receive below results
Code: Select all
ramil@HP:~$ snmpwalk -v2c -c public 172.16.110.1 .1.3.6.1.4.1.9.9.109.1.1.1.1.5
SNMPv2-SMI::enterprises.9.9.109.1.1.1.1.5.1 = Gauge32: 0
but when i try to monitor it from nagios 3.x web
with configurations in /etc/nagios/objects/switch.cfg
Code: Select all
define service{
use generic-service
host_name switch1
service_description 5 min CPU Average
check_command check_snmp!-C public -o .1.3.6.1.4.1.9.9.109.1.1.1.1.5
}
i cant see anything on web interface.
Could you help me with this configuration?!
Thanks in advance.
Re: monitor Cisco CPU utilisation with SNMP
Posted: Thu Feb 26, 2015 9:53 am
by jdalrymple
When you say
i cant see anything on web interface.
Do you mean you can't see the service showing up at all, or do you mean that the service shows up but there is no data returning from the service check?
If the former, have you reloaded the Nagios config?
If the latter, can you post the results you do get back? There should be an error included.
Re: monitor Cisco CPU utilisation with SNMP
Posted: Fri Feb 27, 2015 3:00 am
by ramil85
jdalrymple wrote:
Do you mean you can't see the service showing up at all, or do you mean that the service shows up but there is no data returning from the service check?
i mean it shows up but there is no data returning from the service check.
jdalrymple wrote:
If the former, have you reloaded the Nagios config?
i restart it
jdalrymple wrote:
If the latter, can you post the results you do get back? There should be an error included.
yes
Code: Select all
External command error. Timeout: No Response from 172.16.110.1:161
but this switch is available. PING on web interface is green.
Re: monitor Cisco CPU utilisation with SNMP
Posted: Fri Feb 27, 2015 10:20 am
by jdalrymple
Looks good,
I guess to troubleshoot it further we should make sure it runs properly when executed from the command line using the check_snmp plugin instead of snmpwalk:
Code: Select all
/usr/lib64/nagios/plugins/check_snmp -H 172.16.110.1 -C public -o .1.3.6.1.4.1.9.9.109.1.1.1.1.5
If that doesn't work let's throw the version in:
Code: Select all
/usr/lib64/nagios/plugins/check_snmp -H 172.16.110.1 -C public -P 2c -o .1.3.6.1.4.1.9.9.109.1.1.1.1.5
For reference it looks like you have a yum package of Nagios so I adjusted the plugins path using best guess, check_snmp may actually be located somewhere besides where I specified.
Let us know if that helps.
Re: monitor Cisco CPU utilisation with SNMP
Posted: Mon Mar 02, 2015 1:48 am
by ramil85
jdalrymple wrote:
I guess to troubleshoot it further we should make sure it runs properly when executed from the command line using the check_snmp plugin instead of snmpwalk:
Code: Select all
/usr/lib64/nagios/plugins/check_snmp -H 172.16.110.1 -C public -o .1.3.6.1.4.1.9.9.109.1.1.1.1.5
this command return:
Code: Select all
External command error: Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
jdalrymple wrote:
Code: Select all
/usr/lib64/nagios/plugins/check_snmp -H 172.16.110.1 -C public -P 2c -o .1.3.6.1.4.1.9.9.109.1.1.1.1.5
this command return:
Code: Select all
SNMP OK - = No Such Instatnce currently exists at this OID
Re: monitor Cisco CPU utilisation with SNMP
Posted: Mon Mar 02, 2015 10:30 am
by jdalrymple
OOoops, sorry I didn't tranaslate the walk output to a proper get. Change your service definition to the following - note the additional ".1" at the end of check_command. I bet that fixes it.
Code: Select all
define service{
use generic-service
host_name switch1
service_description 5 min CPU Average
check_command check_snmp!-C public -o .1.3.6.1.4.1.9.9.109.1.1.1.1.5.1
}
Re: monitor Cisco CPU utilisation with SNMP
Posted: Tue Mar 03, 2015 8:23 am
by ramil85
Thanks.
it works now.