Module: check_mk
Branch: master
Commit: 1bfca7ac646ac695a0792307280f61541d286cd4
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1bfca7ac646ac6…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Jun 22 11:12:45 2012 +0200
MSSQL: Added perfometer for cache hit counter check
---
web/plugins/perfometer/check_mk.py | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/web/plugins/perfometer/check_mk.py b/web/plugins/perfometer/check_mk.py
index 525cfb8..2cba0db 100644
--- a/web/plugins/perfometer/check_mk.py
+++ b/web/plugins/perfometer/check_mk.py
@@ -454,3 +454,14 @@ def perfometer_mssql_tablespaces(row, check_command, perf_data):
return "%.1f%%" % (data_perc + indexes_perc), h
perfometers["check_mk-mssql_tablespaces"] = perfometer_mssql_tablespaces
+
+def perfometer_mssql_counters_cache_hits(row, check_command, perf_data):
+ perc = float(perf_data[0][1])
+
+ h = '<table><tr>'
+ h += perfometer_td(perc, "#69EA96");
+ h += perfometer_td(100 - perc, "#ffffff");
+ h += '</tr></table>'
+ return "%.1f%%" % perc, h
+
+perfometers["check_mk-mssql_counters.cache_hits"] =
perfometer_mssql_counters_cache_hits