Skip to content

Commit 1d93d57

Browse files
committed
chore(mailq): regenerate Director basket for #781
Picks up the new --mta=auto|postfix|exim|sendmail parameter (with a DataList for the four choices) and the changed --warning / --critical defaults (1h / 3D, duration strings instead of mail counts). Notes field re-rendered from the updated DESCRIPTION. Existing Icinga services that override mailq_warning / mailq_critical to integer mail counts (e.g. 2 / 250) need to be migrated to duration strings; see the Breaking Changes section in the CHANGELOG.
1 parent 7258c2e commit 1d93d57

File tree

1 file changed

+60
-5
lines changed
  • check-plugins/mailq/icingaweb2-module-director

1 file changed

+60
-5
lines changed

check-plugins/mailq/icingaweb2-module-director/mailq.json

Lines changed: 60 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
"--critical": {
99
"value": "$mailq_critical$"
1010
},
11+
"--mta": {
12+
"value": "$mailq_mta$"
13+
},
1114
"--warning": {
1215
"value": "$mailq_warning$"
1316
}
@@ -29,6 +32,11 @@
2932
"datafield_id": 3,
3033
"is_required": "n",
3134
"var_filter": null
35+
},
36+
{
37+
"datafield_id": 4,
38+
"is_required": "n",
39+
"var_filter": null
3240
}
3341
],
3442
"imports": [],
@@ -72,7 +80,7 @@
7280
"tpl-service-generic"
7381
],
7482
"max_check_attempts": 5,
75-
"notes": "Checks the number of messages in the mail queue using the \"mailq\" command. Alerts when the queue length exceeds the configured thresholds.",
83+
"notes": "Checks how long the oldest mail in the local mail queue has been waiting and alerts when it exceeds the configured duration thresholds. On hosts with Postfix, reads the queue via `postqueue -j` (JSON, with `arrival_time` as Unix epoch) for maximum accuracy. On Exim hosts, reads `mailq` (which is aliased to `exim -bp` by exim) and parses the age literal that exim prints next to each queued message. On other hosts, falls back to running `mailq` and parsing `Date:` lines from the output. A non-empty queue with 100 mails that are all a few minutes old is still OK, while a single mail stuck for more than an hour triggers a WARN, which matches how most admins actually want to be alerted on a mail queue.",
7684
"notes_url": "https://linuxfabrik.github.io/monitoring-plugins/check-plugins/mailq/",
7785
"object_name": "tpl-service-mailq",
7886
"object_type": "template",
@@ -84,14 +92,48 @@
8492
"vars": {
8593
"criticality": "C",
8694
"mailq_always_ok": false,
87-
"mailq_critical": 250,
88-
"mailq_warning": 2
95+
"mailq_critical": "3D",
96+
"mailq_mta": "auto",
97+
"mailq_warning": "1h"
8998
},
9099
"volatile": null,
91100
"zone": null,
92101
"uuid": "ed0b2520-5428-494b-9a7c-54860bd1cecc"
93102
}
94103
},
104+
"DataList": {
105+
"mailq_mta_list": {
106+
"list_name": "mailq_mta_list",
107+
"owner": "icinga-admin",
108+
"entries": [
109+
{
110+
"entry_name": "auto",
111+
"entry_value": "Auto",
112+
"format": "string",
113+
"allowed_roles": null
114+
},
115+
{
116+
"entry_name": "postfix",
117+
"entry_value": "Postfix",
118+
"format": "string",
119+
"allowed_roles": null
120+
},
121+
{
122+
"entry_name": "exim",
123+
"entry_value": "Exim",
124+
"format": "string",
125+
"allowed_roles": null
126+
},
127+
{
128+
"entry_name": "sendmail",
129+
"entry_value": "Sendmail",
130+
"format": "string",
131+
"allowed_roles": null
132+
}
133+
],
134+
"uuid": "08085327-d955-406b-8745-c804ca15220a"
135+
}
136+
},
95137
"Datafield": {
96138
"1": {
97139
"varname": "mailq_always_ok",
@@ -105,7 +147,7 @@
105147
"2": {
106148
"varname": "mailq_critical",
107149
"caption": "Mailq: Critical",
108-
"description": "CRIT threshold for the number of mails in the queue.",
150+
"description": "CRIT threshold for the age of the oldest mail in the queue. Accepts a duration with a unit suffix (`Ns`, `Nm`, `Nh`, `ND`, `NW`, `NM`, `NY`, case-sensitive units). Example: `--critical=3D` to alert when the oldest mail has been in the queue for 3 days or more.",
109151
"datatype": "Icinga\\Module\\Director\\DataType\\DataTypeString",
110152
"format": null,
111153
"settings": {
@@ -114,9 +156,22 @@
114156
"uuid": "08ba1716-c276-4591-a718-3c6ab9b052e2"
115157
},
116158
"3": {
159+
"varname": "mailq_mta",
160+
"caption": "Mailq: Mta",
161+
"description": "Which mail transfer agent to query. The default `auto` probes for `postqueue` (Postfix), then `exim`/`exim4` (Exim), and falls back to `mailq` (Sendmail-style) otherwise. Override this if the detection picks the wrong MTA.",
162+
"datatype": "Icinga\\Module\\Director\\DataType\\DataTypeDatalist",
163+
"format": null,
164+
"settings": {
165+
"behavior": "strict",
166+
"data_type": "string",
167+
"datalist": "mailq_mta_list"
168+
},
169+
"uuid": "834e8c2c-2356-4207-ab7d-86ffdbc35696"
170+
},
171+
"4": {
117172
"varname": "mailq_warning",
118173
"caption": "Mailq: Warning",
119-
"description": "WARN threshold for the number of mails in the queue.",
174+
"description": "WARN threshold for the age of the oldest mail in the queue. Accepts a duration with a unit suffix (`Ns`, `Nm`, `Nh`, `ND`, `NW`, `NM`, `NY`, case-sensitive units). Example: `--warning=1h` to alert when the oldest mail has been in the queue for an hour or more.",
120175
"datatype": "Icinga\\Module\\Director\\DataType\\DataTypeString",
121176
"format": null,
122177
"settings": {

0 commit comments

Comments
 (0)