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
97c0bcec
Commit
97c0bcec
authored
Jul 10, 2015
by
Julius Volz
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #127 from prometheus/hashmod
Document hashmod
parents
06637d55
90ec0c9b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
configuration.md
content/docs/operating/configuration.md
+8
-2
No files found.
content/docs/operating/configuration.md
View file @
97c0bcec
...
...
@@ -308,7 +308,10 @@ source_labels: '[' <labelname> [, ...] ']'
[ target_label: <labelname> ]
# Regular expression against which the extracted value is matched.
regex: <regex>
[ regex: <regex> ]
# Modulus to take of the hash of the source label values.
[ modulus: <uint64> ]
# Replacement value against which a regex replace is performed if the
# regular expression matches.
...
...
@@ -318,7 +321,9 @@ regex: <regex>
[ action: <relabel_action> | default = replace ]
```
`<regex>`
is any valid
[
RE2 regular expression
](
https://github.com/google/re2/wiki/Syntax
)
.
`<regex>`
is any valid
[
RE2 regular
expression](https://github.com/google/re2/wiki/Syntax). It is required for
the
`replace`
,
`keep`
, and
`drop`
actions.
`<relabel_action>`
determines the relabeling action to take:
...
...
@@ -327,6 +332,7 @@ regex: <regex>
(
`${1}`
,
`${2}`
, ...) in
`replacement`
substituted by their value.
*
`keep`
: Drop targets for which
`regex`
does not match the concatenated
`source_labels`
.
*
`drop`
: Drop targets for which
`regex`
matches the concatenated
`source_labels`
.
*
`hashmod`
: Set
`target_label`
to the
`modulus`
of a hash of the concatenated
`source_labels`
.
### Metric relabeling `<metric_relabel_configs>`
...
...
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