From 3b082e48a19a4cef9259e97f7f837eeb21f23875 Mon Sep 17 00:00:00 2001 From: SuperQ Date: Mon, 14 Feb 2022 15:31:51 +0100 Subject: [PATCH 1/2] Improve wording of labelmap action Update the wording of the `labelmap` relabel action to make it more clear that it acts on all the label names, rather than the list provided by source_labels. Signed-off-by: SuperQ --- docs/configuration/configuration.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/configuration/configuration.md b/docs/configuration/configuration.md index 48c0af8eb1..004c8f78d7 100644 --- a/docs/configuration/configuration.md +++ b/docs/configuration/configuration.md @@ -2471,9 +2471,9 @@ anchored on both ends. To un-anchor the regex, use `.*.*`. * `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`. -* `labelmap`: Match `regex` against all label names. Then copy the values of the matching labels - to label names given by `replacement` with match group references - (`${1}`, `${2}`, ...) in `replacement` substituted by their value. +* `labelmap`: Ignore `source_labels` and match `regex` against all source label names. Then + copy the values of the matching labels to label names given by `replacement` with match + group references (`${1}`, `${2}`, ...) in `replacement` substituted by their value. * `labeldrop`: Match `regex` against all label names. Any label that matches will be removed from the set of labels. * `labelkeep`: Match `regex` against all label names. Any label that does not match will be From b9a1b00475bee69d07222dfac064ccbc81e85154 Mon Sep 17 00:00:00 2001 From: Richard Hartmann Date: Fri, 4 Mar 2022 20:50:51 +0100 Subject: [PATCH 2/2] Update docs/configuration/configuration.md Co-authored-by: Levi Harrison --- docs/configuration/configuration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/configuration/configuration.md b/docs/configuration/configuration.md index 004c8f78d7..c8bfc23e8f 100644 --- a/docs/configuration/configuration.md +++ b/docs/configuration/configuration.md @@ -2471,7 +2471,7 @@ anchored on both ends. To un-anchor the regex, use `.*.*`. * `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`. -* `labelmap`: Ignore `source_labels` and match `regex` against all source label names. Then +* `labelmap`: Match `regex` against all source label names, not just those specified in `source_labels`. Then copy the values of the matching labels to label names given by `replacement` with match group references (`${1}`, `${2}`, ...) in `replacement` substituted by their value. * `labeldrop`: Match `regex` against all label names. Any label that matches will be