Merge pull request #10297 from prometheus/superq/improve_labelmap_doc

Improve wording of labelmap action
This commit is contained in:
Ben Kochie 2022-03-25 11:53:40 +01:00 committed by GitHub
commit c7be45d957
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2479,9 +2479,9 @@ anchored on both ends. To un-anchor the regex, use `.*<regex>.*`.
* `keep`: Drop targets for which `regex` does not match the concatenated `source_labels`. * `keep`: Drop targets for which `regex` does not match the concatenated `source_labels`.
* `drop`: Drop targets for which `regex` matches 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`. * `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 * `labelmap`: Match `regex` against all source label names, not just those specified in `source_labels`. Then
to label names given by `replacement` with match group references copy the values of the matching labels to label names given by `replacement` with match
(`${1}`, `${2}`, ...) in `replacement` substituted by their value. group references (`${1}`, `${2}`, ...) in `replacement` substituted by their value.
* `labeldrop`: Match `regex` against all label names. Any label that matches will be * `labeldrop`: Match `regex` against all label names. Any label that matches will be
removed from the set of labels. removed from the set of labels.
* `labelkeep`: Match `regex` against all label names. Any label that does not match will be * `labelkeep`: Match `regex` against all label names. Any label that does not match will be