Module: check_mk
Branch: master
Commit: 8921c5dd319fdfe7681a6c09a689e4d7fc579460
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8921c5dd319fdf…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Mon Sep 18 12:29:25 2017 +0200
5287 FIX postfix_mailq: Fixed parameter handling
In previous check version mail and deferred queue had same parameters.
Change-Id: I8547512dd7907ea9657d3dc21fb00159c71ddb4e
---
.werks/5287 | 11 +++++++++++
checks/postfix_mailq | 5 +++--
2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/.werks/5287 b/.werks/5287
new file mode 100644
index 0000000..cf7e70b
--- /dev/null
+++ b/.werks/5287
@@ -0,0 +1,11 @@
+Title: postfix_mailq: Fixed parameter handling
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.5.0i1
+Date: 1505730469
+
+In previous check version mail and deferred queue had same parameters.
diff --git a/checks/postfix_mailq b/checks/postfix_mailq
index 99213a4..6848558 100644
--- a/checks/postfix_mailq
+++ b/checks/postfix_mailq
@@ -153,10 +153,11 @@ def check_postfix_mailq(item, params, parsed):
params = { "deferred" : params }
for what, size, length in parsed[item]:
- warn, crit = params.get(what, (None, None))
+ # In previous check version mail and deferred had same params
+ warn, crit = params.get({"mail": "deferred"}.get(what, what),
(None, None))
if what in [ "active", "deferred", "mail" ]:
state = 0
- infotext = "%s%s queue length: %d" % (what[0].upper(), what[1:],
length)
+ infotext = "%s queue length: %d" % (what.title(), length)
if what in [ "deferred", "mail" ]:
length_var = "length"