Follow

Trimming Prometheus label values with relabel rules

- action: "replace"
source_labels: [lname]
target_label: "lname"
replacement: "${1}"
regex = "(.*).{8}" // this removes 8 characters from the end
regex = "(.*{5})(.*)" // this only keeps the first 5 characters

· · Web · 1 · 0 · 1

@tpaschalis are these combing to the rules config file? Looking forward to using these for a project

Sign in to participate in the conversation
Mastodon

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!