Module: check_mk
Branch: master
Commit: 89d3fad17dfce6b63e82e3d86d144a33dedf078c
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=89d3fad17dfce6…
Author: Sven Rueß <sr(a)mathias-kettner.de>
Date: Fri Jun 3 16:33:05 2016 +0200
2238 FIX postfix_mailq: Fixed incorrect creation of RRDs, Fixed graphs of size and length
of queues
Postfix mail queue check creates incorrect rrd data sources. This results in a lot of
unnecessary rrd files.
You can delete those files to save hard disc space. But keep in mind, that you will loose
the historic
data. Graphs can have areas with missing data.
Those files are stored at following locations:
<ul>
<li>~/var/check_mk/rrd</li>
<li>~/var/pnp4nagios/perfdata</li>
</ul>
You can delete those files with those commands:
<code>
find ~/var/check_mk/rrd -type f -iname "postfix_mail_queue_*_size*" -exec rm
'{}' \;
find ~/var/pnp4nagios/perfdata -type f -iname "postfix_mail_queue_*_size*"
-exec rm '{}' \;
</code>
If you have set up a new monitoring site with version 1.2.8, there are multi RRDs in use.
If you want to clean up those files, please contact us with via your support address.
The graphs of size and length of the queues have been adapted to correct this mistake.
All several performance data is collected in one graph.
---
.werks/2238 | 31 +++++++++++++++++++++++++++
ChangeLog | 1 +
checks/postfix_mailq | 2 +-
web/plugins/metrics/check_mk.py | 45 ++++++++++++++++++++++++++++-----------
4 files changed, 66 insertions(+), 13 deletions(-)
diff --git a/.werks/2238 b/.werks/2238
new file mode 100644
index 0000000..5881b07
--- /dev/null
+++ b/.werks/2238
@@ -0,0 +1,31 @@
+Title: postfix_mailq: Fixed incorrect creation of RRDs, Fixed graphs of size and length
of queues
+Level: 2
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.9i1
+Date: 1464959618
+
+Postfix mail queue check creates incorrect rrd data sources. This results in a lot of
unnecessary rrd files.
+
+You can delete those files to save hard disc space. But keep in mind, that you will loose
the historic
+data. Graphs can have areas with missing data.
+
+Those files are stored at following locations:
+<ul>
+ <li>~/var/check_mk/rrd</li>
+ <li>~/var/pnp4nagios/perfdata</li>
+</ul>
+
+You can delete those files with those commands:
+<code>
+ find ~/var/check_mk/rrd -type f -iname "postfix_mail_queue_*_size*" -exec rm
'{}' \;
+ find ~/var/pnp4nagios/perfdata -type f -iname "postfix_mail_queue_*_size*"
-exec rm '{}' \;
+</code>
+
+If you have set up a new monitoring site with version 1.2.8, there are multi RRDs in
use.
+If you want to clean up those files, please contact us with via your support address.
+
+The graphs of size and length of the queues have been adapted to correct this mistake.
+All several performance data is collected in one graph.
diff --git a/ChangeLog b/ChangeLog
index 304012e..e501858 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -256,6 +256,7 @@
* 3584 FIX: check_mkevents: Fixed "failed to parse perfdata" errors in
web.log caused by "Events" checks...
* 3587 FIX: SNMP: Fixed possible random IO issues when using classic SNMP...
* 3619 FIX: esx_vsphere_vm.mem_usage: add missing declaration for metrics, use
correct unit
+ * 2238 FIX: postfix_mailq: Fixed incorrect creation of RRDs, Fixed graphs of size and
length of queues...
Multisite:
* 3187 notification view: new filter for log command via regex
diff --git a/checks/postfix_mailq b/checks/postfix_mailq
index 619427d..19addc4 100644
--- a/checks/postfix_mailq
+++ b/checks/postfix_mailq
@@ -110,7 +110,7 @@ def check_postfix_mailq(_no_item, params, info):
size_var = "size"
else:
length_var = "mail_queue_%s_length" % queue
- size_var = "mail_queue_%s_size" % size
+ size_var = "mail_queue_%s_size" % queue
if queue in params:
warn, crit = params[queue]
if length >= crit:
diff --git a/web/plugins/metrics/check_mk.py b/web/plugins/metrics/check_mk.py
index d7c0be8..170aac6 100644
--- a/web/plugins/metrics/check_mk.py
+++ b/web/plugins/metrics/check_mk.py
@@ -2262,28 +2262,34 @@ metric_info["call_legs"] = {
"color" : "#60bbbb",
}
+metric_info["mails_received_time"] = {
+ "title" : _("Received mails"),
+ "unit" : "s",
+ "color" : "31/a",
+}
+
metric_info["mail_queue_deferred_length"] = {
"title" : _("Length of deferred mail queue"),
"unit" : "count",
"color" : "#40a0b0",
}
-metric_info["mails_received_time"] = {
- "title" : _("Received mails"),
- "unit" : "s",
- "color" : "31/a",
+metric_info["mail_queue_active_length"] = {
+ "title" : _("Length of active mail queue"),
+ "unit" : "count",
+ "color" : "#ff6000",
}
metric_info["mail_queue_deferred_size"] = {
"title" : _("Size of deferred mail queue"),
"unit" : "bytes",
- "color" : "#402010",
+ "color" : "43/a",
}
-metric_info["mail_queue_active_length"] = {
- "title" : _("Length of active mail queue"),
- "unit" : "count",
- "color" : "#ff6000",
+metric_info["mail_queue_active_size"] = {
+ "title" : _("Size of active mail queue"),
+ "unit" : "bytes",
+ "color" : "31/a",
}
metric_info["messages_inbound"] = {
@@ -3487,6 +3493,13 @@ check_metrics["check_mk-citrix_serverload"] = {
"perf" : { "name" : "citrix_load", "scale" :
0.01 }
}
+check_metrics["check_mk-postfix_mailq"] = {
+ "length" : { "name" :
"mail_queue_deferred_length" },
+ "size" : { "name" :
"mail_queue_deferred_size" },
+ "~mail_queue_.*_size" : { "name" :
"mail_queue_active_size" },
+ "~mail_queue_.*_length" : { "name" :
"mail_queue_active_length" },
+}
+
check_metrics["check-mk-host-tcp"] = {
"time" : { "name": "response_time" }
}
@@ -6486,10 +6499,18 @@ graph_info.append({
})
graph_info.append({
- "title" : _("Outgoing Mails"),
+ "title" : _("Amount of mails in queues"),
+ "metrics" : [
+ ( "mail_queue_deferred_length", "stack" ),
+ ( "mail_queue_active_length", "stack" ),
+ ],
+})
+
+graph_info.append({
+ "title" : _("Size of mails in queues"),
"metrics" : [
- ( "mail_queue_deferred_length", "stack" ),
- ( "mail_queue_active_length", "stack" ),
+ ( "mail_queue_deferred_size", "stack" ),
+ ( "mail_queue_active_size", "stack" ),
],
})