]> granicus.if.org Git - icinga2/commitdiff
ITL: Add sudo option for mailq CheckCommand
authorJean-Louis Dupond <jean-louis@dupond.be>
Mon, 24 Oct 2016 12:56:38 +0000 (14:56 +0200)
committerMichael Friedrich <michael.friedrich@icinga.com>
Tue, 6 Dec 2016 17:03:46 +0000 (18:03 +0100)
fixes #13435

Signed-off-by: Michael Friedrich <michael.friedrich@icinga.com>
doc/10-icinga-template-library.md
itl/command-plugins.conf

index 67fdf4c05bb4f8ef61093b65353df74195579eab..9b3c1a8565ecf37f16b76eafa0f20995621e68b8 100644 (file)
@@ -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.
 
 ### <a id="plugin-check-command-mysql"></a> mysql
 
index cacabd11806b6e798679f476c5521ac4554e4096..6f8515b7f8ab49936ebaaff76ebe9354ef20646d 100644 (file)
@@ -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"
+               }
        }
 }