Skip to content
Permalink
Browse files

FIX snmp_uptime: no longer fails if uptime is < 1 seconds

  • Loading branch information
Andreas Boesl
Andreas Boesl committed Feb 11, 2014
1 parent 58c0ead commit 74d285c33911f4a2ad1abcc14f8e612752516131
Showing with 14 additions and 1 deletion.
  1. +9 −0 .werks/555
  2. +1 −0 ChangeLog
  3. +4 −1 checks/snmp_uptime
@@ -0,0 +1,9 @@
Title: snmp_uptime: no longer fails if uptime is < 1 seconds
Level: 1
Component: checks
Class: fix
State: unknown
Version: 1.2.5i1
Date: 1392136196


@@ -174,6 +174,7 @@
* 0281 FIX: statgrab_net.ctr: only inventorize interfaces with actual traffic...
* 0582 FIX: cisco_sys_mem: check now has a man page and a new WATO integration
* 0667 FIX: oracle_asm_diskgroup: Now really uses the generic filesystem levels...
* 0555 FIX: snmp_uptime: no longer fails if uptime is < 1 seconds

Multisite:
* 0371 Added log class filter to hostsvcevents view
@@ -33,7 +33,10 @@ def inventory_snmp_uptime(info):
def check_snmp_uptime(checktype, params, info):
ticks = info[0][0]
try:
uptime = int(ticks[:-2])
if len(ticks) < 3:
uptime = 0
else:
uptime = int(ticks[:-2])
except:
days, h, m, s = ticks.split(":")
uptime = (int(days) * 86400 ) + (int(h) * 3600) + (int(m) * 60) + int(float(s))

0 comments on commit 74d285c

Please sign in to comment.
You can’t perform that action at this time.