Commit 84bff408 authored by Tobias Schmidt's avatar Tobias Schmidt Committed by GitHub

Merge pull request #567 from prometheus/beorn7/fix

Fix `label_replace` documentation
parents 05eea034 b555789b
...@@ -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:
......
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