Define "didn't work" - what actually happened?  Can you show some examples?

Where are you doing this: inside a relabel_configs block, or a 
metric_relabel_configs block, or somewhere else?  What version of 
Prometheus?  Did you reload/HUP prometheus after changing the config?

I believe you'll get both old and new labels, unless you also have a 
labeldrop rule for the old ones.

On Tuesday, 7 June 2022 at 08:05:11 UTC+1 David Friedman 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 prometheus-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/4edcea49-8653-411c-9024-065b43e39340n%40googlegroups.com.

Reply via email to