From 60fafcb18d707e5a65f1ea123531ab810be266d6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lorenz=20K=C3=A4stle?=
<12514511+RincewindsHat@users.noreply.github.com>
Date: Wed, 9 Jul 2025 15:24:11 +0200
Subject: [PATCH] Add plain fping CheckCommand to ITL
---
doc/10-icinga-template-library.md | 25 +++++++++++++++++++++++++
itl/command-plugins.conf | 7 +++++++
2 files changed, 32 insertions(+)
diff --git a/doc/10-icinga-template-library.md b/doc/10-icinga-template-library.md
index 54b17b15e..003198cf0 100644
--- a/doc/10-icinga-template-library.md
+++ b/doc/10-icinga-template-library.md
@@ -510,6 +510,31 @@ Name | Description
flexlm_licensefile | **Required.** Name of license file (usually license.dat).
flexlm_timeout | **Optional.** Plugin time out in seconds. Defaults to 15.
+### fping
+
+The [check_fping](https://www.monitoring-plugins.org/doc/man/check_fping.html) plugin
+uses the `fping` command to ping the specified host for a fast check. Note that it is
+necessary to set the `suid` flag on `fping`.
+
+This CheckCommand is agnostic on whether it receives a resolvable name, IPv6 address oder legacy IP address.
+
+Custom variables passed as [command parameters](03-monitoring-basics.md#command-passing-parameters):
+
+Name | Description
+----------------|--------------
+fping_address | **Optional.** The host's IP address (v6 or v4). Defaults to "$address6$" or "$address$" (in that order).
+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.
+fping_extra_opts | **Optional.** Read extra plugin options from an ini file.
+
### fping4
diff --git a/itl/command-plugins.conf b/itl/command-plugins.conf
index ed8fa5b3c..6069e0995 100644
--- a/itl/command-plugins.conf
+++ b/itl/command-plugins.conf
@@ -151,6 +151,13 @@ template CheckCommand "fping-common" {
vars.fping_interval = 500
}
+object CheckCommand "fping" {
+ import "fping-common"
+ import "ipv4-or-ipv6"
+
+ vars.fping_address = "$check_address$"
+}
+
object CheckCommand "fping4" {
import "fping-common"