From 921918cb497397f06b5b31f5b35d0f49fb552739 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Sun, 9 Oct 2022 15:05:06 +0300 Subject: [PATCH] docs/sd_configs.md: document __scrape_timeout__, __scrape_interval__ and __series_limit__ labels --- docs/relabeling.md | 4 ++-- docs/sd_configs.md | 12 ++++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/docs/relabeling.md b/docs/relabeling.md index 5f8f90e3d..1b295a63a 100644 --- a/docs/relabeling.md +++ b/docs/relabeling.md @@ -249,7 +249,7 @@ See also [useful tips for target relabeling](#useful-tips-for-target-relabeling) Single-node VictoriaMetrics and [vmagent](https://docs.victoriametrics.com/vmagent.html) automatically add `instance` and `job` labels per each discovered target: * The `job` label is set to `job_name` value specified in the corresponding [scrape_config](https://docs.victoriametrics.com/sd_configs.html#scrape_configs). -* The `instance` label is set to the host:port part of `__address__` label value after target-level relabeling. +* The `instance` label is set to the `host:port` part of `__address__` label value after target-level relabeling. The `__address__` label value is automatically set to the most suitable value depending on the used [service discovery type](https://docs.victoriametrics.com/sd_configs.html#supported-service-discovery-configs). The `__address__` label can be overriden during relabeling - see [these docs](#how-to-modify-scrape-urls-in-targets). @@ -284,7 +284,7 @@ URLs for scrape targets are composed of the following parts: just update the `__address__` label during relabeling to the needed value. The port part is optional. If it is missing, then it is automatically set either to `80` or `443` depending on the used scheme (`http` or `https`). - The host:port part from the final `__address__` label is automatically set to `instance` label unless the `instance` + The `host:port` part from the final `__address__` label is automatically set to `instance` label unless the `instance` label is explicitly set during relabeling. The `__address__` label can contain the full scrape url, e.g. `http://host:port/metrics/path?query_args`. In this case the `__scheme__` and `__metrics_path__` labels are ignored. diff --git a/docs/sd_configs.md b/docs/sd_configs.md index 8d91d88c3..bbe14d061 100644 --- a/docs/sd_configs.md +++ b/docs/sd_configs.md @@ -1089,6 +1089,9 @@ scrape_configs: # Example values: # - "30s" - 30 seconds # - "2m" - 2 minutes + # The scrape_interval can be set on a per-target basis by specifying `__scrape_interval__` + # label during target relabeling phase. + # See https://docs.victoriametrics.com/vmagent.html#relabeling # scrape_interval: # scrape_timeout is an optional timeout when scraping the targets. @@ -1100,6 +1103,9 @@ scrape_configs: # - "30s" - 30 seconds # - "2m" - 2 minutes # The `scrape_timeout` cannot exceed the `scrape_interval`. + # The scrape_timeout can be set on a per-target basis by specifying `__scrape_timeout__` + # label during target relabeling phase. + # See https://docs.victoriametrics.com/vmagent.html#relabeling # scrape_timeout: # metrics_path is the path to fetch metrics from targets. @@ -1190,6 +1196,9 @@ scrape_configs: # stream_parse allows enabling stream parsing mode when scraping targets. # By default stream parsing mode is disabled for targets which return up to a few thosands samples. # See https://docs.victoriametrics.com/vmagent.html#stream-parsing-mode . + # The stream_parse can be set on a per-target basis by specifying `__stream_parse__` + # label during target relabeling phase. + # See https://docs.victoriametrics.com/vmagent.html#relabeling # stream_parse: # scrape_align_interval allows aligning scrapes to the given interval. @@ -1210,6 +1219,9 @@ scrape_configs: # a single target can expose during all the scrapes. # By default there is no limit on the number of exposed series. # See https://docs.victoriametrics.com/vmagent.html#cardinality-limiter . + # The series_limit can be set on a per-target basis by specifying `__series_limit__` + # label during target relabeling phase. + # See https://docs.victoriametrics.com/vmagent.html#relabeling # series_limit: ... # no_stale_markers allows disabling staleness tracking.