Plugins: add fping4/6 commands

refs #6225
This commit is contained in:
Michael Friedrich 2014-06-18 19:26:18 +02:00
parent d8cc127768
commit a277e2dc3f
2 changed files with 87 additions and 0 deletions

View File

@ -1801,6 +1801,47 @@ ping_cpl | **Optional.** The packet loss critical threshold in %. Default
ping_packets | **Optional.** The number of packets to send. Defaults to 5.
ping_timeout | **Optional.** The plugin timeout in seconds. Defaults to 0 (no timeout).
#### <a id="plugin-check-command-fping4"></a> fping4
Check command object for the `check_fping` plugin.
Custom Attributes:
Name | Description
----------------|--------------
fping_address | **Optional.** The host's IPv4 address. Defaults to "$address$".
fping_wrta | **Optional.** The RTA warning threshold in milliseconds. Defaults to 100.
fping_wpl | **Optional.** The packet loss warning threshold in %. Defaults to 5.
fping_crta | **Optional.** The RTA critical threshold in milliseconds. Defaults to 200.
fping_cpl | **Optional.** The packet loss critical threshold in %. Defaults to 15.
fping_number | **Optional.** The number of packets to send. Defaults to 5.
fping_interval | **Optional.** The interval between packets in milli-seconds. Defaults to 500.
fping_bytes | **Optional.** The size of ICMP packet.
fping_target_timeout | **Optional.** The target timeout in milli-seconds.
fping_source_ip | **Optional.** The name or ip address of the source ip.
fping_source_interface | **Optional.** The source interface name.
#### <a id="plugin-check-command-fping6"></a> fping6
Check command object for the `check_fping` plugin.
Custom Attributes:
Name | Description
----------------|--------------
fping_address | **Optional.** The host's IPv6 address. Defaults to "$address6$".
fping_wrta | **Optional.** The RTA warning threshold in milliseconds. Defaults to 100.
fping_wpl | **Optional.** The packet loss warning threshold in %. Defaults to 5.
fping_crta | **Optional.** The RTA critical threshold in milliseconds. Defaults to 200.
fping_cpl | **Optional.** The packet loss critical threshold in %. Defaults to 15.
fping_number | **Optional.** The number of packets to send. Defaults to 5.
fping_interval | **Optional.** The interval between packets in milli-seconds. Defaults to 500.
fping_bytes | **Optional.** The size of ICMP packet.
fping_target_timeout | **Optional.** The target timeout in milli-seconds.
fping_source_ip | **Optional.** The name or ip address of the source ip.
fping_source_interface | **Optional.** The source interface name.
#### <a id="plugin-check-command-dummy"></a> dummy
Check command object for the `check_dummy` plugin.

View File

@ -64,6 +64,52 @@ object CheckCommand "hostalive" {
vars.ping_cpl = 100
}
template CheckCommand "fping-common" {
import "plugin-check-command"
command = [ PluginDir + "/check_fping" ]
arguments = {
"host" = {
value = "$fping_address$"
skip_key = true
order = 0
}
"-w" = "$fping_wrta$,$fping_wpl$%"
"-c" = "$fping_crta$,$fping_cpl$%"
"-n" = "$fping_number$"
"-i" = "$fping_interval$"
"-b" = "$fping_bytes$"
"-T" = "$fping_target_timeout$"
"-S" = "$fping_source_ip$"
"-I" = "$fping_source_interface$"
}
vars.fping_wrta = 100
vars.fping_wpl = 5
vars.fping_crta = 200
vars.fping_cpl = 15
vars.fping_number = 5
vars.fping_interval = 500
}
object CheckCommand "fping4" {
import "fping-common"
command += [ "-4" ]
vars.fping_address = "$address$"
}
object CheckCommand "fping6" {
import "fping-common"
command += [ "-6" ]
vars.fping_address = "$address6$"
}
object CheckCommand "dummy" {
import "plugin-check-command"