mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-02-16 17:56:37 +00:00
mssql: fix performance counter with additional server instance (#1753)
Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
This commit is contained in:
@@ -360,9 +360,10 @@ func (c *Collector) getMSSQLInstances() mssqlInstancesType {
|
|||||||
// Counter object for the given SQL instance and Collector.
|
// Counter object for the given SQL instance and Collector.
|
||||||
func (c *Collector) mssqlGetPerfObjectName(sqlInstance string, collector string) string {
|
func (c *Collector) mssqlGetPerfObjectName(sqlInstance string, collector string) string {
|
||||||
sb := strings.Builder{}
|
sb := strings.Builder{}
|
||||||
sb.WriteString("SQLServer:")
|
|
||||||
|
|
||||||
if sqlInstance != "MSSQLSERVER" {
|
if sqlInstance == "MSSQLSERVER" {
|
||||||
|
sb.WriteString("SQLServer:")
|
||||||
|
} else {
|
||||||
sb.WriteString("MSSQL$")
|
sb.WriteString("MSSQL$")
|
||||||
sb.WriteString(sqlInstance)
|
sb.WriteString(sqlInstance)
|
||||||
sb.WriteString(":")
|
sb.WriteString(":")
|
||||||
|
|||||||
Reference in New Issue
Block a user