Module: check_mk
Branch: master
Commit: d5d15e7754110f5150716349979d702554f1efc3
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d5d15e7754110f…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Wed Oct 15 15:36:40 2014 +0200
#1127 FIX bluecat_dhcp: fixed exception when data was available.. returns UNKNOWN when
data is missing
---
.werks/1127 | 9 +++++++++
ChangeLog | 1 +
checks/bluecat_dhcp | 6 ++++--
3 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/.werks/1127 b/.werks/1127
new file mode 100644
index 0000000..0f2d5f2
--- /dev/null
+++ b/.werks/1127
@@ -0,0 +1,9 @@
+Title: bluecat_dhcp: fixed exception when data was available.. returns UNKNOWN when data
is missing
+Level: 2
+Component: checks
+Compatible: compat
+Version: 1.2.5i6
+Date: 1413380143
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index 1206231..5ee719d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -107,6 +107,7 @@
NOTE: Please refer to the migration notes!
* 1078 FIX: Fix compensation for daylight safing time in prediction
* 1126 FIX: bluecat_ntp: check no longer crashes on evaluating sysLeap values higher
than 1...
+ * 1127 FIX: bluecat_dhcp: fixed exception when data was available.. returns UNKNOWN
when data is missing
Multisite:
* 1066 Implemented Dashboard Designer...
diff --git a/checks/bluecat_dhcp b/checks/bluecat_dhcp
index 9093536..79032ba 100644
--- a/checks/bluecat_dhcp
+++ b/checks/bluecat_dhcp
@@ -43,9 +43,11 @@ def check_bluecat_dhcp(item, params, info):
5 : "fault"
}
- state = 0
+ if not info:
+ return
+
for line in info:
- oper_state, leases_sec = map(int, line[0])
+ oper_state, leases_sec = map(int, line)
if oper_state in params['oper_states']['warning']:
state = 1
elif oper_state in params['oper_states']['critical']: