From f8bcc9c83fc03c8a1777d693bed33cd1916a352b Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Thu, 5 Feb 2015 17:05:00 +0100 Subject: [PATCH] Add command definition for check_icmp fixes #7873 --- doc/6-icinga-template-library.md | 24 +++++++++++++++++++++++- itl/command-plugins.conf | 29 +++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 1 deletion(-) diff --git a/doc/6-icinga-template-library.md b/doc/6-icinga-template-library.md index a102cd6ed..a8020a9bb 100644 --- a/doc/6-icinga-template-library.md +++ b/doc/6-icinga-template-library.md @@ -627,7 +627,29 @@ hpjd_address | **Optional.** The host's address. Defaults to "$address$". hpjd_port | **Optional.** The host's SNMP port. Defaults to 161. hpjd_community | **Optional.** The SNMP community. Defaults to "public". -# + +### icmp + +Check command object for the `check_icmp` plugin. + +Custom Attributes: + +Name | Description +----------------|-------------- +icmp_address | **Optional.** The host's address. This can either be a single address or an array of addresses. Defaults to "$address$". +icmp_wrta | **Optional.** The RTA warning threshold in milliseconds. Defaults to 100. +icmp_wpl | **Optional.** The packet loss warning threshold in %. Defaults to 5. +icmp_crta | **Optional.** The RTA critical threshold in milliseconds. Defaults to 200. +icmp_cpl | **Optional.** The packet loss critical threshold in %. Defaults to 15. +icmp_source | **Optional.** The source IP address to send packets from. +icmp_packets | **Optional.** The number of packets to send. Defaults to 5. +icmp_packet_interval | **Optional** The maximum packet interval. Defaults to 80 (milliseconds). +icmp_target_interval | **Optional.** The maximum target interval. +icmp_hosts_alive | **Optional.** The number of hosts which have to be alive for the check to succeed. +icmp_data_bytes | **Optional.** Payload size for each ICMP request. Defaults to 8. +icmp_timeout | **Optional.** The plugin timeout in seconds. Defaults to 10 (seconds). + + ### running_kernel Check command object for the `check_running_kernel` plugin diff --git a/itl/command-plugins.conf b/itl/command-plugins.conf index 36fdcc33a..7ff94e81a 100644 --- a/itl/command-plugins.conf +++ b/itl/command-plugins.conf @@ -899,6 +899,35 @@ object CheckCommand "hpjd" { vars.hpjd_address = "$address$" } +object CheckCommand "icmp" { + import "plugin-check-command" + + command = [ PluginDir + "/check_icmp" ] + + arguments = { + "-H" = { + value = "$icmp_address$" + repeat_key = false + order = 1 + } + "-w" = "$icmp_wrta$,$icmp_wpl$%" + "-c" = "$icmp_crta$,$icmp_cpl$%" + "-s" = "$icmp_source$" + "-n" = "$icmp_packets$" + "-i" = "$icmp_packet_interval$" + "-I" = "$icmp_target_interval$" + "-m" = "$icmp_hosts_alive$" + "-b" = "$icmp_data_bytes$" + "-t" = "$icmp_timeout$" + } + + vars.icmp_address = "$address$" + vars.icmp_wrta = 100 + vars.icmp_wpl = 5 + vars.icmp_crta = 200 + vars.icmp_cpl = 15 +} + /* Contrib plugins */ object CheckCommand "running_kernel" { import "plugin-check-command"