Module: check_mk
Branch: master
Commit: cd2b24a9951f9db70aaa12add18b7026f6b475d7
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=cd2b24a9951f9d…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Thu Feb 6 11:00:50 2014 +0100
New option to use expect string in response heads for check_http in wato
The parameter -d from check_http (String to expect in the response headers) can now be set
via wato.
---
.werks/134 | 10 ++++++++++
ChangeLog | 3 ++-
checks/check_http | 3 +++
web/plugins/wato/active_checks.py | 5 +++++
4 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/.werks/134 b/.werks/134
new file mode 100644
index 0000000..394238b
--- /dev/null
+++ b/.werks/134
@@ -0,0 +1,10 @@
+Title: New option to use expect string in response heads for check_http in wato
+Level: 1
+Component: wato
+Version: 1.2.5i1
+Date: 1391680748
+Class: feature
+
+The parameter -d from check_http (String to expect in the response headers) can now be
set via wato.
+
+
diff --git a/ChangeLog b/ChangeLog
index 975b7f8..929d70e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -81,8 +81,8 @@
* 0699 emc_isilon_iops: New check for Disk Operations per Second (IOPS) in EMC Isilon
Storage
* 0132 New checks fjdarye101_disks fjdarye101_rluns: Fujitsu Storage Systems with
2013 Firmware
* 0697 check_dns: allow to specify multiple expected answers
- * 0580 emc_datadomain_fans, emc_datadomain_nvbat, emc_datadomain_power,
emc_datadomain_temps: new hardware checks for EMC Datadomain
* 0700 arcserve_backup: new check for status of backups in an Arcserve Backup Server
+ * 0580 emc_datadomain_fans, emc_datadomain_nvbat, emc_datadomain_power,
emc_datadomain_temps: new hardware checks for EMC Datadomain
* 0103 FIX: services: Fixed bug with service inventory defined in main.mk...
* 0299 FIX: borcade_mlx_fan: Prettified output, handling "other" state now
* 0300 FIX: cisco_fru_power: Trying not to inventorize not plugged in FRUs...
@@ -218,6 +218,7 @@
* 0685 Distributed WATO now disabled WATO on slave sites per default...
* 0687 New summary pages with all settings of a host or service...
* 0275 WATO "Notify Users" feature: Improved confirmation info...
+ * 0134 New option to use expect string in response heads for check_http in wato...
* 0057 FIX: Fix exception in WATO host editor on custom tag without topic...
* 0241 FIX: Improved sorting of WATO folders in dropdown menu...
* 0019 FIX: Fixed wording in WATO rule for MSSQL check
diff --git a/checks/check_http b/checks/check_http
index 1ac9f7e..05adfe8 100644
--- a/checks/check_http
+++ b/checks/check_http
@@ -88,6 +88,9 @@ def check_http_arguments(params):
if "expect_string" in settings:
args += ' -s %s' %
quote_shell_string(settings["expect_string"])
+ if "expect_response_header" in settings:
+ args += ' -d %s' %
quote_shell_string(settings["expect_response_header"])
+
if "expect_regex" in settings:
if len(settings['expect_regex']) >= 4 and
settings['expect_regex'][3]:
args += ' -l '
diff --git a/web/plugins/wato/active_checks.py b/web/plugins/wato/active_checks.py
index 0cc357c..0c97a2d 100644
--- a/web/plugins/wato/active_checks.py
+++ b/web/plugins/wato/active_checks.py
@@ -615,6 +615,11 @@ register_rule(group,
],
default_value = 'follow'),
),
+ ( "expect_response_header",
+ TextAscii(
+ title = _("String to expect in response
headers"),
+ )
+ ),
( "expect_response",
ListOfStrings(
title = _("Strings to expect in server
response"),