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
04c67db2
Commit
04c67db2
authored
May 26, 2015
by
Julius Volz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Document changes() and resets() functions.
parent
1abb9008
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
1 deletion
+16
-1
functions.md
content/docs/querying/functions.md
+16
-1
No files found.
content/docs/querying/functions.md
View file @
04c67db2
...
...
@@ -40,6 +40,12 @@ by sample value.
`ceil(v instant-vector)`
rounds the sample values of all elements in
`v`
up to
the nearest integer.
## `changes()`
For each input time series,
`changes(v range-vector)`
returns the number of
times its value has changed within the provided time range as an instant
vector.
## `count_scalar()`
`count_scalar(v instant-vector)`
returns the number of elements in a time series
...
...
@@ -52,7 +58,7 @@ allows grouping by labels via a `by` clause.
`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.
The following example expression returns the difference in CPU temperature
between now and 2 hours ago:
...
...
@@ -178,6 +184,15 @@ rate(http_requests_total{job="api-server"}[5m])
`rate`
should only be used with counters.
## `resets()`
For each input time series,
`resets(v range-vector)`
returns the number of
counter resets within the provided time range as an instant vector. Any
decrease in the value between two consecutive samples is interpreted as a
counter reset.
`resets`
should only be used with counters.
## `round()`
`round(v instant-vector, to_nearest=1 scalar)`
rounds the sample values of all
...
...
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