Module: check_mk
Branch: master
Commit: cc9c34e297a0bd448b4ecb74c534f20ed257cc67
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=cc9c34e297a0bd…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Wed Aug 8 11:53:10 2012 +0200
Wato: Fixed handling of regex in check_http
---
checks/check_http | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/checks/check_http b/checks/check_http
index e96812c..46bfbb5 100644
--- a/checks/check_http
+++ b/checks/check_http
@@ -83,6 +83,13 @@ def check_http_arguments(params):
if "expect_string" in settings:
args += ' -s %s' %
quote_shell_string(settings["expect_string"])
+ if "expect_regex" in settings:
+ args += ' -r %s' %
quote_shell_string(settings['expect_regex'][0])
+ if settings['expect_regex'][1]:
+ args += ' -R'
+ if settings['expect_regex'][2]:
+ args += ' --invert-regex'
+
if "post_data" in settings:
data, content_type = settings["post_data"]
args += ' -P %s -T %s' % \