Module: check_mk
Branch: master
Commit: 62641d8c4f99c95a4a22446e6749412e00367b2c
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=62641d8c4f99c9…
Author: Marcel Arentz <ma(a)mathias-kettner.de>
Date: Mon Jun 26 15:10:05 2017 +0200
transferred werk 4824 into master
Change-Id: I3ea5f558d36d41e59ce3574b437a480f8f4dc55d
---
.werks/4824 | 11 +++++++++++
checks/f5_bigip_conns | 8 +++++++-
2 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/.werks/4824 b/.werks/4824
new file mode 100644
index 0000000..b09dd4d
--- /dev/null
+++ b/.werks/4824
@@ -0,0 +1,11 @@
+Title: f5bigip_conns: Fixed crash if Parameters are at 'No Levels'
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.5.0i1
+Date: 1498479772
+Class: fix
+
+2016-11-07 the fix 3939 readded performance data into the output. Since
+then the check would crash if the Thresholds for the service has been set to
+"No Levels". This has been fixed now.
diff --git a/checks/f5_bigip_conns b/checks/f5_bigip_conns
index 961993a..5febf54 100644
--- a/checks/f5_bigip_conns
+++ b/checks/f5_bigip_conns
@@ -88,7 +88,13 @@ def check_f5_bigip_conns(item, params, info):
if val == None:
infotext += " not configured"
else:
- warn, crit = params_values[:2]
+ # The check_parameters are a bit tricky: If thresholds are disabled,
+ # the value is None; otherwise it's a Tuple.
+ # TODO: Refactor the check parameter f5_connections and this check plugin!
+ if params_values == None:
+ warn, crit = (None, None)
+ else:
+ warn, crit = params_values[:2]
perfdata.append((perfkey, val, warn, crit))
state, extrainfo, extraperf = check_levels(val, dsname, params_values)