Module: check_mk
Branch: master
Commit: 0a6a1edee7a9ead679098ac1809e157bfc156994
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=0a6a1edee7a9ea…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Tue Jan 31 12:47:59 2017 +0100
updated werk 4262
Change-Id: Ice94f2bc11e81c6467053f44137f19d9a1722130
---
.werks/4262 | 2 +-
checks/wmi_cpuload | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/.werks/4262 b/.werks/4262
index 50dae10..9dc65f5 100644
--- a/.werks/4262
+++ b/.werks/4262
@@ -7,4 +7,4 @@ State: unknown
Version: 1.4.0i4
Date: 1484124769
-If computer system section is missing then we assume that there's one core.
+
diff --git a/checks/wmi_cpuload b/checks/wmi_cpuload
index 94ef88d..76d2d49 100644
--- a/checks/wmi_cpuload
+++ b/checks/wmi_cpuload
@@ -39,13 +39,13 @@ def check_wmi_cpuload(item, params, parsed):
try:
computer_system = parsed["computer_system"]
except KeyError:
- computer_system = {}
+ return 3, "Missing information from agent"
try:
cores = int(computer_system.get(0, "NumberOfLogicalProcessors"))
except ValueError:
# NumberOfLogicalProcessors can be an empty string, not sure why
- cores = 1
+ cores = int(computer_system.get(0, "NumberOfProcessors"))
return check_cpu_load_generic(params, (load, load5min, load15min), cores)