diff --git a/CHANGELOG.md b/CHANGELOG.md index aa407cde8..2019dcc88 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## [unreleased] + +### Fixed + +- History queries were always failing due to wrong Prometheus API usage. + ## v0.84 ### Added diff --git a/cmd/karma/alert_history.go b/cmd/karma/alert_history.go index 940fce7a3..e6329ffe8 100644 --- a/cmd/karma/alert_history.go +++ b/cmd/karma/alert_history.go @@ -248,7 +248,7 @@ func countAlerts(uri string, timeout time.Duration, labels map[string]string) (r names, _, err := v1api.LabelNames( ctx, - []string{`__name__="ALERTS_FOR_STATE"`}, + []string{`{__name__="ALERTS_FOR_STATE"}`}, time.Now().Add(time.Minute*-5), time.Now()) if err != nil {