Commit e23674ac authored by Fabian Reinartz's avatar Fabian Reinartz

Merge pull request #280 from RichiH/patch-2

functions.md: Add cross-references to operators.md
parents 98798346 77f9f806
...@@ -49,9 +49,10 @@ vector. ...@@ -49,9 +49,10 @@ vector.
## `count_scalar()` ## `count_scalar()`
`count_scalar(v instant-vector)` returns the number of elements in a time series `count_scalar(v instant-vector)` returns the number of elements in a time series
vector as a scalar. This is in contrast to the `count()` aggregation operator, vector as a scalar. This is in contrast to the `count()`
which always returns a vector (an empty one if the input vector is empty) and [aggregation operator](/docs/querying/operators/#aggregation-operators), which
allows grouping by labels via a `by` clause. always returns a vector (an empty one if the input vector is empty) and allows
grouping by labels via a `by` clause.
## `delta()` ## `delta()`
...@@ -179,7 +180,8 @@ Use `rate` for alerts and slow-moving counters, as brief changes ...@@ -179,7 +180,8 @@ Use `rate` for alerts and slow-moving counters, as brief changes
in the rate can reset the `FOR` clause and graphs consisting entirely of rare in the rate can reset the `FOR` clause and graphs consisting entirely of rare
spikes are hard to read. spikes are hard to read.
Note that when combining `irate()` with an aggregation operator (e.g. `sum()`) Note that when combining `irate()` with an
[aggregation operator](/docs/querying/operators/#aggregation-operators) (e.g. `sum()`)
or a function aggregating over time (any function ending in `_over_time`), or a function aggregating over time (any function ending in `_over_time`),
always take a `irate()` first, then aggregate. Otherwise `irate()` cannot detect always take a `irate()` first, then aggregate. Otherwise `irate()` cannot detect
counter resets when your target restarts. counter resets when your target restarts.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment