Module: check_mk
Branch: master
Commit: 611b64cbd79b5c27f19a6c442e620949a7b4bb7c
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=611b64cbd79b5c…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Mon Apr 25 18:45:56 2016 +0200
3427 FIX mssql_counters.sqlstats: fixed rate calculation
---
.werks/3427 | 10 ++++++++++
ChangeLog | 1 +
checks/mssql_counters | 3 ++-
3 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/.werks/3427 b/.werks/3427
new file mode 100644
index 0000000..4c57cb4
--- /dev/null
+++ b/.werks/3427
@@ -0,0 +1,10 @@
+Title: mssql_counters.sqlstats: fixed rate calculation
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.9i1
+Date: 1461602704
+
+
diff --git a/ChangeLog b/ChangeLog
index f3617a4..3eb46b4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -185,6 +185,7 @@
* 3523 FIX: esx_vsphere_hostsystem: fixed exception when no multipath state info is
available
* 3425 FIX: Fixed extra section handling if no related check plugin exists
* 3465 FIX: df: Fix displayed vertical range of graph of all filesystem checks...
+ * 3427 FIX: mssql_counters.sqlstats: fixed rate calculation
Multisite:
* 3187 notification view: new filter for log command via regex
diff --git a/checks/mssql_counters b/checks/mssql_counters
index 7867eff..5bb9861 100644
--- a/checks/mssql_counters
+++ b/checks/mssql_counters
@@ -244,7 +244,8 @@ def check_mssql_counters_sqlstats(item, params, info):
for line in info:
if mssql_counters_item(line, True) == item:
counter_type = item.split()[-1]
- rate = float(line[-1])
+ rate = get_rate("mssql_counters_sqlstats.%s.%s" % \
+ (counter_type, item), time.time(), float(line[-1]))
status = 0
infotext = "%.1f/sec" % rate