VictoriaMetrics/app/vmalert/datasource
Roman Khavronenko 96db7ac52c
vmalert: speed up state restore procedure on start (#3758)
* vmalert: speed up state restore procedure on start

Alerts state restore procedure has been changed to become asynchronous.
It doesn't block groups start anymore which significantly improves vmalert's startup time.
Instead, state restore is called by each group in their goroutines after the first rules
evaluation.

While previously state restore attempt was made for all loaded alerting rules,
now it is called only for alerts which became active after the first evaluation.
This reduces the amount of API calls to the configured remote read URL.

This also means that `remoteRead.ignoreRestoreErrors` command-line flag becomes deprecated now
and will have no effect if configured.

See relevant issue https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2608

Signed-off-by: hagen1778 <roman@victoriametrics.com>

* make lint happy

Signed-off-by: hagen1778 <roman@victoriametrics.com>

* Apply suggestions from code review

---------

Signed-off-by: hagen1778 <roman@victoriametrics.com>
Co-authored-by: Aliaksandr Valialkin <valyala@victoriametrics.com>
2023-02-03 19:46:41 -08:00
..
datasource_test.go vmalert: support rules backfilling (aka replay) (#1358) 2021-06-09 12:30:54 +03:00
datasource.go vmalert: speed up state restore procedure on start (#3758) 2023-02-03 19:46:41 -08: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 vmalert: introduce additional HTTP URL params per-group configuration (#1892) 2021-12-02 14:51:54 +02: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 vmalert: reduce allocations for Prometheus resp parse (#3435) 2022-12-05 00:18:11 -08:00
vm_test.go vmalert: reduce allocations for Prometheus resp parse (#3435) 2022-12-05 00:18:11 -08:00
vm.go vmalert: print example of curl command for rule's state (#3112) 2022-09-19 15:04:37 +03:00