Add attributes to the "ftp" CheckCommand.

fixes #9146

Signed-off-by: Gunnar Beutner <gunnar@beutner.name>
This commit is contained in:
Tobias von der Krone 2015-04-21 18:53:18 +02:00 committed by Gunnar Beutner
parent 29a9977c82
commit 636bbcedca
2 changed files with 99 additions and 1 deletions

View File

@ -265,6 +265,23 @@ Custom Attributes:
Name | Description
-------------------|--------------
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

View File

@ -339,10 +339,91 @@ object CheckCommand "ftp" {
command = [ PluginDir + "/check_ftp" ]
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_ssl = false
vars.ftp_refuse = "crit"
vars.ftp_mismatch = "warn"
vars.ftp_timeout = 10
}
object CheckCommand "smtp" {