docs/vmagent: distinguish between metrics, samples and series

Before, doc incorrectly used `metric` instead of `sample` or `series`.
This commit aligns description with https://docs.victoriametrics.com/keyconcepts/#structure-of-a-metric

Signed-off-by: hagen1778 <roman@victoriametrics.com>
(cherry picked from commit 98fcd95438)
This commit is contained in:
hagen1778 2024-10-17 19:21:52 +02:00
parent 4116bca505
commit 6f455c2dce
No known key found for this signature in database
GPG key ID: E92986095E0DD614

View file

@ -502,15 +502,15 @@ and attaches `instance`, `job` and other target-specific labels to these metrics
scrape_response_size_bytes > 10MiB
```
* `scrape_samples_scraped` - the number of samples (aka metrics) parsed per each scrape. This allows detecting targets,
which expose too many metrics. For example, the following [MetricsQL query](https://docs.victoriametrics.com/metricsql/)
* `scrape_samples_scraped` - the number of [samples](https://docs.victoriametrics.com/keyconcepts/#raw-samples) parsed per each scrape. This allows detecting targets,
which expose too many [series](https://docs.victoriametrics.com/keyconcepts/#time-series). For example, the following [MetricsQL query](https://docs.victoriametrics.com/metricsql/)
returns targets, which expose more than 10000 metrics:
```metricsql
scrape_samples_scraped > 10000
```
* `scrape_samples_limit` - the configured limit on the number of metrics the given target can expose.
* `scrape_samples_limit` - the configured limit on the number of [samples](https://docs.victoriametrics.com/keyconcepts/#raw-samples) the given target can expose.
The limit can be set via `sample_limit` option at [scrape_configs](https://docs.victoriametrics.com/sd_configs/#scrape_configs).
This metric is exposed only if the `sample_limit` is set. This allows detecting targets,
which expose too many metrics compared to the configured `sample_limit`. For example, the following query
@ -520,9 +520,9 @@ and attaches `instance`, `job` and other target-specific labels to these metrics
scrape_samples_scraped / scrape_samples_limit > 0.8
```
* `scrape_samples_post_metric_relabeling` - the number of samples (aka metrics) left after applying metric-level relabeling
* `scrape_samples_post_metric_relabeling` - the number of [samples](https://docs.victoriametrics.com/keyconcepts/#raw-samples) left after applying metric-level relabeling
from `metric_relabel_configs` section (see [relabeling docs](#relabeling) for more details).
This allows detecting targets with too many metrics after the relabeling.
This allows detecting targets with too many [series](https://docs.victoriametrics.com/keyconcepts/#time-series) after the relabeling.
For example, the following [MetricsQL query](https://docs.victoriametrics.com/metricsql/) returns targets
with more than 10000 metrics after the relabeling:
@ -530,7 +530,7 @@ and attaches `instance`, `job` and other target-specific labels to these metrics
scrape_samples_post_metric_relabeling > 10000
```
* `scrape_series_added` - **an approximate** number of new series the given target generates during the current scrape.
* `scrape_series_added` - **an approximate** number of new [series](https://docs.victoriametrics.com/keyconcepts/#time-series) the given target generates during the current scrape.
This metric allows detecting targets (identified by `instance` label),
which lead to [high churn rate](https://docs.victoriametrics.com/faq/#what-is-high-churn-rate).
For example, the following [MetricsQL query](https://docs.victoriametrics.com/metricsql/) returns targets,
@ -543,10 +543,10 @@ and attaches `instance`, `job` and other target-specific labels to these metrics
`vmagent` sets `scrape_series_added` to zero when it runs with `-promscrape.noStaleMarkers` command-line flag
or when it scrapes target with `no_stale_markers: true` option, e.g. when [staleness markers](#prometheus-staleness-markers) are disabled.
* `scrape_series_limit` - the limit on the number of unique time series the given target can expose according to [these docs](#cardinality-limiter).
* `scrape_series_limit` - the limit on the number of unique [series](https://docs.victoriametrics.com/keyconcepts/#time-series) the given target can expose according to [these docs](#cardinality-limiter).
This metric is exposed only if the series limit is set.
* `scrape_series_current` - the number of unique series the given target exposed so far.
* `scrape_series_current` - the number of unique [series](https://docs.victoriametrics.com/keyconcepts/#time-series) the given target exposed so far.
This metric is exposed only if the series limit is set according to [these docs](#cardinality-limiter).
This metric allows alerting when the number of exposed series by the given target reaches the limit.
For example, the following query would alert when the target exposes more than 90% of unique series compared to the configured limit.
@ -556,7 +556,7 @@ and attaches `instance`, `job` and other target-specific labels to these metrics
```
* `scrape_series_limit_samples_dropped` - exposes the number of dropped samples during the scrape because of the exceeded limit
on the number of unique series. This metric is exposed only if the series limit is set according to [these docs](#cardinality-limiter).
on the number of unique [series](https://docs.victoriametrics.com/keyconcepts/#time-series). This metric is exposed only if the series limit is set according to [these docs](#cardinality-limiter).
This metric allows alerting when scraped samples are dropped because of the exceeded limit.
For example, the following query alerts when at least a single sample is dropped because of the exceeded limit during the last hour: