From 8cb7a54b8968255bd290822f92a0bbec8f3af6dd Mon Sep 17 00:00:00 2001 From: Jean-Louis Dupond Date: Mon, 24 Oct 2016 14:56:38 +0200 Subject: [PATCH] ITL: Add sudo option for mailq CheckCommand fixes #13435 Signed-off-by: Michael Friedrich --- doc/10-icinga-template-library.md | 1 + itl/command-plugins.conf | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/doc/10-icinga-template-library.md b/doc/10-icinga-template-library.md index 67fdf4c05..9b3c1a856 100644 --- a/doc/10-icinga-template-library.md +++ b/doc/10-icinga-template-library.md @@ -719,6 +719,7 @@ mailq_domain_warning | **Optional.** Min. number of messages for same domain in mailq_domain_critical | **Optional.** Min. number of messages for same domain in queue to generate critical alert ( W < C ). mailq_timeout | **Optional.** Plugin timeout in seconds (default = 15). mailq_servertype | **Optional.** [ sendmail \| qmail \| postfix \| exim \| nullmailer ] (default = autodetect). +mailq_sudo | **Optional.** Use sudo to execute the mailq command. ### mysql diff --git a/itl/command-plugins.conf b/itl/command-plugins.conf index cacabd118..6f8515b7f 100644 --- a/itl/command-plugins.conf +++ b/itl/command-plugins.conf @@ -1989,6 +1989,10 @@ object CheckCommand "mailq" { value = "$mailq_servertype$" description = "[ sendmail | qmail | postfix | exim | nullmailer ] (default = autodetect)" } + "-s" = { + set_if = "$mailq_sudo$" + description = "Use sudo for mailq command" + } } } -- 2.40.0