mirror of
https://github.com/prometheus/prometheus.git
synced 2024-11-09 23:24:05 -08:00
Rename QueryforStateSeries to QueryForStateSeries
Signed-off-by: gotjosh <josue.abreu@gmail.com>
This commit is contained in:
parent
151f6e0ed6
commit
ccfafae36d
|
@ -268,8 +268,8 @@ func (r *AlertingRule) forStateSample(alert *Alert, ts time.Time, v float64) pro
|
||||||
return s
|
return s
|
||||||
}
|
}
|
||||||
|
|
||||||
// QueryforStateSeries returns the series for ALERTS_FOR_STATE of the alert rule.
|
// QueryForStateSeries returns the series for ALERTS_FOR_STATE of the alert rule.
|
||||||
func (r *AlertingRule) QueryforStateSeries(ctx context.Context, q storage.Querier) (storage.SeriesSet, error) {
|
func (r *AlertingRule) QueryForStateSeries(ctx context.Context, q storage.Querier) (storage.SeriesSet, error) {
|
||||||
// We use a sample to ease the building of matchers.
|
// We use a sample to ease the building of matchers.
|
||||||
// Don't provide an alert as we want matchers that match all series for the alert rule.
|
// Don't provide an alert as we want matchers that match all series for the alert rule.
|
||||||
smpl := r.forStateSample(nil, time.Now(), 0)
|
smpl := r.forStateSample(nil, time.Now(), 0)
|
||||||
|
|
|
@ -716,7 +716,7 @@ func TestQueryForStateSeries(t *testing.T) {
|
||||||
matchersCount++
|
matchersCount++
|
||||||
})
|
})
|
||||||
|
|
||||||
seriesSet, err := rule.QueryforStateSeries(context.Background(), querier)
|
seriesSet, err := rule.QueryForStateSeries(context.Background(), querier)
|
||||||
|
|
||||||
var series storage.Series
|
var series storage.Series
|
||||||
for seriesSet.Next() {
|
for seriesSet.Next() {
|
||||||
|
|
|
@ -664,7 +664,7 @@ func (g *Group) RestoreForState(ts time.Time) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
sset, err := alertRule.QueryforStateSeries(g.opts.Context, q)
|
sset, err := alertRule.QueryForStateSeries(g.opts.Context, q)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
level.Error(g.logger).Log(
|
level.Error(g.logger).Log(
|
||||||
"msg", "Failed to restore 'for' state",
|
"msg", "Failed to restore 'for' state",
|
||||||
|
|
Loading…
Reference in a new issue