Module: check_mk
Branch: master
Commit: add5d0c995cb9b3d251dc4e2fa0059f16bf00b93
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=add5d0c995cb9b…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Mar 13 09:03:40 2015 +0100
#2096 FIX jolokia_metrics: Now deal with missing thread related infos (jboss might only
send ThreadCount)
---
.werks/2096 | 10 ++++++++++
ChangeLog | 1 +
checks/jolokia_metrics | 5 ++++-
3 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/.werks/2096 b/.werks/2096
new file mode 100644
index 0000000..44217f4
--- /dev/null
+++ b/.werks/2096
@@ -0,0 +1,10 @@
+Title: jolokia_metrics: Now deal with missing thread related infos (jboss might only send
ThreadCount)
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i1
+Date: 1426233790
+
+
diff --git a/ChangeLog b/ChangeLog
index e593b7e..c4d7ce0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -253,6 +253,7 @@
* 2101 FIX: cisco_temperature: check can now handle cases when no description of the
sensor is available
* 2103 FIX: mbg_lantime_ng_temp: levels were not working...
NOTE: Please refer to the migration notes!
+ * 2096 FIX: jolokia_metrics: Now deal with missing thread related infos (jboss might
only send ThreadCount)
Multisite:
* 1758 Improved exception hander: Shows details without additional debug request,
added mailto link for error report...
diff --git a/checks/jolokia_metrics b/checks/jolokia_metrics
index 8770010..fbddb46 100644
--- a/checks/jolokia_metrics
+++ b/checks/jolokia_metrics
@@ -327,7 +327,10 @@ def check_jolokia_metrics_threads(item, params, info):
output = []
status = 0
for key in [ 'ThreadCount', 'DeamonThreadCount',
'PeakThreadCount', 'TotalStartedThreadCount' ]:
- val = saveint(d[key])
+ if key not in d:
+ continue # The keys might be optional (saw jboss only sending ThreadCount)
+
+ val = int(d[key])
if key == 'ThreadCount':
# Thread count might lead to a warn/crit state
if val >= crit: