[icinga-checkins] icinga.org: icinga2/next: Add http_expect_body_regex and http_ignore_body to command-plugins.conf.

git at icinga.org git at icinga.org
Mon Jun 16 08:57:49 CEST 2014


Module: icinga2
Branch: next
Commit: 64946bc3a2585b9055c7f16d420950dfdcf8a4c1
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=64946bc3a2585b9055c7f16d420950dfdcf8a4c1

Author: Gerd von Egidy <gerd at egidy.de>
Date:   Sun Jun 15 23:13:04 2014 +0200

Add http_expect_body_regex and http_ignore_body to command-plugins.conf.

Refs #6487

---

 doc/6-configuring-icinga-2.md |   22 ++++++++++++----------
 itl/command-plugins.conf      |    4 ++++
 2 files changed, 16 insertions(+), 10 deletions(-)

diff --git a/doc/6-configuring-icinga-2.md b/doc/6-configuring-icinga-2.md
index bc7bf0d..f9b331e 100644
--- a/doc/6-configuring-icinga-2.md
+++ b/doc/6-configuring-icinga-2.md
@@ -1851,16 +1851,18 @@ Check command object for the `check_http` plugin.
 
 Custom Attributes:
 
-Name               | Description
--------------------|--------------
-http_address       | **Optional.** The host's address. Defaults to "$address".
-http_vhost         | **Optional.** The virtual host that should be sent in the "Host" header.
-http_uri           | **Optional.** The request URI.
-http_port          | **Optional.** The TCP port. Defaults to 80 when not using SSL, 443 otherwise.
-http_ssl           | **Optional.** Whether to use SSL. Defaults to false.
-http_auth_pair	   | **Optional.** Add 'username:password' authorization pair.
-http_warn_time     | **Optional.** The warning threshold.
-http_critical_time | **Optional.** The critical threshold.
+Name                     | Description
+-------------------------|--------------
+http_address             | **Optional.** The host's address. Defaults to "$address".
+http_vhost               | **Optional.** The virtual host that should be sent in the "Host" header.
+http_uri                 | **Optional.** The request URI.
+http_port                | **Optional.** The TCP port. Defaults to 80 when not using SSL, 443 otherwise.
+http_ssl                 | **Optional.** Whether to use SSL. Defaults to false.
+http_auth_pair           | **Optional.** Add 'username:password' authorization pair.
+http_ignore_body         | **Optional.** Don't download the body, just the headers.
+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.
 
 #### <a id="plugin-check-command-ftp"></a> ftp
 
diff --git a/itl/command-plugins.conf b/itl/command-plugins.conf
index 777ab0b..bc1ccdb 100644
--- a/itl/command-plugins.conf
+++ b/itl/command-plugins.conf
@@ -125,6 +125,10 @@ object CheckCommand "http" {
 			value = "$http_auth_pair$"
 			description = "Username:password on sites with basic authentication"
 		}
+		"--no-body" = {
+			set_if = "$http_ignore_body$"
+		}
+		"-r" = "$http_expect_body_regex$"
 		"-w" = "$http_warn_time$"
 		"-c" = "$http_critical_time$"
 	}



More information about the icinga-checkins mailing list