docs/stream-aggregation.md: use 5m instead of 300 in the example query for rate() calculation from "increase" results

This makes the query easier to read and understand

Follow-up for 0df506de54
This commit is contained in:
Aliaksandr Valialkin 2023-08-28 09:36:16 +02:00
parent 453077808d
commit baea9da66b
No known key found for this signature in database
GPG key ID: A72BEC6CD3D0DED1

View file

@ -448,15 +448,15 @@ For example, see below time series produced by config with aggregation interval
<img alt="increase aggregation" src="stream-aggregation-check-increase.png">
Aggregating irregular and sporadic metrics (received from [Lambdas](https://aws.amazon.com/lambda/)
or [Cloud Functions](https://cloud.google.com/functions)) can be controlled via [staleness_inteval](#stream-aggregation-config).
`increase` can be used as an alternative for [rate](https://docs.victoriametrics.com/MetricsQL.html#rate) function.
For example, if we have `increase` with `interval` of `5m` for a counter `some_counter`, then to get `rate` we should divide
the resulting aggregation by the `interval` in seconds: `some_counter:5m_increase / 300` is similar to `rate(some_counter[5m])`.
the resulting aggregation by the `interval` in seconds: `some_counter:5m_increase / 5m` is similar to `rate(some_counter[5m])`.
Please note, opposite to [rate](https://docs.victoriametrics.com/MetricsQL.html#rate), `increase` aggregations can be
combined safely afterwards. This is helpful when the aggregation is calculated by more than one vmagent.
Aggregating irregular and sporadic metrics (received from [Lambdas](https://aws.amazon.com/lambda/)
or [Cloud Functions](https://cloud.google.com/functions)) can be controlled via [staleness_inteval](#stream-aggregation-config).
### count_series
`count_series` counts the number of unique [time series](https://docs.victoriametrics.com/keyConcepts.html#time-series).