diff --git a/doc/6-configuring-icinga-2.md b/doc/6-configuring-icinga-2.md index 732b2fe65..25810dab2 100644 --- a/doc/6-configuring-icinga-2.md +++ b/doc/6-configuring-icinga-2.md @@ -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). +#### 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. + +#### 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. + + #### dummy Check command object for the `check_dummy` plugin. diff --git a/itl/command-plugins.conf b/itl/command-plugins.conf index b9b7af944..dc9ebc868 100644 --- a/itl/command-plugins.conf +++ b/itl/command-plugins.conf @@ -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"