check_snmp_uptime showing incorrect uptime?


Hey there,

could someone tell me what I’m doing wrong?
I’m using check_snmp_uptime -H $HOSTADDRESS$ -C $SNMP_COMMUNITY$ to check the uptime of a cisco router (one of the basic plugins).
Problem is, a few days ago it told me the uptime of one of our routers was < 1 hour… we’ve checked the router, and the router tells us it’s been up for 2 years, xx days, xx time (sorry too lazy to check those days and the time again).

What I’m wondering now is, where does Nagios get that information from?!
If anyone could tell me, please do so!

Thanks in advance!


that really depend on what check_snmp_uptime does as it’s not a standard nagios plugin… :stuck_out_tongue:


Sorry for the late reply!

It’s quite simple.
The only thing it does, is checking the uptime of the router/server/whatever else using the snmp protocol.
And it’s not standard?! How’d I get it then! :frowning:

Could it be that it came with Opsview? (Sorry, forgot to mention I’m using Opsview)
Anyways, it’s still giving me wrong information :frowning:


for sure it doesn’t ship with nagios.


Well, go install Opsview and find it out! :cry:


yes, sure. please wait until i get back with a result.


I was kidding :oops:
I’ll just keep searching the almighty google for an answer :slight_smile:


Could it be that the check_snmp commands are part of Official Nagios Plugins?


you would have been waiting for quite some time :stuck_out_tongue:

Check_snmp is a nagios plugin, the problem remains in what snmp OID is accessed and how is it handled… maybe there is some sort of conversion which causes an overflow… or possibly it fetches a different OID than the one th erouter uses for giving it’s uptime.


Y’know… I think I’ve actually found it! (With help from lord Google)

As soon as you reach 498 days uptime in Nagios, it resets and starts counting from 0 days again.

For example:
We have a router with an uptime of 2 years, 23 weeks

2365 = 730
7 = 161

730 + 161 = 891 days

Nagios only counts to 498, and from this point starts counting from 0 again.

891-498 = 393 days

So in Nagios you would see 393 days of uptime, simply because it resets.
I’ve checked this on a few routers now, and in a way Nagios is actually correct.
Too bad tho that it does give a warning in the first hour of starting over again.

Now I’m curious if there is a solution to prevent this :slight_smile: