-
Problem report
-
Resolution: Fixed
-
Trivial
-
None
-
None
-
1
Steps to reproduce:
- If you run the MSSQL plugin on system with a non-named instance, it will fail to pull values due to a naming mistake from the sys.dm_os_performance_counters table. This is due to an issue in the perfcounter.get.sql file that doesn't take the default SQL name into account when it is not a named instance.
This can be fixed with the following addition:
DECLARE @SQLNAME NVARCHAR(50)
SET @SQLNAME = CASE WHEN @@SERVICENAME = 'MSSQLSERVER' THEN 'SQLServer' ELSE 'MSSQL$' + @@SERVICENAME END
I have attached a corrected perfcounter.get.sql file with this addition, including the variable replacements.