Module: check_mk
Branch: master
Commit: ed0802b0a2207c07ebb285d43036f0f13b8094a8
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ed0802b0a2207c…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Jan 31 12:31:55 2018 +0100
Converted legacy perfometer for MQ queues to new format
Change-Id: I5a217f03de6d21e159d792c7d26d4da568f8a1b0
---
web/plugins/metrics/check_mk.py | 20 ++++++++++++++++++++
web/plugins/perfometer/check_mk.py | 8 --------
2 files changed, 20 insertions(+), 8 deletions(-)
diff --git a/web/plugins/metrics/check_mk.py b/web/plugins/metrics/check_mk.py
index a66f56f..d16dcb8 100644
--- a/web/plugins/metrics/check_mk.py
+++ b/web/plugins/metrics/check_mk.py
@@ -4157,6 +4157,12 @@ metric_info["quarantine"] = {
"color" : "43/b",
}
+metric_info["messages_in_queue"] = {
+ "title" : _("Messages in queue"),
+ "unit" : "count",
+ "color" : "#701141",
+}
+
metric_info["mail_queue_hold_length"] = {
"title" : _("Length of hold mail queue"),
"unit" : "count",
@@ -5090,6 +5096,13 @@ check_metrics["check_mk-cups_queues"] = {
"jobs" : { "name" : "printer_queue" }
}
+mq_translation = {
+ "queue" : { "name" : "messages_in_queue" }
+}
+check_metrics['check_mk-mq_queues'] = mq_translation
+check_metrics['check_mk-websphere_mq_channels'] = mq_translation
+check_metrics['check_mk-websphere_mq_queues'] = mq_translation
+
check_metrics["check_mk-printer_pages"] = {
"pages" : { "name" : "pages_total" }
}
@@ -6465,6 +6478,13 @@ perfometer_info.append({
'exponent' : 2.0,
})
+perfometer_info.append({
+ 'type' : 'logarithmic',
+ 'metric' : 'messages_in_queue',
+ 'half_value': 1.0,
+ 'exponent' : 2.0,
+})
+
#.
# .--Graphs--------------------------------------------------------------.
# | ____ _ |
diff --git a/web/plugins/perfometer/check_mk.py b/web/plugins/perfometer/check_mk.py
index 3812978..db5835a 100644
--- a/web/plugins/perfometer/check_mk.py
+++ b/web/plugins/perfometer/check_mk.py
@@ -836,14 +836,6 @@ def perfometer_esx_vsphere_hostsystem_cpu(row, command, perf):
perfometers['check_mk-esx_vsphere_hostsystem.cpu_usage'] =
perfometer_esx_vsphere_hostsystem_cpu
-def perfometer_mq_queues(row, command, perf):
- size = int(perf[0][1])
- return "%s Messages" % size, perfometer_logarithmic(size, 1, 2,
"#701141")
-
-perfometers['check_mk-mq_queues'] = perfometer_mq_queues
-perfometers['check_mk-websphere_mq_channels'] = perfometer_mq_queues
-perfometers['check_mk-websphere_mq_queues'] = perfometer_mq_queues
-
def perfometer_apc_mod_pdu_modules(row, check_command, perf_data):
value = int(savefloat(perf_data[0][1]) * 100)
return "%skw" % perf_data[0][1], perfometer_logarithmic(value, 500, 2,
"#3366CC")