]> granicus.if.org Git - icinga2/commitdiff
Add http expect option (-e) to check_http command
authorCarlos Cesario <carloscesario@gmail.com>
Thu, 10 Jul 2014 20:16:14 +0000 (17:16 -0300)
committerMichael Friedrich <michael.friedrich@netways.de>
Sat, 12 Jul 2014 15:17:48 +0000 (17:17 +0200)
fixes #6695

Signed-off-by: Michael Friedrich <michael.friedrich@netways.de>
doc/3-monitoring-basics.md
doc/6-configuring-icinga-2.md
itl/command-plugins.conf

index 1bd1da4cde7e867a692ed0e521f6d11455d8e588..084ace3ce2a197c4ad6e0852ac5b18c24da1e3a0 100644 (file)
@@ -736,6 +736,7 @@ macro value can be resolved by Icinga 2.
         "-r" = "$http_expect_body_regex$"
         "-w" = "$http_warn_time$"
         "-c" = "$http_critical_time$"
+        "-e" = "$http_expect$"
       }
 
       vars.http_address = "$address$"
index 57bee14b587b2257fbaf605de93fd77d855a30e8..5e7e7774450ced08460a792b50ab42f44cac9ede 100644 (file)
@@ -808,6 +808,7 @@ Example:
         "-r" = "$http_expect_body_regex$"
         "-w" = "$http_warn_time$"
         "-c" = "$http_critical_time$"
+        "-e" = "$http_expect$"
       }
 
       vars.http_address = "$address$"
@@ -1933,6 +1934,7 @@ http_ignore_body         | **Optional.** Don't download the body, just the heade
 http_expect_body_regex   | **Optional.** A regular expression which the body must match against. Incompatible with http_ignore_body.
 http_warn_time           | **Optional.** The warning threshold.
 http_critical_time       | **Optional.** The critical threshold.
+http_expect              | **Optional.** Comma-delimited list of strings, at least one of them is expected in the first (status) line of the server response. Default: HTTP/1.
 
 #### <a id="plugin-check-command-ftp"></a> ftp
 
index 74dab6a0ae07ce4e2dcc2538ffe3595d46c74494..1261a7d3e2186ab33c871eb07f40bf676b717e1e 100644 (file)
@@ -199,6 +199,7 @@ object CheckCommand "http" {
                "-r" = "$http_expect_body_regex$"
                "-w" = "$http_warn_time$"
                "-c" = "$http_critical_time$"
+               "-e" = "$http_expect$"
        }
 
        vars.http_address = "$address$"