Module: check_mk
Branch: master
Commit: 70f43486c82d4b5fe940c27b6b1f59558b8dbcb8
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=70f43486c82d4b…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Jun 29 16:35:30 2015 +0200
#2368 FIX ucd_cpu_load: fix exception in case of dump SNMP agent sending 12,540000 instead
of 12.540000
---
.werks/2368 | 10 ++++++++++
ChangeLog | 1 +
checks/ucd_cpu_load | 3 ++-
3 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/.werks/2368 b/.werks/2368
new file mode 100644
index 0000000..e3135ce
--- /dev/null
+++ b/.werks/2368
@@ -0,0 +1,10 @@
+Title: ucd_cpu_load: fix exception in case of dump SNMP agent sending 12,540000 instead
of 12.540000
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i3
+Date: 1435588503
+
+
diff --git a/ChangeLog b/ChangeLog
index 075c1f6..b53fbe5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -20,6 +20,7 @@
* 2366 FIX: carel_sensors: fix crash in case of missing temperature sensor
* 2382 FIX: mssql_backup: Formating age output more human friendly
* 2383 FIX: FreeBSD Agent: Fixed handling <<<ps>>> section when
jailed
+ * 2368 FIX: ucd_cpu_load: fix exception in case of dump SNMP agent sending 12,540000
instead of 12.540000
Multisite:
* 2314 FIX: Availability: fixed exception when grouping by host or service group
diff --git a/checks/ucd_cpu_load b/checks/ucd_cpu_load
index 17d52c5..51b7f14 100644
--- a/checks/ucd_cpu_load
+++ b/checks/ucd_cpu_load
@@ -32,7 +32,8 @@ def inventory_ucd_cpu_load(info):
return [(None, "cpuload_default_levels")]
def check_ucd_cpu_load(item, params, info):
- return check_cpu_load_generic(params, [ float(l[0]) for l in info ])
+ # Note: Some dump devices send 12,540000 instead of 12.540000
+ return check_cpu_load_generic(params, [ float(l[0].replace(",",
".")) for l in info ])
# We are not sure how to safely detect the UCD SNMP Daemon. We know that