Module: check_mk
Branch: master
Commit: 2bfc488a78abd1bffe74849a9784e0528f4ff733
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2bfc488a78abd1…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Fri Feb 10 16:59:41 2017 +0100
4358 FIX wmi_cpuload: fixed exception handling
Change-Id: I2748b268a0d4739df3f8030a431abff93385ab6e
---
.werks/4358 | 10 ++++++++++
ChangeLog | 2 ++
checks/wmi_cpuload | 6 +++---
3 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/.werks/4358 b/.werks/4358
new file mode 100644
index 0000000..5239da3
--- /dev/null
+++ b/.werks/4358
@@ -0,0 +1,10 @@
+Title: wmi_cpuload: fixed exception handling
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.4.0i4
+Date: 1486742363
+
+
diff --git a/ChangeLog b/ChangeLog
index 3b44b98..5f8b5ca 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -103,11 +103,13 @@
* 4340 FIX: blade_bays: cleanup and some improvements...
* 4341 FIX: cisco_wlc: fixed invalid parameters during service discovery
* 4024 FIX: netapp_api_volumes: fixed incorrect computation of read/write latency
+ * 4192 FIX: df: Fixed handling of incomplete information about inodes...
* 4342 FIX: hp_proliant: fixed empty status handling
* 4216 FIX: cmciii.phase: Fix wrong scaling of power and energy values
* 4345 FIX: hp_proliant_temp: Ignore device levels of 0
* 4356 FIX: brocade_fcport: since FW 8.0.* tx/rxwords are no longer available, use
values from FCMGMT-MIB instead
* 4125 FIX: kaspersky_av_client: made fullscan state optional, simplified plugin...
+ * 4358 FIX: wmi_cpuload: fixed exception handling
Multisite:
* 4169 View action: Default values of sticky, notification and persistent options can
now be configured via global settings....
diff --git a/checks/wmi_cpuload b/checks/wmi_cpuload
index 76d2d49..bac9089 100644
--- a/checks/wmi_cpuload
+++ b/checks/wmi_cpuload
@@ -31,9 +31,9 @@ def check_wmi_cpuload(item, params, parsed):
# unlike cpu load this does not include processes currently being processed,
# so unless to cpu is (almost) fully utilized, this will be 0.
- load = int(parsed["system_perf"].get(0, "ProcessorQueueLength"))
+ load = int(parsed["system_perf"].get(0,
"ProcessorQueueLength"))
this_time = get_wmi_time(parsed["system_perf"], 0)
- load5min = get_average("load_5min", this_time, load, 5)
+ load5min = get_average("load_5min", this_time, load, 5)
load15min = get_average("load_15min", this_time, load, 15)
try:
@@ -43,7 +43,7 @@ def check_wmi_cpuload(item, params, parsed):
try:
cores = int(computer_system.get(0, "NumberOfLogicalProcessors"))
- except ValueError:
+ except (ValueError, MKGeneralException):
# NumberOfLogicalProcessors can be an empty string, not sure why
cores = int(computer_system.get(0, "NumberOfProcessors"))