diff --git a/internal/collector/mssql/mssql.go b/internal/collector/mssql/mssql.go index 51b2bf359..6a198999c 100644 --- a/internal/collector/mssql/mssql.go +++ b/internal/collector/mssql/mssql.go @@ -360,9 +360,10 @@ func (c *Collector) getMSSQLInstances() mssqlInstancesType { // Counter object for the given SQL instance and Collector. func (c *Collector) mssqlGetPerfObjectName(sqlInstance string, collector string) string { sb := strings.Builder{} - sb.WriteString("SQLServer:") - if sqlInstance != "MSSQLSERVER" { + if sqlInstance == "MSSQLSERVER" { + sb.WriteString("SQLServer:") + } else { sb.WriteString("MSSQL$") sb.WriteString(sqlInstance) sb.WriteString(":")