Module: check_mk
Branch: master
Commit: ec8838e58b9763de5f0f43044bd4c5df8633bf06
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ec8838e58b9763…
Author: Konstantin Büttner <kb(a)mathias-kettner.de>
Date: Mon Aug 1 17:20:08 2016 +0200
mssql_counters.sqlstats: Time from counter instead of time.time()
---
checks/mssql_counters | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/checks/mssql_counters b/checks/mssql_counters
index 4d22632..71ab47d 100644
--- a/checks/mssql_counters
+++ b/checks/mssql_counters
@@ -247,11 +247,14 @@ check_info['mssql_counters.locks'] = {
def check_mssql_counters_sqlstats(item, params, info):
+ now = mssql_time_from_counter(info)
+ if now is None:
+ now = time.time()
for line in info:
if mssql_counters_item(line, True) == item:
counter_type = item.split()[-1]
rate = get_rate("mssql_counters_sqlstats.%s.%s" % \
- (counter_type, item), time.time(), float(line[-1]))
+ (counter_type, item), now, float(line[-1]))
status = 0
infotext = "%.1f/sec" % rate