From 93f5b8cc4aaad22e8c2195a24c97884e5a5e5787 Mon Sep 17 00:00:00 2001 From: zensqlmonitor Date: Sat, 23 Apr 2016 09:14:04 +0200 Subject: [PATCH 1/2] Fix datatype conversion --- plugins/inputs/sqlserver/sqlserver.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/inputs/sqlserver/sqlserver.go b/plugins/inputs/sqlserver/sqlserver.go index 58d61705f3ec8..f91e66c24017c 100644 --- a/plugins/inputs/sqlserver/sqlserver.go +++ b/plugins/inputs/sqlserver/sqlserver.go @@ -1052,7 +1052,7 @@ SELECT When 1073874176 Then IsNull(Cast(cc.cntr_value - pc.cntr_value as Money) / NullIf(cbc.cntr_value - pbc.cntr_value, 0), 0) -- Avg When 272696320 Then IsNull(Cast(cc.cntr_value - pc.cntr_value as Money) / NullIf(cbc.cntr_value - pbc.cntr_value, 0), 0) -- Avg/sec When 1073939712 Then cc.cntr_value - pc.cntr_value -- Base - Else cc.cntr_value End as int) + Else cc.cntr_value End as bigint) --, currentvalue= CAST(cc.cntr_value as bigint) FROM #CCounters cc INNER JOIN #PCounters pc On cc.object_name = pc.object_name From 1751c35f6941d60f0205fea78f15bb50cf74a164 Mon Sep 17 00:00:00 2001 From: zensqlmonitor Date: Sat, 23 Apr 2016 09:18:08 +0200 Subject: [PATCH 2/2] SQL Server input. Fix datatype conversion. --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c49d2b72c787b..c2dded62eba13 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -52,6 +52,7 @@ based on _prefix_ in addition to globs. This means that a filter like - [#1044](https://github.com/influxdata/telegraf/pull/1044): Fix SNMP OID possible collisions. Thanks @relip - [#1022](https://github.com/influxdata/telegraf/issues/1022): Dont error deb/rpm install on systemd errors. - [#1078](https://github.com/influxdata/telegraf/issues/1078): Use default AWS credential chain. +- [#1070](https://github.com/influxdata/telegraf/issues/1070): SQL Server input. Fix datatype conversion. ## v0.12.1 [2016-04-14]