From 82c9f0f7f849cce724e1b9fe58c205d3623062cb Mon Sep 17 00:00:00 2001 From: Giovanni Luisotto Date: Tue, 21 Apr 2020 22:42:35 +0200 Subject: [PATCH] Trim instance tag in the sqlserver performance counters query (#7351) --- plugins/inputs/sqlserver/sqlserver.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/inputs/sqlserver/sqlserver.go b/plugins/inputs/sqlserver/sqlserver.go index ec147e4fe..7c8778e10 100644 --- a/plugins/inputs/sqlserver/sqlserver.go +++ b/plugins/inputs/sqlserver/sqlserver.go @@ -629,9 +629,9 @@ SET @SQL = N'SELECT DISTINCT WHEN RTRIM(object_name) LIKE ''%:Availability Replica'' AND TRY_CONVERT(uniqueidentifier, spi.instance_name) IS NOT NULL -- for cloud only THEN d.name + RTRIM(SUBSTRING(spi.instance_name, 37, LEN(spi.instance_name))) - ELSE spi.instance_name + ELSE RTRIM(spi.instance_name) END AS instance_name,' - ELSE 'spi.instance_name as instance_name, ' + ELSE 'RTRIM(spi.instance_name) as instance_name, ' END + 'CAST(spi.cntr_value AS BIGINT) AS cntr_value,