]> granicus.if.org Git - icinga2/commitdiff
Plugins: add fping4/6 commands
authorMichael Friedrich <michael.friedrich@netways.de>
Wed, 18 Jun 2014 17:26:18 +0000 (19:26 +0200)
committerMichael Friedrich <michael.friedrich@netways.de>
Wed, 18 Jun 2014 17:26:18 +0000 (19:26 +0200)
refs #6225

doc/6-configuring-icinga-2.md
itl/command-plugins.conf

index 732b2fe6522ad5457fb9d9e468ed79ab383ab33e..25810dab22170a7b36f42c3234efda06b58c8f94 100644 (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.
index b9b7af9446381b53adc495de4cf40f03c8407003..dc9ebc8688c769a97daf63fdb1cf2f8db8ad0eae 100644 (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"