Add sni option to http check

fixes #6605

Signed-off-by: Gunnar Beutner <gunnar.beutner@netways.de>
This commit is contained in:
Jan Wagner 2014-06-27 21:38:11 +02:00 committed by Gunnar Beutner
parent 4b157ac54f
commit 4c548813a4
3 changed files with 29 additions and 0 deletions

View File

@ -723,12 +723,24 @@ macro value can be resolved by Icinga 2.
"-S" = { "-S" = {
set_if = "$http_ssl$" 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$" "-w" = "$http_warn_time$"
"-c" = "$http_critical_time$" "-c" = "$http_critical_time$"
} }
vars.http_address = "$address$" vars.http_address = "$address$"
vars.http_ssl = false vars.http_ssl = false
vars.http_sni = false
} }
The example shows the `check_http` check command defining the most common The example shows the `check_http` check command defining the most common

View File

@ -795,12 +795,24 @@ Example:
"-S" = { "-S" = {
set_if = "$http_ssl$" 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$" "-w" = "$http_warn_time$"
"-c" = "$http_critical_time$" "-c" = "$http_critical_time$"
} }
vars.http_address = "$address$" vars.http_address = "$address$"
vars.http_ssl = false 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_uri | **Optional.** The request URI.
http_port | **Optional.** The TCP port. Defaults to 80 when not using SSL, 443 otherwise. 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_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_auth_pair | **Optional.** Add 'username:password' authorization pair.
http_ignore_body | **Optional.** Don't download the body, just the headers. 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_expect_body_regex | **Optional.** A regular expression which the body must match against. Incompatible with http_ignore_body.

View File

@ -186,6 +186,9 @@ object CheckCommand "http" {
"-S" = { "-S" = {
set_if = "$http_ssl$" set_if = "$http_ssl$"
} }
"--sni" = {
set_if = "$http_sni$"
}
"-a" = { "-a" = {
value = "$http_auth_pair$" value = "$http_auth_pair$"
description = "Username:password on sites with basic authentication" description = "Username:password on sites with basic authentication"
@ -200,6 +203,7 @@ object CheckCommand "http" {
vars.http_address = "$address$" vars.http_address = "$address$"
vars.http_ssl = false vars.http_ssl = false
vars.http_sni = false
} }
object CheckCommand "ftp" { object CheckCommand "ftp" {