Module: check_mk
Branch: master
Commit: 7bc4e8093154701e8736aa1af8115fd2b7950143
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7bc4e809315470…
Author: Sebastian Herbord <sh(a)mathias-kettner.de>
Date: Mon Jan 4 13:05:24 2016 +0100
msexch_database: fixed graph labels
---
checks/msexch_database | 14 +++++++++-----
web/plugins/metrics/check_mk.py | 26 ++++++++++++++++++++++++++
2 files changed, 35 insertions(+), 5 deletions(-)
diff --git a/checks/msexch_database b/checks/msexch_database
index f633d34..96deb4e 100644
--- a/checks/msexch_database
+++ b/checks/msexch_database
@@ -50,11 +50,15 @@ def inventory_msexch_database(parsed):
def check_msexch_database(item, params, parsed):
+ var_table = [
+ ("I/O Database Reads (Attached) Average Latency",
"read_attached_latency", "DB read (attached) latency",
"db_read_latency"),
+ ("I/O Database Reads (Recovery) Average Latency",
"read_recovery_latency", "DB read (recovery) latency",
"db_read_recovery_latency"),
+ ("I/O Database Writes (Attached) Average Latency",
"write_latency", "DB write (attached) latency",
"db_write_latency"),
+ ("I/O Log Writes Average Latency",
"log_latency", "Log latency",
"db_log_latency")
+ ]
+
if item in parsed:
- for counter, setting, name in [("I/O Database Reads (Attached) Average
Latency", "read_attached_latency", "DB read (attached)
latency"),
- ("I/O Database Reads (Recovery) Average
Latency", "read_recovery_latency", "DB read (recovery)
latency"),
- ("I/O Database Writes (Attached) Average
Latency", "write_latency", "DB write (attached)
latency"),
- ("I/O Log Writes Average Latency",
"log_latency", "Log latency")]:
+ for counter, setting, name, perfvar in var_table:
value = parsed[item][counter.lower()]
warn, crit = params[setting]
status = 0
@@ -62,7 +66,7 @@ def check_msexch_database(item, params, parsed):
status = 2
elif value >= warn:
status = 1
- yield status, "%.1fms %s" % (value, name), [(setting, value, warn,
crit)]
+ yield status, "%.1fms %s" % (value, name), [(perfvar, value, warn,
crit)]
check_info['msexch_database'] = {
diff --git a/web/plugins/metrics/check_mk.py b/web/plugins/metrics/check_mk.py
index 0ef6b0b..fdea84b 100644
--- a/web/plugins/metrics/check_mk.py
+++ b/web/plugins/metrics/check_mk.py
@@ -2691,6 +2691,32 @@ metric_info["time_in_GC"] = {
"color" : "16/a"
}
+metric_info["db_read_latency"] = {
+ "title" : _("Read latency"),
+ "unit" : "s",
+ "color" : "35/a",
+}
+
+metric_info["db_read_recovery_latency"] = {
+ "title" : _("Read recovery latency"),
+ "unit" : "s",
+ "color" : "31/a",
+}
+
+metric_info["db_write_latency"] = {
+ "title" : _("Write latency"),
+ "unit" : "s",
+ "color" : "45/a",
+}
+
+
+metric_info["db_log_latency"] = {
+ "title" : _("Log latency"),
+ "unit" : "s",
+ "color" : "25/a",
+}
+
+
#.
# .--Checks--------------------------------------------------------------.
# | ____ _ _ |