Module: check_mk
Branch: master
Commit: dab8baf87e666bd0d74d8d56122e461f83895287
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=dab8baf87e666b…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Nov 12 15:59:50 2015 +0100
#2776 FIX apache_status: fix crash for Apache versions with yet unhandled status fields
---
.werks/2776 | 10 ++++++++++
ChangeLog | 1 +
checks/apache_status | 3 +++
3 files changed, 14 insertions(+)
diff --git a/.werks/2776 b/.werks/2776
new file mode 100644
index 0000000..9741edf
--- /dev/null
+++ b/.werks/2776
@@ -0,0 +1,10 @@
+Title: apache_status: fix crash for Apache versions with yet unhandled status fields
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i4
+Date: 1447340362
+
+
diff --git a/ChangeLog b/ChangeLog
index 0a9a9ed..4948e93 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -76,6 +76,7 @@
* 2765 FIX: heartbeat_crm: Fixed issue detecting outdated data with daylight saving
time
* 2775 FIX: omd_status: handle case where status information is incomplete due to
missing cmk version
* 2835 FIX: netextreme_psu_in: fixed wrong voltage usage handling...
+ * 2776 FIX: apache_status: fix crash for Apache versions with yet unhandled status
fields
Multisite:
* 2684 Added icons for downloading agent data / walks of hosts...
diff --git a/checks/apache_status b/checks/apache_status
index 196ecd2..9d64500 100644
--- a/checks/apache_status
+++ b/checks/apache_status
@@ -77,6 +77,9 @@ def apache_status_parse(info):
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
+
value = _apache_status_fields[label][1](line[-1])
if port == "None":
item = address