diff --git a/doc/7-icinga-template-library.md b/doc/7-icinga-template-library.md
index fb94811b1..6901896f8 100644
--- a/doc/7-icinga-template-library.md
+++ b/doc/7-icinga-template-library.md
@@ -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.
+## 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 8930c580e..2674979c0 100644
--- a/itl/command-plugins.conf
+++ b/itl/command-plugins.conf
@@ -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)"
+ }
+ }
+}