From 4c548813a4da8637c20b68d0d0f05e3cdd73d5c0 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Fri, 27 Jun 2014 21:38:11 +0200 Subject: [PATCH] Add sni option to http check fixes #6605 Signed-off-by: Gunnar Beutner --- doc/3-monitoring-basics.md | 12 ++++++++++++ doc/6-configuring-icinga-2.md | 13 +++++++++++++ itl/command-plugins.conf | 4 ++++ 3 files changed, 29 insertions(+) diff --git a/doc/3-monitoring-basics.md b/doc/3-monitoring-basics.md index 69a20caee..728656689 100644 --- a/doc/3-monitoring-basics.md +++ b/doc/3-monitoring-basics.md @@ -723,12 +723,24 @@ macro value can be resolved by Icinga 2. "-S" = { set_if = "$http_ssl$" } + "--sni" = { + set_if = "$http_sni$" + } + "-a" = { + 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$" } vars.http_address = "$address$" vars.http_ssl = false + vars.http_sni = false } The example shows the `check_http` check command defining the most common diff --git a/doc/6-configuring-icinga-2.md b/doc/6-configuring-icinga-2.md index 47d0406c5..aa446880b 100644 --- a/doc/6-configuring-icinga-2.md +++ b/doc/6-configuring-icinga-2.md @@ -795,12 +795,24 @@ Example: "-S" = { set_if = "$http_ssl$" } + "--sni" = { + set_if = "$http_sni$" + } + "-a" = { + 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$" } vars.http_address = "$address$" vars.http_ssl = false + vars.http_sni = false } @@ -1915,6 +1927,7 @@ http_vhost | **Optional.** The virtual host that should be sent in 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_sni | **Optional.** Whether to use SNI. 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. diff --git a/itl/command-plugins.conf b/itl/command-plugins.conf index 210501313..03243af67 100644 --- a/itl/command-plugins.conf +++ b/itl/command-plugins.conf @@ -186,6 +186,9 @@ object CheckCommand "http" { "-S" = { set_if = "$http_ssl$" } + "--sni" = { + set_if = "$http_sni$" + } "-a" = { value = "$http_auth_pair$" description = "Username:password on sites with basic authentication" @@ -200,6 +203,7 @@ object CheckCommand "http" { vars.http_address = "$address$" vars.http_ssl = false + vars.http_sni = false } object CheckCommand "ftp" { -- 2.50.1