Module: check_mk
Branch: master
Commit: 40f261f0e2a6fb75c7087e130ac4bc2a5c366b7d
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=40f261f0e2a6fb…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Apr 22 13:00:15 2016 +0200
3419 FIX solaris_mem: avoid crash in case of empty agent section, treat section as
missing
Unter some unclear circumstances the neccessary information seems to be missing
in the agent output.
---
.werks/3419 | 11 +++++++++++
ChangeLog | 1 +
checks/solaris_mem | 4 ++++
3 files changed, 16 insertions(+)
diff --git a/.werks/3419 b/.werks/3419
new file mode 100644
index 0000000..71d81bb
--- /dev/null
+++ b/.werks/3419
@@ -0,0 +1,11 @@
+Title: solaris_mem: avoid crash in case of empty agent section, treat section as missing
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.9i1
+Date: 1461322776
+
+Unter some unclear circumstances the neccessary information seems to be missing
+in the agent output.
diff --git a/ChangeLog b/ChangeLog
index e52ad93..874aa8b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -175,6 +175,7 @@
* 3433 FIX: cmc_temp: Fixed broken check
* 3434 FIX: cmctc_lcp: Fixed broken check in case parameter are specified
* 3435 FIX: check_varnish_uptime: Fixed broken check
+ * 3419 FIX: solaris_mem: avoid crash in case of empty agent section, treat section as
missing...
Multisite:
* 3187 notification view: new filter for log command via regex
diff --git a/checks/solaris_mem b/checks/solaris_mem
index f3471b6..2c2bb3a 100644
--- a/checks/solaris_mem
+++ b/checks/solaris_mem
@@ -40,6 +40,10 @@
# Memory: 2048M real, 913M free, 723M swap in use, 2863M swap free
def parse_solaris_mem(info):
+ # The 1.2.4 agent seems to create an empty section under some circumstances
+ if not info:
+ return
+
values = []
mem_tokens = " ".join(info[0][1:]).split(",")
is_total_swap = False