Module: check_mk
Branch: master
Commit: 78b64711a6d1a5dc8d7dc938ceb594e5986d3f6b
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=78b64711a6d1a5…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Tue Aug 22 11:38:14 2017 +0200
5115 FIX zfs_arc_cache: Fixed wrong detected lines from agent output if they contain no
counters, eg. 'class = misc'
Change-Id: Icbbaacba412da36540ddf6efc8694dd1f9d686d9
---
.werks/5115 | 10 ++++++++++
checks/zfs_arc_cache | 2 +-
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/.werks/5115 b/.werks/5115
new file mode 100644
index 0000000..c8be76c
--- /dev/null
+++ b/.werks/5115
@@ -0,0 +1,10 @@
+Title: zfs_arc_cache: Fixed wrong detected lines from agent output if they contain no
counters, eg. 'class = misc'
+Level: 1
+Component: checks
+Compatible: compat
+Edition: cre
+Version: 1.5.0i1
+Date: 1503394551
+Class: fix
+
+
diff --git a/checks/zfs_arc_cache b/checks/zfs_arc_cache
index 2981a703..07afa68 100644
--- a/checks/zfs_arc_cache
+++ b/checks/zfs_arc_cache
@@ -253,7 +253,7 @@
def parse_zfs_arc_cache(info):
parsed = {}
for line in info:
- if not (len(line) <= 2 or line[1] == "=" or line[2].isdigit()):
+ if not (len(line) >= 3 and line[1] == "=" and line[2].isdigit()):
continue
factor = 1