VictoriaMetrics/app/vmalert/utils
Roman Khavronenko 791cad8c2e
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:51 +02:00
..
auth.go app/{vminsert,vmagent}: hide passwords and auth tokens by default at /config page 2021-11-05 14:42:13 +02:00
err_group.go app/vmalert: support multiple notifier urls (#584) (#590) 2020-06-29 22:21:56 +03:00
err_group_test.go app/vmalert: support multiple notifier urls (#584) (#590) 2020-06-29 22:21:56 +03:00
metrics.go vmalert: support configuration file for notifiers (#2127) 2022-02-02 23:42:25 +02:00
tls.go all: use %w instead of %s for wrapping errors in fmt.Errorf 2020-06-30 23:33:46 +03:00
tls_test.go Makefile: update golangci-lint from v1.29.0 to v1.40.1 2021-05-20 18:30:24 +03:00