You are missing a colon after "source_labels". On Tuesday, 7 June 2022 at 10:35:29 UTC+1 David Friedman wrote:
> did this and got an error "mapping values are not allowed in this context" > relabel_configs: > - source_labels [tag_Customer] > action: labelmap > regex: "[^_]+_(.+)" > replacement: "$1" > On Tuesday, June 7, 2022 at 11:55:33 AM UTC+3 [email protected] wrote: > >> That won't work because labelmap needs a `source_labels` to act on. >> >> On Tue, Jun 7, 2022 at 9:05 AM David Friedman < >> [email protected]> wrote: >> >>> Hi all >>> I'm trying to relabel a label from tag_name to just name >>> I tried to do something like this >>> - action: labelmap >>> regex: "[^_]+_(.+)" >>> replacement: "$1" >>> but it didn't work >>> any help would be appreciated >>> thanks >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Prometheus Users" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/prometheus-users/130e874a-4961-412b-9619-99817ceb527dn%40googlegroups.com >>> >>> <https://groups.google.com/d/msgid/prometheus-users/130e874a-4961-412b-9619-99817ceb527dn%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> >> -- You received this message because you are subscribed to the Google Groups "Prometheus Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/8cac0cba-9411-4979-a3f5-901fb58835d5n%40googlegroups.com.

