Module: check_mk
Branch: master
Commit: a6c065e19309fd05a94003f64ce9fb4ee02d5a2f
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a6c065e19309fd…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Feb 16 14:16:38 2016 +0100
#3217 FIX fortigate_sessions: Fixed exception in case of empty data provided by the
device
---
.werks/3217 | 10 ++++++++++
ChangeLog | 1 +
checks/fortigate_sessions | 6 +++++-
3 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/.werks/3217 b/.werks/3217
new file mode 100644
index 0000000..2550903
--- /dev/null
+++ b/.werks/3217
@@ -0,0 +1,10 @@
+Title: fortigate_sessions: Fixed exception in case of empty data provided by the device
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.9i1
+Date: 1455628575
+
+
diff --git a/ChangeLog b/ChangeLog
index 8f03b1f..6a43416 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -21,6 +21,7 @@
NOTE: Please refer to the migration notes!
* 3176 FIX: Fix invalid scaling of some obscure metrics by factor 100...
* 3177 FIX: mem.linux: added all missing metric definitions
+ * 3217 FIX: fortigate_sessions: Fixed exception in case of empty data provided by the
device
Multisite:
* 3059 FIX: Fixed highlighting of availability timeline time slices
diff --git a/checks/fortigate_sessions b/checks/fortigate_sessions
index 6a7acbc..0a9bcad 100644
--- a/checks/fortigate_sessions
+++ b/checks/fortigate_sessions
@@ -31,7 +31,11 @@ def inventory_fortigate_sessions(info):
def check_fortigate_sessions(item, params, info):
warn, crit = params
- current = saveint(info[0][0])
+
+ if not info[0]:
+ return
+ current = int(info[0][0])
+
state = 0
icon = ''
if current >= warn: