VictoriaMetrics/app/vmalert/utils
Roman Khavronenko e3adcbec6e
lib/promscrape: support prometheus-like duration in scrape configs (#2169)
* lib/promscrape: support prometheus-like duration in scrape configs

The change allows to specify duration values like `1d`, `1w`
for fields `scrape_interval`, `scrape_timeout`, etc.

https://github.com/VictoriaMetrics/VictoriaMetrics/issues/817#issuecomment-1033384766
Signed-off-by: hagen1778 <roman@victoriametrics.com>

* lib/blockcache: make linter happy

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

* lib/promscrape: support prometheus-like duration in scrape configs

* add support for extra fields `scrape_align_interval` and `scrape_offset`;
* support Prometheus duration parsing for `__scrape_interval__`
and `__scrape_duration__` labels;

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

* wip

* wip

* docs/CHANGELOG.md: document the feature

Co-authored-by: Aliaksandr Valialkin <valyala@victoriametrics.com>
2022-02-11 16:17:00 +02:00
..
auth.go app/{vminsert,vmagent}: hide passwords and auth tokens by default at /config page 2021-11-05 14:41:16 +02:00
err_group_test.go app/vmalert: support multiple notifier urls (#584) (#590) 2020-06-29 22:21:03 +03:00
err_group.go app/vmalert: support multiple notifier urls (#584) (#590) 2020-06-29 22:21:03 +03:00
metrics.go vmalert: support configuration file for notifiers (#2127) 2022-02-02 14:11:41 +02:00
tls_test.go Makefile: update golangci-lint from v1.29.0 to v1.40.1 2021-05-20 18:27:10 +03:00
tls.go all: use %w instead of %s for wrapping errors in fmt.Errorf 2020-06-30 23:05:11 +03:00