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
84bff408
Commit
84bff408
authored
Sep 26, 2016
by
Tobias Schmidt
Committed by
GitHub
Sep 26, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #567 from prometheus/beorn7/fix
Fix `label_replace` documentation
parents
05eea034
b555789b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
functions.md
content/docs/querying/functions.md
+1
-2
No files found.
content/docs/querying/functions.md
View file @
84bff408
...
@@ -248,8 +248,7 @@ src_label string, regex string)` matches the regular expression `regex` against
...
@@ -248,8 +248,7 @@ src_label string, regex string)` matches the regular expression `regex` against
the label
`src_label`
. If it matches, then the timeseries is returned with the
the label
`src_label`
. If it matches, then the timeseries is returned with the
label
`dst_label`
replaced by the expansion of
`replacement`
.
`$1`
is replaced
label
`dst_label`
replaced by the expansion of
`replacement`
.
`$1`
is replaced
with the first matching subgroup,
`$2`
with the second etc. If the regular
with the first matching subgroup,
`$2`
with the second etc. If the regular
expression doesn't match then the timeseries is not returned.
expression doesn't match then the timeseries is returned unchanged.
This example will return a vector with each time series having a
`foo`
This example will return a vector with each time series having a
`foo`
label with the value
`a`
added to it:
label with the value
`a`
added to it:
...
...
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