]> granicus.if.org Git - icinga2/commitdiff
ITL: Add check command check_mailq
authorLennart Betz <lennart.betz@netways.de>
Sun, 2 Aug 2015 09:54:25 +0000 (11:54 +0200)
committerMichael Friedrich <michael.friedrich@netways.de>
Mon, 3 Aug 2015 14:37:59 +0000 (16:37 +0200)
fixes #9811

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

index fb94811b1ef75d060e64ff1e44bb4e83d2257c80..6901896f897c60fda0a4d27fc8d96d4ca5e509e9 100644 (file)
@@ -925,6 +925,22 @@ clamd_ctime          | **Optional.** Response time to result in critical status
 clamd_timeout        | **Optional.** Seconds before connection times out. Defaults to 10.
 
 
+## <a id="plugin-check-command-mailq"></a> mailq
+
+Check command object for the `check_mailq` plugin.
+
+Custom attributes passed as [command parameters](3-monitoring-basics.md#command-passing-parameters):
+
+Name                    | Description
+------------------------|--------------
+mailq_warning          | **Required.** Min. number of messages in queue to generate warning.
+mailq_critical         | **Required.** Min. number of messages in queue to generate critical alert ( w < c ).
+mailq_domain_warning   | **Optional.** Min. number of messages for same domain in queue to generate warning
+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).
+
+
 # <a id="windows-plugins"></a>Icinga 2 Windows plugins
 
 To allow a basic monitoring of Windows clients Icinga 2 comes with a set of Windows only plugins. While trying to mirror the functionalities of their linux cousins from the monitoring-plugins package, the differences between Windows and Linux are too big to be able use the same CheckCommands for both systems.
index 8930c580e891fcccf19d9c6e8c2b9a0c2e7e73b4..2674979c0d91e20eb9233cca7841bc388610c1f8 100644 (file)
@@ -1514,3 +1514,38 @@ object CheckCommand "clamd" {
        vars.clamd_mismatch = "warn"
        vars.clamd_timeout = 10
 }
+
+object CheckCommand "mailq" {
+       import "plugin-check-command"
+
+       command = [ PluginDir + "/check_mailq" ]
+
+       arguments = {
+               "-w" = {
+                       value = "$mailq_warning$"
+                       description = "Min. number of messages in queue to generate warning"
+                       required = true
+               }
+               "-c" = {
+                       value = "$mailq_critical$"
+                       description = "Min. number of messages in queue to generate critical alert ( w < c )"
+                       required = true
+               }
+               "-W" = {
+                       value = "$mailq_domain_warning$"
+                       description = "Min. number of messages for same domain in queue to generate warning"
+               }
+               "-C" = {
+                       value = "$mailq_domain_critical$"
+                       description = "Min. number of messages for same domain in queue to generate critical alert ( W < C )"
+               }
+               "-t" = {
+                       value = "$mailq_timeout$"
+                       description = "Plugin timeout in seconds (default = 15)"
+               }
+               "-M" = {
+                       value = "$mailq_servertype$"
+                       description = "[ sendmail | qmail | postfix | exim | nullmailer ] (default = autodetect)"
+               }
+       }
+}