From 8e3ed96d6f862d82f4c7870e8e8e75d0353fdccf Mon Sep 17 00:00:00 2001 From: Daniel Nelson Date: Mon, 2 Oct 2017 17:15:34 -0700 Subject: [PATCH] Fix case sensitivity error in sqlserver input (#3287) --- plugins/inputs/sqlserver/sqlserver.go | 37 ++++++++++++++------------- 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/plugins/inputs/sqlserver/sqlserver.go b/plugins/inputs/sqlserver/sqlserver.go index 2bc33a54a..373e12f7c 100644 --- a/plugins/inputs/sqlserver/sqlserver.go +++ b/plugins/inputs/sqlserver/sqlserver.go @@ -2,11 +2,12 @@ package sqlserver import ( "database/sql" - "github.com/influxdata/telegraf" - "github.com/influxdata/telegraf/plugins/inputs" "sync" "time" + "github.com/influxdata/telegraf" + "github.com/influxdata/telegraf/plugins/inputs" + // go-mssqldb initialization _ "github.com/zensqlmonitor/go-mssqldb" ) @@ -1436,16 +1437,16 @@ SELECT , type = 'Wait stats' ---- values , [I/O] = SUM([I/O]) -, [Latch] = SUM([Latch]) -, [Lock] = SUM([Lock]) -, [Network] = SUM([Network]) -, [Service broker] = SUM([Service broker]) -, [Memory] = SUM([Memory]) -, [Buffer] = SUM([Buffer]) +, [Latch] = SUM([LATCH]) +, [Lock] = SUM([LOCK]) +, [Network] = SUM([NETWORK]) +, [Service broker] = SUM([SERVICE BROKER]) +, [Memory] = SUM([MEMORY]) +, [Buffer] = SUM([BUFFER]) , [CLR] = SUM([CLR]) , [SQLOS] = SUM([SQLOS]) -, [XEvent] = SUM([XEvent]) -, [Other] = SUM([Other]) +, [XEvent] = SUM([XEVENT]) +, [Other] = SUM([OTHER]) , [Total] = SUM([I/O]+[LATCH]+[LOCK]+[NETWORK]+[SERVICE BROKER]+[MEMORY]+[BUFFER]+[CLR]+[XEVENT]+[SQLOS]+[OTHER]) FROM ( @@ -1479,16 +1480,16 @@ SELECT , type = 'Wait stats' ---- values , [I/O] = SUM([I/O]) -, [Latch] = SUM([Latch]) -, [Lock] = SUM([Lock]) -, [Network] = SUM([Network]) -, [Service broker] = SUM([Service broker]) -, [Memory] = SUM([Memory]) -, [Buffer] = SUM([Buffer]) +, [Latch] = SUM([LATCH]) +, [Lock] = SUM([LOCK]) +, [Network] = SUM([NETWORK]) +, [Service broker] = SUM([SERVICE BROKER]) +, [Memory] = SUM([MEMORY]) +, [Buffer] = SUM([BUFFER]) , [CLR] = SUM([CLR]) , [SQLOS] = SUM([SQLOS]) -, [XEvent] = SUM([XEvent]) -, [Other] = SUM([Other]) +, [XEvent] = SUM([XEVENT]) +, [Other] = SUM([OTHER]) , [Total] = SUM([I/O]+[LATCH]+[LOCK]+[NETWORK]+[SERVICE BROKER]+[MEMORY]+[BUFFER]+[CLR]+[XEVENT]+[SQLOS]+[OTHER]) FROM (