fix(backend): use correct label selectors

This commit is contained in:
Łukasz Mierzwa
2021-05-04 10:31:26 +01:00
committed by Łukasz Mierzwa
parent 7e0bb2a46c
commit ac03e835af
2 changed files with 7 additions and 1 deletions

View File

@@ -1,5 +1,11 @@
# Changelog
## [unreleased]
### Fixed
- History queries were always failing due to wrong Prometheus API usage.
## v0.84
### Added

View File

@@ -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 {