Skip to content

Commit 559be7d

Browse files
Update alerts_collector.go
1 parent 963a45e commit 559be7d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

internal/openmetrics-exporter/alerts_collector.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
package collectors
22

3-
43
import (
54
"fmt"
5+
client "purestorage/fa-openmetrics-exporter/internal/rest-client"
66
"strings"
77

88
"github.com/prometheus/client_golang/prometheus"
9-
"purestorage/fa-openmetrics-exporter/internal/rest-client"
109
)
1110

1211
type AlertsCollector struct {
@@ -25,7 +24,7 @@ func (c *AlertsCollector) Collect(ch chan<- prometheus.Metric) {
2524
}
2625
al := make(map[string]float64)
2726
for _, alert := range alerts.Items {
28-
al[fmt.Sprintf("%s,%s,%s", alert.Severity, alert.ComponentType, alert.ComponentName)] += 1
27+
al[fmt.Sprintf("%s,%s,%s", alert.ComponentName, alert.ComponentType, alert.Severity)] += 1
2928
}
3029
for a, n := range al {
3130
alert := strings.Split(a, ",")

0 commit comments

Comments
 (0)