Module: check_mk
Branch: master
Commit: 0d7b81233007187be85e44e918c3363638ac739b
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=0d7b8123300718…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Wed Feb 22 13:44:35 2017 +0100
4413 FIX mem.linux: handle empty info
Change-Id: I66683eef61666e8cb9d555591472fbb72610e790
---
.werks/4413 | 11 +++++++++++
ChangeLog | 1 +
checks/mem | 3 +++
3 files changed, 15 insertions(+)
diff --git a/.werks/4413 b/.werks/4413
new file mode 100644
index 0000000..ce8bb34
--- /dev/null
+++ b/.werks/4413
@@ -0,0 +1,11 @@
+Title: mem.linux: handle empty info
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.5.0i1
+Date: 1487767443
+
+
diff --git a/ChangeLog b/ChangeLog
index 1fffb52..aa584c5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -13,6 +13,7 @@
* 4409 FIX: uptime: fixed missing info handling
* 4410 FIX: brocade_fcport: fixed missing info handling
* 4412 FIX: haproxy.server: fixed empty uptime info handling
+ * 4413 FIX: mem.linux: handle empty info
Multisite:
* 4365 FIX: Service availability: Host down could not be rewritten to other states
like CRIT
diff --git a/checks/mem b/checks/mem
index 6c473fd..43a5ce2 100644
--- a/checks/mem
+++ b/checks/mem
@@ -242,6 +242,9 @@ def check_mem_levels(title, used, total, levels, of_what=None,
of_value=None, sh
def check_mem_linux(_no_item, params, info):
meminfo = parse_proc_meminfo_bytes(info)
+ if not meminfo:
+ yield 3, "Data not found in agent output"
+ return
# SReclaimable is not available for older kernels
if "SReclaimable" not in meminfo: