From 92f158a2f5d592367801e8b0e7125cb42acfa502 Mon Sep 17 00:00:00 2001 From: hagen1778 Date: Tue, 22 Aug 2023 09:50:21 +0200 Subject: [PATCH] docs: mention `increase` as alternative to `rate` Signed-off-by: hagen1778 (cherry picked from commit 0df506de54df5c24ef040fc2363ff402d5e80eb3) --- docs/stream-aggregation.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/stream-aggregation.md b/docs/stream-aggregation.md index 161d6011f..6882cb401 100644 --- a/docs/stream-aggregation.md +++ b/docs/stream-aggregation.md @@ -451,6 +451,12 @@ For example, see below time series produced by config with aggregation interval 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])`. +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. + ### count_series `count_series` counts the number of unique [time series](https://docs.victoriametrics.com/keyConcepts.html#time-series).