VictoriaMetrics/app/vmalert/datasource
Roman Khavronenko 4edb97f4da
app/vmalert: detect alerting rules which don't match any series at all (#4198)
app/vmalert: detect alerting rules which don't match any series at all

vmalert starts to understand /query responses which contain object:
```
"stats":{"seriesFetched": "42"}
```
If object is present, vmalert parses it and populates a new field
`SeriesFetched`. This field is then used to populate the new metric
`vmalert_alerting_rules_last_evaluation_series_fetched` and to
display warnings in the vmalert's UI.

If response doesn't contain the new object (Prometheus or
VictoriaMetrics earlier than v1.90), then `SeriesFetched=nil`.
In this case, UI will contain no additional warnings.
And `vmalert_alerting_rules_last_evaluation_series_fetched` will
be set to `-1`. Negative value of the metric will help to compile
correct alerting rule in follow-up.

Thanks for the initial implementation to @Haleygo
See https://github.com/VictoriaMetrics/VictoriaMetrics/pull/4056

See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4039

Signed-off-by: hagen1778 <roman@victoriametrics.com>
2023-05-09 21:48:59 -07:00
..
datasource_test.go vmalert: support rules backfilling (aka replay) (#1358) 2021-06-09 12:30:54 +03:00
datasource.go app/vmalert: detect alerting rules which don't match any series at all (#4198) 2023-05-09 21:48:59 -07:00
init.go app/vmalert: substitute -datasource.disablePathAppend with -remoteRead.disablePathAppend in the description for -datasource.url command-line flag 2022-11-29 21:11:18 -08:00
vm_graphite_api.go app/vmalert: detect alerting rules which don't match any series at all (#4198) 2023-05-09 21:48:59 -07:00
vm_prom_api_test.go vmalert: reduce allocations for Prometheus resp parse (#3435) 2022-12-05 00:18:11 -08:00
vm_prom_api.go app/vmalert: detect alerting rules which don't match any series at all (#4198) 2023-05-09 21:48:59 -07:00
vm_test.go app/vmalert: detect alerting rules which don't match any series at all (#4198) 2023-05-09 21:48:59 -07:00
vm.go app/vmalert: detect alerting rules which don't match any series at all (#4198) 2023-05-09 21:48:59 -07:00