Module: check_mk
Branch: master
Commit: 94d091cca9c955b2f7346dc117e88f0f6c24542c
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=94d091cca9c955…
Author: Goetz Golla <gg(a)mathias-kettner.de>
Date: Mon May 26 17:00:31 2014 +0200
FIX cmciii.temp, cmciii.humidity: fixed bugs to get performance data back
---
.werks/614 | 8 ++++++++
ChangeLog | 1 +
checks/cmciii | 6 +++++-
3 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/.werks/614 b/.werks/614
new file mode 100644
index 0000000..abf563e
--- /dev/null
+++ b/.werks/614
@@ -0,0 +1,8 @@
+Title: cmciii.temp, cmciii.humidity: fixed bugs to get performance data back
+Level: 1
+Component: checks
+Version: 1.2.5i3
+Date: 1401116364
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index 4ad6274..c246af9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -82,6 +82,7 @@
* 0611 FIX: nfsexports.solaris: fix in determination of path prefix
* 0953 FIX: brocade_mlx_temp: special treatment for devices sometimes not delivering
temperature by SNMP
* 0958 FIX: df.include: failed for checks with grouping patterns...
+ * 0614 FIX: cmciii.temp, cmciii.humidity: fixed bugs to get performance data back
Multisite:
* 0779 Hostgroups (Summary): Empty hostgroups are no longer shown (can be re-enabled
by filter)
diff --git a/checks/cmciii b/checks/cmciii
index c14fb41..12d34dc 100644
--- a/checks/cmciii
+++ b/checks/cmciii
@@ -463,6 +463,9 @@ def parse_temp(val):
# is encoded string
val = re.sub(" ","", val).decode("hex")
val, t_unit = val.split(" ", 1)
+ # omit special characters in unit, because they
+ # cause problems in rrdtools
+ t_unit = re.sub("[^\w]","", t_unit)
return val, t_unit
def check_cmciii_temp(item, params, info):
@@ -706,7 +709,7 @@ def check_cmciii_humidity(item, params, info):
else:
state = 2
- perfdata = [ ("hum", value+"%", 0, 0 ) ]
+ perfdata = [ ("hum", value, 0, 0 ) ]
infotext = "%s %s%% %s - Limits low %s/%s high %s/%s, Offset %s" % \
( descr, value, status, lowalarm, lowwarning, highwarning,
highalarm, offset )
@@ -719,5 +722,6 @@ check_info['cmciii.humidity'] = {
"service_description" : "%s",
"snmp_scan_function" : cmciii_scan,
"snmp_info" : cmciii_snmp_info,
+ "has_perfdata" : True,
}
#.