From 1e4c5cf2f22d8a959c3a305061d01f95005b7425 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Mon, 23 Feb 2015 13:54:18 +0100 Subject: [PATCH] Add more arguments for the 'udp' check command fixes #8410 --- doc/7-icinga-template-library.md | 3 +++ itl/command-plugins.conf | 12 ++++++++++++ 2 files changed, 15 insertions(+) diff --git a/doc/7-icinga-template-library.md b/doc/7-icinga-template-library.md index af5636a4d..96a18be0b 100644 --- a/doc/7-icinga-template-library.md +++ b/doc/7-icinga-template-library.md @@ -718,6 +718,9 @@ Name | Description ----------------|-------------- udp_address | **Optional.** The host's address. Defaults to "$address$" or "$address6$" if the `address` attribute is not set. udp_port | **Required.** The port that should be checked. +udp_send | **Required.** The payload to send in the UDP datagram. +udp_expect | **Required.** The payload to expect in the response datagram. +udp_quit | **Optional.** The payload to send to 'close' the session. ### ups diff --git a/itl/command-plugins.conf b/itl/command-plugins.conf index f0202f1c2..a543612e4 100644 --- a/itl/command-plugins.conf +++ b/itl/command-plugins.conf @@ -198,6 +198,18 @@ object CheckCommand "udp" { "-p", "$udp_port$" ] + arguments = { + "-s" = { + value = "$udp_send$" + required = true + } + "-e" = { + value = "$udp_expect$" + required = true + } + "-q" = "$udp_quit$" + } + vars.udp_address = "$check_address$" }