Module: check_mk
Branch: master
Commit: 63f38a52f4c2708932b1e7e54f1ee905e6532272
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=63f38a52f4c270…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Fri Sep 15 11:49:38 2017 +0200
5281 FIX apache_status: Fixed ignoring invalid lines
Change-Id: I84cb003c353a83883a845078884098f3260c1656
---
.werks/5281 | 11 +++++++++++
checks/apache_status | 2 +-
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/.werks/5281 b/.werks/5281
new file mode 100644
index 0000000..3bc3d22
--- /dev/null
+++ b/.werks/5281
@@ -0,0 +1,11 @@
+Title: apache_status: Fixed ignoring invalid lines
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.5.0i1
+Date: 1505468862
+
+
diff --git a/checks/apache_status b/checks/apache_status
index 03c661f..2e58f12 100644
--- a/checks/apache_status
+++ b/checks/apache_status
@@ -89,13 +89,13 @@ _apache_status_stats = {
def apache_status_parse(info):
data = {}
for line in info:
- address, port = line[:2]
if len(line) != 4 and not (len(line) == 5 and line[2] == 'Total'):
continue # Skip unexpected lines
label = (' '.join(line[2:-1])).rstrip(':')
if label not in _apache_status_fields:
continue
+ address, port = line[:2]
value = _apache_status_fields[label][1](line[-1])
if port == "None":
item = address