Commit d9a38c22 authored by Brian Brazil's avatar Brian Brazil

Add docs for predict_linear

parent 8bf820ff
...@@ -74,13 +74,6 @@ delta(cpu_temp_celsius{host="zeus"}[2h]) ...@@ -74,13 +74,6 @@ delta(cpu_temp_celsius{host="zeus"}[2h])
`deriv(v range-vector)` calculates the derivative of the time series in a range `deriv(v range-vector)` calculates the derivative of the time series in a range
vector `v`, using [simple linear regression](http://en.wikipedia.org/wiki/Simple_linear_regression). vector `v`, using [simple linear regression](http://en.wikipedia.org/wiki/Simple_linear_regression).
The following example expression returns the predicted CPU temperature in 5
minutes based on the previous hour of data:
```
cpu_temp_celsius{host="zeus"} + deriv(cpu_temp_celsius{host="zeus"}[1h]) * 5 * 60
```
`deriv` should only be used with gauges. `deriv` should only be used with gauges.
## `drop_common_labels()` ## `drop_common_labels()`
...@@ -186,6 +179,14 @@ The special cases are equivalent to those in `ln`. ...@@ -186,6 +179,14 @@ The special cases are equivalent to those in `ln`.
`log10(v instant-vector)` calculates the decimal logarithm for all elements in `v`. `log10(v instant-vector)` calculates the decimal logarithm for all elements in `v`.
The special cases are equivalent to those in `ln`. The special cases are equivalent to those in `ln`.
## `predict_linear()`
`predict_linear(v range-vector, t scalar)` predicts the value of time series
`t` seconds from now, based on the range vector `v`, using [simple linear
regression](http://en.wikipedia.org/wiki/Simple_linear_regression).
`predict_linear` should only be used with gauges.
## `rate()` ## `rate()`
`rate(v range-vector)` calculates the per-second average rate of increase of the `rate(v range-vector)` calculates the per-second average rate of increase of the
......
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