From: Jean-Louis Dupond Date: Mon, 24 Oct 2016 12:56:38 +0000 (+0200) Subject: ITL: Add sudo option for mailq CheckCommand X-Git-Tag: v2.6.0~14 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8cb7a54b8968255bd290822f92a0bbec8f3af6dd;p=icinga2 ITL: Add sudo option for mailq CheckCommand fixes #13435 Signed-off-by: Michael Friedrich --- 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" + } } }