Add "ssl" CheckCommand

Refs #6487
This commit is contained in:
Gerd von Egidy 2014-06-15 23:58:46 +02:00 committed by Michael Friedrich
parent 64946bc3a2
commit dedb16b2c8
2 changed files with 33 additions and 0 deletions

View File

@ -1834,6 +1834,20 @@ Name | Description
tcp_address | **Optional.** The host's address. Defaults to "$address$". tcp_address | **Optional.** The host's address. Defaults to "$address$".
tcp_port | **Required.** The port that should be checked. tcp_port | **Required.** The port that should be checked.
#### <a id="plugin-check-command-ssl"></a> ssl
Check command object for the `check_tcp` plugin, using ssl-related options.
Custom Attributes:
Name | Description
------------------------------|--------------
ssl_address | **Optional.** The host's address. Defaults to "$address$".
ssl_port | **Required.** The port that should be checked.
ssl_timeout | **Optional.** Timeout in seconds for the connect and handshake. The plugin default is 10 seconds.
ssl_cert_valid_days_warn | **Optional.** Warning threshold for days before the certificate will expire. When used, ssl_cert_valid_days_critical must also be set.
ssl_cert_valid_days_critical | **Optional.** Critical threshold for days before the certificate will expire. When used, ssl_cert_valid_days_warn must also be set.
#### <a id="plugin-check-command-udp"></a> udp #### <a id="plugin-check-command-udp"></a> udp
Check command object for the `check_udp` plugin. Check command object for the `check_udp` plugin.

View File

@ -96,6 +96,25 @@ object CheckCommand "tcp" {
vars.tcp_address = "$address$" vars.tcp_address = "$address$"
} }
object CheckCommand "ssl" {
import "plugin-check-command"
command = PluginDir + "/check_tcp"
arguments = {
"-H" = "$ssl_address$"
"-p" = "$ssl_port$"
"--ssl" = { }
"--timeout" = "$ssl_timeout$"
"-D" = {
set_if = len("$ssl_cert_valid_days_warn$") > 0 && len("$ssl_cert_valid_days_critical$") > 0
value = "$ssl_cert_valid_days_warn$,$ssl_cert_valid_days_critical$"
}
}
vars.ssl_address = "$address$"
}
object CheckCommand "udp" { object CheckCommand "udp" {
import "plugin-check-command" import "plugin-check-command"