Module: check_mk
Branch: master
Commit: 00e431996faad3ed8790f53a3f35d32089733af9
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=00e431996faad3…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Wed Jan 25 11:16:15 2017 +0100
4298 FIX omd_apache: fixed missing data handling
Change-Id: I907256e8b67c689e2cbe1e9f47c9b7e10d2111cd
---
.werks/4298 | 10 ++++++++++
ChangeLog | 1 +
checks/omd_apache | 5 ++++-
3 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/.werks/4298 b/.werks/4298
new file mode 100644
index 0000000..0d441fa
--- /dev/null
+++ b/.werks/4298
@@ -0,0 +1,10 @@
+Title: omd_apache: fixed missing data handling
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.4.0i4
+Date: 1485339329
+
+
diff --git a/ChangeLog b/ChangeLog
index 57e939a..7087f1c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -62,6 +62,7 @@
* 4014 FIX: Windows Agent / Eventlogs with vista_api: Fixed numerous bugs and memory
leaks...
* 4283 FIX: check_mail_loop: Now using "mail to" address in To header
* 4297 FIX: oracle_instance: fixed discovery function...
+ * 4298 FIX: omd_apache: fixed missing data handling
Multisite:
* 4169 View action: Default values of sticky, notification and persistent options can
now be configured via global settings....
diff --git a/checks/omd_apache b/checks/omd_apache
index 8680173..dc85884 100644
--- a/checks/omd_apache
+++ b/checks/omd_apache
@@ -86,11 +86,14 @@ def check_omd_apache(item, _no_params, parsed):
return
for line in parsed[item]:
- if len(line) == 4:
+ if len(line) < 3:
+ continue
+ elif 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+'/'):]):