VictoriaMetrics/lib/promscrape
Nikolay bba08f7846
lib/promscrape: add relabel configs to global section
This commit adds `metric_relabel_configs` and `relabel_configs` fields
into the `global` section of scrape configuration file.

 New fields are used as global relabeling rules for the scrape targets.

 These relabel configs are prepended to the target relabel configs.
This feature is useful to:
* apply global rules to __meta labels from service discovery targets.
* drop noisy labels during scrapping.
* mutate labels without affecting metrics ingested via any of push
protocols. 

Related issue
https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6966

---------
Signed-off-by: f41gh7 <nik@victoriametrics.com>
Co-authored-by: Zhu Jiekun <jiekun@victoriametrics.com>
Co-authored-by: hagen1778 <roman@victoriametrics.com>
2024-10-31 19:58:22 +01:00
..
discovery lib/promscrape: adds support for PuppetDB service discovery 2024-10-27 20:38:34 +01:00
discoveryutils lib: consistently use regexp.Regexp.ReplaceAllLiteralString instead of regexp.Regexp.ReplaceAllString in places where the replacement cannot contain matching group placeholders 2024-07-17 12:41:54 +02:00
testdata lib/promscrape: disable support for service discovery and metrics scrape via http2 2023-07-06 16:03:37 -07:00
client.go lib/promscrape: fixed reload on max_scrape_size change (#7282) 2024-10-18 11:35:23 +02:00
client_test.go lib/promscrape: Fix TestClientProxyReadOk flaky test (#7173) 2024-10-03 18:27:15 +02:00
config.go lib/promscrape: add relabel configs to global section 2024-10-31 19:58:22 +01:00
config_test.go lib/promscrape: add relabel configs to global section 2024-10-31 19:58:22 +01:00
config_timing_test.go lib/promscrape: optimize service discovery speed 2022-11-29 21:26:00 -08:00
relabel_debug.go app/vmselect: small cleanup after 4f3f9950d0 2023-05-08 14:57:11 -07:00
scraper.go lib/promscrape: adds support for PuppetDB service discovery 2024-10-27 20:38:34 +01:00
scraper_test.go lib/promscrape: fixed reload on max_scrape_size change (#7282) 2024-10-18 11:35:23 +02:00
scrapework.go lib/promscrape: fixed reload on max_scrape_size change (#7282) 2024-10-18 11:35:23 +02:00
scrapework_test.go lib/promscrape: use prompbmarshal.MustParsePromMetrics function at parseData() test function 2024-07-03 16:08:13 +02:00
scrapework_timing_test.go all: fix golangci-lint(revive) warnings after 0c0ed61ce7 2024-04-02 23:16:29 +03:00
targetstatus.go lib/promscrape: show only unhealthy targets if show_only_unhealthy filter is enabled (#6960) 2024-09-24 12:18:24 +02:00
targetstatus.qtpl lib/promscrape: follow-up for 1e83598be3 2024-07-16 12:38:21 +02:00
targetstatus.qtpl.go lib/promscrape: follow-up for 1e83598be3 2024-07-16 12:38:21 +02:00