From f32cb6e4548c0ece1c547885df529cc83f7472d2 Mon Sep 17 00:00:00 2001 From: Lennart Betz Date: Sun, 2 Aug 2015 11:54:25 +0200 Subject: [PATCH] ITL: Add check command check_mailq fixes #9811 Signed-off-by: Michael Friedrich --- doc/7-icinga-template-library.md | 16 +++++++++++++++ itl/command-plugins.conf | 35 ++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) diff --git a/doc/7-icinga-template-library.md b/doc/7-icinga-template-library.md index 9d2a0be41..2f28036f5 100644 --- a/doc/7-icinga-template-library.md +++ b/doc/7-icinga-template-library.md @@ -922,6 +922,22 @@ clamd_ctime | **Optional.** Response time to result in critical status clamd_timeout | **Optional.** Seconds before connection times out. Defaults to 10. +## 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). + + # 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. diff --git a/itl/command-plugins.conf b/itl/command-plugins.conf index da28c31ab..21626656b 100644 --- a/itl/command-plugins.conf +++ b/itl/command-plugins.conf @@ -1521,3 +1521,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)" + } + } +}