[icinga-checkins] icinga.org: icinga2/next: Plugins: add fping4/6 commands

git at icinga.org git at icinga.org
Wed Jun 18 19:26:47 CEST 2014


Module: icinga2
Branch: next
Commit: a277e2dc3f9f7482317fbe25e706b83393835cb4
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=a277e2dc3f9f7482317fbe25e706b83393835cb4

Author: Michael Friedrich <michael.friedrich at netways.de>
Date:   Wed Jun 18 19:26:18 2014 +0200

Plugins: add fping4/6 commands

refs #6225

---

 doc/6-configuring-icinga-2.md |   41 ++++++++++++++++++++++++++++++++++++
 itl/command-plugins.conf      |   46 +++++++++++++++++++++++++++++++++++++++++
 2 files changed, 87 insertions(+)

diff --git a/doc/6-configuring-icinga-2.md b/doc/6-configuring-icinga-2.md
index 732b2fe..25810da 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).
 
+#### <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.
diff --git a/itl/command-plugins.conf b/itl/command-plugins.conf
index b9b7af9..dc9ebc8 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"
 



More information about the icinga-checkins mailing list