Page 1 of 2

check_snmp uptime no longer working

Posted: Mon Jul 08, 2013 9:04 am
by WillemDH
This morning, we got several service check timeouts for several network devices. Seems the check_smp, with command $USER1$/check_snmp -H $HOSTADDRESS$ $ARG1$ and $ARG1$ = -o sysUpTime.0 -C nagios -P 2c stopped working.

When trying from command line the check command does'nt work either.
When trying to access the network devices with a mib browser, I can clearly see the uptime oid.

Anyone got an idea what might be going on?

Also it seems the CCM page sometimes won't load. There is only a white screen. The only thing that helps is a service httpd restart, but after some time it's broken again..

I just did some testing and I think these two problems are related. When I do a httpd restart, then test the uptime for a network device, the CCM stops working.. :(

Re: check_snmp uptime no longer working

Posted: Mon Jul 08, 2013 10:02 am
by WillemDH
Ok, I think I must have messed up my mib files or snmptt or something, although the only thing I did was adding two mib files that don't have anything to do with these network devices..

it seems when I replace sysUpTime.0 with the actual oid of sysUpTime.0, it works...

COMMAND: /usr/local/nagios/libexec/check_snmp -H 10.54.20.33 -o .1.3.6.1.2.1.1.3.0 -C nagios -P 2c
OUTPUT: SNMP OK - Timeticks: (95801993) 11 days, 2:06:59.93 |

So how should I proceed in restoring this situation, so sysUpTime.0 works again?

Re: check_snmp uptime no longer working

Posted: Mon Jul 08, 2013 10:50 am
by abrist
You may have two mibs that both have sysUpTime.0 defined.
WillemDH wrote:So how should I proceed in restoring this situation, so sysUpTime.0 works again?
The only option would be to remove the offending mib or just use the oids.

Re: check_snmp uptime no longer working

Posted: Tue Jul 09, 2013 1:28 am
by WillemDH
Ok, I deleted the two mib files I added, restarted the snmptt, snmpd and snmptrapd services and everything seems to work again. Does this mean I have to check every mib I add to see if there are some duplicate oids? Isn't there some uptime oid in a lot of mibs?

Re: check_snmp uptime no longer working

Posted: Tue Jul 09, 2013 2:50 am
by WillemDH
The problem mib is CISCO-CCM-MIB.my, that contains oid's for our Cisco Callmanager. In fact when I retried adding it, and executing an addmib, I get a lot of errors like these:

Cannot adopt OID in CISCO-CCM-MIB: ccmPhoneName ::= { ccmPhoneEntry 20 }
Cannot adopt OID in CISCO-CCM-MIB: ccmPhoneProtocol ::= { ccmPhoneEntry 19 }
Cannot adopt OID in CISCO-CCM-MIB: ccmPhoneProductTypeIndex ::= { ccmPhoneEntry 18 }
Cannot adopt OID in CISCO-CCM-MIB: ccmPhoneTimeLastStatusUpdt ::= { ccmPhoneEntry 17 }
Cannot adopt OID in CISCO-CCM-MIB: ccmPhoneStatusReason ::= { ccmPhoneEntry 16 }
Cannot adopt OID in CISCO-CCM-MIB: ccmPhoneInetAddress ::= { ccmPhoneEntry 15 }
Cannot adopt OID in CISCO-CCM-MIB: ccmPhoneInetAddressType ::= { ccmPhoneEntry 14 }
Cannot adopt OID in CISCO-CCM-MIB: ccmPhoneDevicePoolIndex ::= { ccmPhoneEntry 13 }
Cannot adopt OID in CISCO-CCM-MIB: ccmPhoneTimeLastError ::= { ccmPhoneEntry 12 }
Cannot adopt OID in CISCO-CCM-MIB: ccmPhoneLastError ::= { ccmPhoneEntry 11 }
Cannot adopt OID in CISCO-CCM-MIB: ccmPhoneLoadID ::= { ccmPhoneEntry 10 }
Cannot adopt OID in CISCO-CCM-MIB: ccmPhoneE911Location ::= { ccmPhoneEntry 9 }
Cannot adopt OID in CISCO-CCM-MIB: ccmPhoneTimeLastRegistered ::= { ccmPhoneEntry 8 }
Cannot adopt OID in CISCO-CCM-MIB: ccmPhoneStatus ::= { ccmPhoneEntry 7 }
Cannot adopt OID in CISCO-CCM-MIB: ccmPhoneIpAddress ::= { ccmPhoneEntry 6 }
Cannot adopt OID in CISCO-CCM-MIB: ccmPhoneUserName ::= { ccmPhoneEntry 5 }
Cannot adopt OID in CISCO-CCM-MIB: ccmPhoneDescription ::= { ccmPhoneEntry 4 }
Cannot adopt OID in CISCO-CCM-MIB: ccmPhoneType ::= { ccmPhoneEntry 3 }
Cannot adopt OID in CISCO-CCM-MIB: ccmPhonePhysicalAddress ::= { ccmPhoneEntry 2 }
Cannot adopt OID in CISCO-CCM-MIB: ccmPhoneIndex ::= { ccmPhoneEntry 1 }
Unknown object identifier: CISCO-CCM-MIB::ccmGatewayFailedReason

Anyone already got something like this? In fact I am doing an snmp get on .1.3.6.1.4.1.9.9.156.1.5.5.0 to get the number of registered phones. I get the value, but another problem I have is that the performance graph doesn't show any information. I added a ping image to show what I can see in the graph. As the returned value of .1.3.6.1.4.1.9.9.156.1.5.5.0 is 148 at the moment, I was hoping to see a graph of how many registered telephones we have over time. Any tips to get this graph working?

Re: check_snmp uptime no longer working

Posted: Tue Jul 09, 2013 12:14 pm
by abrist
What is the full command and service check you are using for the number of registered phones? The check may not be returning performance data . . .

Re: check_snmp uptime no longer working

Posted: Wed Jul 10, 2013 4:39 am
by WillemDH
The full command would be this:

$USER1$/check_snmp -H $HOSTADDRESS$ $ARG1$
$ARG1$ = -o ".1.3.6.1.4.1.9.9.156.1.5.5.0" -C nagios -P 2c

I already tried without ", but still the same problem

Re: check_snmp uptime no longer working

Posted: Wed Jul 10, 2013 10:31 am
by sreinhardt
The command looks fine, could you post the output as returned from the command above. I want to be sure that check_snmp is returning perfdata for you, not just a return value.

Re: check_snmp uptime no longer working

Posted: Wed Jul 10, 2013 10:32 am
by lmiltchev
Run the following command and show us the output:

Code: Select all

/usr/local/nagios/libexec/check_snmp -H <your_host_IP_address> -o ".1.3.6.1.4.1.9.9.156.1.5.5.0" -C nagios -P 2c

Re: check_snmp uptime no longer working

Posted: Thu Jul 18, 2013 3:43 am
by WillemDH
Hello, this is the output:

/usr/local/nagios/libexec/check_snmp -H server_hostname -o ".1.3.6.1.4.1.9.9.156.1.5.5.0" -C nagios -P 2c
SNMP OK - 146 | iso.3.6.1.4.1.9.9.156.1.5.5.0=146c