mirror of https://github.com/Icinga/icinga2.git
Add attributes to the "ftp" CheckCommand.
fixes #9146 Signed-off-by: Gunnar Beutner <gunnar@beutner.name>
This commit is contained in:
parent
5302ce0fe3
commit
2b8530be7c
|
@ -254,6 +254,23 @@ Custom attributes passed as [command parameters](3-monitoring-basics.md#command-
|
||||||
Name | Description
|
Name | Description
|
||||||
-------------------|--------------
|
-------------------|--------------
|
||||||
ftp_address | **Optional.** The host's address. Defaults to "$address$" if the host's `address` attribute is set, "$address6$" otherwise.
|
ftp_address | **Optional.** The host's address. Defaults to "$address$" if the host's `address` attribute is set, "$address6$" otherwise.
|
||||||
|
ftp_port | **Optional.** The FTP port number.
|
||||||
|
ftp_expect | **Optional.** String to expect in server response (may be repeated).
|
||||||
|
ftp_all | **Optional.** All expect strings need to occur in server response. Defaults to false.
|
||||||
|
ftp_escape_send | **Optional.** Enable usage of \n, \r, \t or \\\\ in send string.
|
||||||
|
ftp_send | **Optional.** String to send to the server.
|
||||||
|
ftp_escape_quit | **Optional.** Enable usage of \n, \r, \t or \\\\ in quit string.
|
||||||
|
ftp_quit | **Optional.** String to send server to initiate a clean close of the connection.
|
||||||
|
ftp_refuse | **Optional.** Accept TCP refusals with states ok, warn, crit. Defaults to crit.
|
||||||
|
ftp_mismatch | **Optional.** Accept expected string mismatches with states ok, warn, crit. Defaults to warn.
|
||||||
|
ftp_jail | **Optional.** Hide output from TCP socket.
|
||||||
|
ftp_maxbytes | **Optional.** Close connection once more than this number of bytes are received.
|
||||||
|
ftp_delay | **Optional.** Seconds to wait between sending string and polling for response.
|
||||||
|
ftp_certificate | **Optional.** Minimum number of days a certificate has to be valid. 1st value is number of days for warning, 2nd is critical (if not specified: 0) - seperated by comma.
|
||||||
|
ftp_ssl | **Optional.** Use SSL for the connection. Defaults to false.
|
||||||
|
ftp_wtime | **Optional.** Response time to result in warning status (seconds).
|
||||||
|
ftp_ctime | **Optional.** Response time to result in critical status (seconds).
|
||||||
|
ftp_timeout | **Optional.** Seconds before connection times out. Defaults to 10.
|
||||||
|
|
||||||
|
|
||||||
## <a id="plugin-check-command-hostalive"></a> hostalive
|
## <a id="plugin-check-command-hostalive"></a> hostalive
|
||||||
|
|
|
@ -339,10 +339,91 @@ object CheckCommand "ftp" {
|
||||||
command = [ PluginDir + "/check_ftp" ]
|
command = [ PluginDir + "/check_ftp" ]
|
||||||
|
|
||||||
arguments = {
|
arguments = {
|
||||||
"-H" = "$ftp_address$"
|
"-H" = {
|
||||||
|
value = "$ftp_address$"
|
||||||
|
description = "The host's address. Defaults to $address$ or $address6$ if the address attribute is not set."
|
||||||
|
}
|
||||||
|
"-p" = {
|
||||||
|
value = "$ftp_port$"
|
||||||
|
description = "The FTP port number. Defaults to none"
|
||||||
|
}
|
||||||
|
"-e" = {
|
||||||
|
value = "$ftp_expect$"
|
||||||
|
description = "String to expect in server response (may be repeated)."
|
||||||
|
}
|
||||||
|
"-A" = {
|
||||||
|
set_if = "$ftp_all$"
|
||||||
|
description = "All expect strings need to occur in server response. Default is any."
|
||||||
|
}
|
||||||
|
"-E_send" = {
|
||||||
|
key = "-E"
|
||||||
|
order = 1
|
||||||
|
set_if = "$ftp_escape_send$"
|
||||||
|
description = "Enable usage of \n, \r, \t or \\ in send string. Default is nothing."
|
||||||
|
}
|
||||||
|
"-s" = {
|
||||||
|
order = 2
|
||||||
|
value = "$ftp_send$"
|
||||||
|
description = "String to send to the server."
|
||||||
|
}
|
||||||
|
"-E_quit" = {
|
||||||
|
key = "-E"
|
||||||
|
order = 3
|
||||||
|
set_if = "$ftp_escape_quit$"
|
||||||
|
description = "Can use \n, \r, \t or \\ in quit string. Default is \r\n added to end of quit."
|
||||||
|
}
|
||||||
|
"-q" = {
|
||||||
|
order = 4
|
||||||
|
value = "$ftp_quit$"
|
||||||
|
description = "String to send server to initiate a clean close of the connection."
|
||||||
|
}
|
||||||
|
"-r" = {
|
||||||
|
value = "$ftp_refuse$"
|
||||||
|
description = "Accept TCP refusals with states ok, warn, crit. Defaults to crit."
|
||||||
|
}
|
||||||
|
"-M" = {
|
||||||
|
value = "$ftp_mismatch$"
|
||||||
|
description = "Accept expected string mismatches with states ok, warn, crit. Defaults to warn."
|
||||||
|
}
|
||||||
|
"-j" = {
|
||||||
|
set_if = "$ftp_jail$"
|
||||||
|
description = "Hide output from TCP socket."
|
||||||
|
}
|
||||||
|
"-m" = {
|
||||||
|
value = "$ftp_maxbytes$"
|
||||||
|
description = "Close connection once more than this number of bytes are received."
|
||||||
|
}
|
||||||
|
"-d" = {
|
||||||
|
value = "$ftp_delay$"
|
||||||
|
description = "Seconds to wait between sending string and polling for response."
|
||||||
|
}
|
||||||
|
"-D" = {
|
||||||
|
value = "$ftp_certificate$"
|
||||||
|
description = "Minimum number of days a certificate has to be valid. 1st value is number of days for warning, 2nd is critical (if not specified: 0) - seperated by comma."
|
||||||
|
}
|
||||||
|
"-S" = {
|
||||||
|
set_if = "$ftp_ssl$"
|
||||||
|
description = "Use SSL for the connection."
|
||||||
|
}
|
||||||
|
"-w" = {
|
||||||
|
value = "$ftp_wtime$"
|
||||||
|
description = "Response time to result in warning status (seconds)."
|
||||||
|
}
|
||||||
|
"-c" = {
|
||||||
|
value = "$ftp_ctime$"
|
||||||
|
description = "Response time to result in critical status (seconds)."
|
||||||
|
}
|
||||||
|
"-t" = {
|
||||||
|
value = "$ftp_timeout$"
|
||||||
|
description = "Seconds before connection times out. Defaults to 10."
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
vars.ftp_address = "$check_address$"
|
vars.ftp_address = "$check_address$"
|
||||||
|
vars.ftp_ssl = false
|
||||||
|
vars.ftp_refuse = "crit"
|
||||||
|
vars.ftp_mismatch = "warn"
|
||||||
|
vars.ftp_timeout = 10
|
||||||
}
|
}
|
||||||
|
|
||||||
object CheckCommand "smtp" {
|
object CheckCommand "smtp" {
|
||||||
|
|
Loading…
Reference in New Issue