delta_monotonic¶
Description¶
Calculates the amount of difference in a column in each time bin for each group.
delta_monotonic by default assumes the argument to be monotonically increasing, and treats decreasing values as counter resets. See also delta.
When the argument is a metric defined using set_metric, delta_monotonic behaves differently according to the specified metric type:
for
gaugeandcumulativeCountermetrics,delta_monotonicretains the default behavior of assuming monotonic increases.for
deltametrics,delta_monotonicwill sum up the values in the time window to return the total sum. Negatives may be produced for negative input values.
Return type¶
value
Domain¶
This is an aggregate function (aggregates rows over a group in aggregate verbs.)
This is a window function (calculates over a group of multiple input rows using windowing.)
Categories¶
Usage¶
delta_monotonic(value)
Argument |
Type |
Optional |
Repeatable |
Restrictions |
|---|---|---|---|---|
value |
numeric or duration |
no |
no |
none |
Examples¶
align 5m, requests: delta_monotonic(m("requests_total"))
Computes the delta_monotonic of “requests_total” metric for each 5m time bins. The result will be non-negative.