Module: check_mk
Branch: master
Commit: fac913e82b3c10ad21c4e9935d649395d2e4b35d
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=fac913e82b3c10…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Mon Jun 6 11:06:24 2016 +0200
3540 FIX Fixed exception on reading cachefiles
This fixes the Check_MK agent error <i>%d format: a number is required, not NoneType</i>
which was introduced in the last version.
---
.werks/3540 | 12 ++++++++++++
ChangeLog | 1 +
modules/check_mk_base.py | 2 +-
3 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/.werks/3540 b/.werks/3540
new file mode 100644
index 0000000..3b51078
--- /dev/null
+++ b/.werks/3540
@@ -0,0 +1,12 @@
+Title: Fixed exception on reading cachefiles
+Level: 2
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.9i1
+Date: 1465203854
+
+
+This fixes the Check_MK agent error <i>%d format: a number is required, not NoneType</i>
+which was introduced in the last version.
diff --git a/ChangeLog b/ChangeLog
index fcbe92e..56a5788 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -258,6 +258,7 @@
* 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...
* 3633 FIX: check_sql: minor cleanup in active check_sql, fixed performance data handling
+ * 3540 FIX: Fixed exception on reading cachefiles...
Multisite:
* 3187 notification view: new filter for log command via regex
diff --git a/modules/check_mk_base.py b/modules/check_mk_base.py
index 312f2dd..f64246f 100644
--- a/modules/check_mk_base.py
+++ b/modules/check_mk_base.py
@@ -680,7 +680,7 @@ def read_cache_file(relpath, max_cache_age):
return result
else:
vverbose("Skipping cache file %s: Too old "
- "(age is %d sec, allowed is %d sec)\n" %
+ "(age is %d sec, allowed is %s sec)\n" %
(cachefile, cachefile_age(cachefile), max_cache_age))
if simulation_mode and not opt_no_cache:
Module: check_mk
Branch: master
Commit: ee9d00b1104d455bd38b478a6f67676fc731a768
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ee9d00b1104d45…
Author: Sven Rueß <sr(a)mathias-kettner.de>
Date: Fri Jun 3 16:54:50 2016 +0200
Updated werk 2238
---
.werks/2238 | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.werks/2238 b/.werks/2238
index 5881b07..a0d9bd4 100644
--- a/.werks/2238
+++ b/.werks/2238
@@ -19,10 +19,10 @@ Those files are stored at following locations:
</ul>
You can delete those files with those commands:
-<code>
+C+:
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>
+C-:
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.
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" ),
],
})