Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
docs
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
docs
Commits
321c1c9b
Commit
321c1c9b
authored
May 08, 2017
by
Davor Cubranic
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Note extrapolation done in the rate, delta, and increase
As suggested in prometheus/prometheus#2683.
parent
2fe53534
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
5 deletions
+12
-5
functions.md
content/docs/querying/functions.md
+12
-5
No files found.
content/docs/querying/functions.md
View file @
321c1c9b
...
...
@@ -89,7 +89,8 @@ month for each of the given times in UTC. Returned values are from 28 to 31.
`delta(v range-vector)`
calculates the difference between the
first and last value of each time series element in a range vector
`v`
,
returning an instant vector with the given deltas and equivalent labels.
The delta is interpolated to cover the full time range.
The delta is interpolated to cover the full time range, so that it is
possible to get non-integer result even if the samples are all integers.
The following example expression returns the difference in CPU temperature
between now and 2 hours ago:
...
...
@@ -202,7 +203,10 @@ equivalent labels.
`increase(v range-vector)`
calculates the increase in the
time series in the range vector. Breaks in monotonicity (such as counter
resets due to target restarts) are automatically adjusted for.
resets due to target restarts) are automatically adjusted for. The
increment is interpolated to cover the full time range, so that it is
possible to get non-integer result even if counter increments only by
integers.
The following example expression returns the number of HTTP requests as measured
over the last 5 minutes, per time series in the range vector:
...
...
@@ -212,8 +216,9 @@ increase(http_requests_total{job="api-server"}[5m])
```
`increase`
should only be used with counters. It should be used primarily for
human readability. Use
`rate`
in recording rules so that increases are tracked
consistently on a per-second basis.
human readability and is really just a syntactic sugar around
`rate`
times the
number of seconds in the interval. Use
`rate`
in recording rules so that
increases are tracked consistently on a per-second basis.
## `irate()`
...
...
@@ -299,7 +304,9 @@ regression](http://en.wikipedia.org/wiki/Simple_linear_regression).
`rate(v range-vector)`
calculates the per-second average rate of increase of the
time series in the range vector. Breaks in monotonicity (such as counter
resets due to target restarts) are automatically adjusted for.
resets due to target restarts) are automatically adjusted for. Also, the
calculation extrapolates to the ends of the time range, allowing for missed
scrapes or imperfect alignment of scrape cycle with the range's time period.
The following example expression returns the per-second rate of HTTP requests as measured
over the last 5 minutes, per time series in the range vector:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment