uptime monitoring via check_snmp / counter wrap

William Leibzon william at leibzon.org
Fri Oct 24 02:37:10 CEST 2014


You need 64-bit counter and there is none for uptime. Since once every 500
days is rare people just deal with such extra alert. Most people for one
reason or another reboot their servers more often though.

If you want to write a work-around it would be one that uses previous run
uptime data and if its near wrap time ignores the situation.

On Thu, Oct 23, 2014 at 12:06 AM, Florian Lohoff <f at zz.de> wrote:

>
> Hi,
> i am currently monitoring sysuptime via check-snmp
>
>         command_line $USER1$/check_snmp -H $HOSTADDRESS$ -C
> $_HOSTCOMMUNITY$ -P 2c -o .1.3.6.1.2.1.1.3.0 -c 90000:
>
> The 90000 is basically that i want the first 15 Minutes after boot the
> alarm
> to be critical.
>
> Now obviously with a 32 bit counter this counter wraps at least every 497
> days.
>
> flo at p2:~$ echo $[ 2**32 / 100 / 86400 ]
> 497
>
> This causes the above statement to actually show a reboot/sysuptime ALARM.
>
> I dont see any way around this as the wrap depends on the last value found
> via check_snmp so it would need some kind of persistence of data.
>
> Is there a better sysuptime check?
>
> Flo
> --
> Florian Lohoff                                                 f at zz.de
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
>
> iQIVAwUBVEio7JDdQSDLCfIvAQpycQ//ayLcurUViD5vBKpZ/6zVebm7y7pxtXL/
> SNW6pac9ls0y8gsJjSolHrVobHR+Xtdz/gl2pA86wI4+l1txJlAirpocuw8QHtam
> Hg39ndTbryvDkxekUdxJi0Alue21kKqMHGnRj8B5Utpd8YLqQ6WhGQVHZR4Qpsiq
> m49BEmCJyvQsQZPfOm4wgeAL1uqzXKIbxT1fiL4lghybFyKd8DE5QdzBGnEjJUSM
> CEKMC/10ItSUd7CLaV6lfXBG+I1RbWJuyHPhpm8tbzvQtftnrk2PDG9cdjaMtSu1
> MVnnh46gMuiDzWK6CQPJiQEAeIdHGb1r2roPnUEjJT3vQvZLA9yIEFuwyVzAIA6V
> aX5QZLhMoB0JVmU2sUMWqrZXBnrI7tLuHThdEQkOIvSfTbwNIAQsTwKSAwiLjjPC
> BvnBrNNHu17S3n3KCMEzB1JZRT769ZpCkrheSGVjCj5eDcVf/dD0ENJndUWyZFOp
> tXnB/7LkNlO4tO8ZrCStWSOBbXkohdUEVLNkvMRDniNWHsOgr36EdKLifMml11Mj
> C7e8KsKUOPU9clydynbSosVRu62NR4ythwV1l2Tzgkq/SFI1QB704iA/Wc2rKzAz
> ifwfi4NFH5RanWHWzgQSkWruEMs8U1dRbUmqPV5hiW/M4nHNt+4yLBlLHqtiJ9UQ
> 0fhGGhnz9EQ=
> =9UBV
> -----END PGP SIGNATURE-----
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-plugins.org/archive/devel/attachments/20141023/9ac5eb52/attachment.html>


More information about the Devel mailing list