Module: check_mk
Branch: master
Commit: e4b2de2be93a85467d3d660382e8d097b02aa1be
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e4b2de2be93a85…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Mon Jul 13 14:17:39 2015 +0200
#1271 FIX omd_apache: Fixed handling of urls with whitespace
---
.werks/1271 | 10 ++++++++++
ChangeLog | 1 +
checks/omd_apache | 7 ++++++-
3 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/.werks/1271 b/.werks/1271
new file mode 100644
index 0000000..ced07ec
--- /dev/null
+++ b/.werks/1271
@@ -0,0 +1,10 @@
+Title: omd_apache: Fixed handling of urls with whitespace
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i3
+Date: 1436789836
+
+
diff --git a/ChangeLog b/ChangeLog
index eb72c82..7ff1e43 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -47,6 +47,7 @@
* 2400 FIX: windows_if.ps1: fixed exception in plugin when an interface team had no
members
* 2374 FIX: md: Fix exception for certain outputs of certain special MD
configurations...
* 2458 FIX: FreeBSD-Agent: Fixed uptime calculation
+ * 1271 FIX: omd_apache: Fixed handling of urls with whitespace
Multisite:
* 2385 SEC: Fixed possible reflected XSS on all GUI pages where users can produce
unhandled exceptions...
diff --git a/checks/omd_apache b/checks/omd_apache
index e35125d..132ccf4 100644
--- a/checks/omd_apache
+++ b/checks/omd_apache
@@ -85,7 +85,12 @@ def check_omd_apache(item, _no_params, parsed):
yield 0, "No activity since last check"
return
- for url, status, size_bytes, microsec in parsed[item]:
+ for line in parsed[item]:
+ if len(line) == 4:
+ url, status, size_bytes, microsec = line
+ else:
+ url = " ".join(line[:-3])
+ status, size_bytes, microsec = line[-3:]
for key, pattern in omd_apache_patterns:
# make url relative to site directory
if regex(pattern).search(url[len('/'+item+'/'):]):