VictoriaMetrics/lib/promscrape
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
..
discovery lib/promscrape/discovery/kubernetes: add __meta_kubernetes_endpointslice_{label,annotation}* labels to be consistent with other role values for Kubernetes service discovery 2022-02-11 14:56:10 +02:00
discoveryutils lib/promscrape: properly show proxy_url option value at /config page 2021-10-26 21:24:22 +03:00
testdata lib/promscrape: fix errors in test config 2022-02-08 20:10:28 +02:00
client.go lib/promscrape: allow up to 5 redirects when scraping a target by default 2021-12-16 00:14:45 +02:00
config_test.go lib/promscrape: support prometheus-like duration in scrape configs (#2169) 2022-02-11 16:17:51 +02:00
config.go lib/promscrape: support prometheus-like duration in scrape configs (#2169) 2022-02-11 16:17:51 +02:00
scraper.go lib/promscrape: provide the ability to fetch target responses on behalf of vmagent or single-node VictoriaMetrics 2022-02-03 19:02:12 +02:00
scrapework_test.go lib/promscrape: generate scrape_timeout_seconds metric per each scrape target in the same way as Prometheus 2.30 does 2021-09-12 15:21:26 +03:00
scrapework_timing_test.go app/vmagent: follow-up after fe445f753b 2021-08-05 09:51:00 +03:00
scrapework.go lib/promscrape: provide the ability to fetch target responses on behalf of vmagent or single-node VictoriaMetrics 2022-02-03 19:02:12 +02:00
statconn.go lib/promscrape: properly show proxy_url option value at /config page 2021-10-26 21:24:22 +03:00
targets_response.qtpl lib/promscrape: show the total number of scrapes and the total number of scrape errors per target at /targets page 2022-02-03 20:23:27 +02:00
targets_response.qtpl.go lib/promscrape: show the total number of scrapes and the total number of scrape errors per target at /targets page 2022-02-03 20:23:27 +02:00
targetstatus.go lib/promscrape: show the total number of scrapes and the total number of scrape errors per target at /targets page 2022-02-03 20:23:27 +02:00