Module: check_mk
Branch: master
Commit: b748506e8972789b1acd06bcf3312fc6dbfce912
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b748506e897278…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Dec 11 10:01:27 2013 +0100
FIX apache_status: Improved handling of unexpeted data sent by agents
Now the check should also handle unexpected ascii responses from the agent.
---
.werks/310 | 8 ++++++++
ChangeLog | 1 +
checks/apache_status | 2 ++
3 files changed, 11 insertions(+)
diff --git a/.werks/310 b/.werks/310
new file mode 100644
index 0000000..f0b43e5
--- /dev/null
+++ b/.werks/310
@@ -0,0 +1,8 @@
+Title: apache_status: Improved handling of unexpeted data sent by agents
+Level: 1
+Component: checks
+Version: 1.2.3i8
+Date: 1386752436
+Class: fix
+
+Now the check should also handle unexpected ascii responses from the agent.
diff --git a/ChangeLog b/ChangeLog
index 8f7428a..3e38996 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -12,6 +12,7 @@
* 0305 FIX: apache_status: Fixed exception when agent reports HTML code as
apache-status data...
* 0104 FIX: mssql: Server instances with underline in name are now supported....
* 0240 FIX: Virtualmachine names with space no longer have missing piggyback data...
+ * 0310 FIX: apache_status: Improved handling of unexpeted data sent by agents...
Multisite:
* 0302 FIX: Fixed highlight of choosen elements in foldertee/views snapin in
Chrome/IE
diff --git a/checks/apache_status b/checks/apache_status
index 0c5e746..c9f545b 100644
--- a/checks/apache_status
+++ b/checks/apache_status
@@ -72,6 +72,8 @@ def apache_status_parse(info):
data = {}
for line in info:
address, port = line[:2]
+ if len(line) != 4:
+ continue # Skip unexpected lines
label = (' '.join(line[2:-1])).rstrip(':')
value = apache_status_fields[label][1](line[-1])
item = '%s:%s' % (address, port)