empty agent response now
Message-ID: <5298918a.at7Whs/p6UqOnl3b%lm(a)mathias-kettner.de>
User-Agent: Heirloom mailx 12.4 7/29/08
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Module: check_mk
Branch: master
Commit: dd13b03574f2dd820166fbbae831032aa2eddec0
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=dd13b03574f2dd…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Nov 29 14:04:11 2013 +0100
winperf_processor mem: Dealing with no/empty agent response now
---
checks/mem | 3 +++
checks/winperf_processor | 2 ++
2 files changed, 5 insertions(+)
diff --git a/checks/mem b/checks/mem
index da6efdd..e97e3d9 100644
--- a/checks/mem
+++ b/checks/mem
@@ -86,6 +86,9 @@ def inventory_mem_win(info):
def check_mem_windows(item, params, info):
meminfo = parse_proc_meminfo(info)
+ if "MemTotal" not in meminfo or \
+ "PageTotal" not in meminfo:
+ return 3, "Got no information from agent"
perfdata = []
infotxts = []
MB = 1024.0 * 1024
diff --git a/checks/winperf_processor b/checks/winperf_processor
index 75fd9e8..6c05c3c 100644
--- a/checks/winperf_processor
+++ b/checks/winperf_processor
@@ -41,6 +41,8 @@ def inventory_winperf_util(info):
# params: levels for warn / crit in percentage
def check_winperf_util(_no_item, params, info):
+ if not info:
+ return 3, "Got no information from agent"
this_time = int(float(info[0][0]))
for line in info[1:]: