Label substring as legend

I have a Prometheus timeseries, it has a label “host”. So I can use {{host}} as legend and get its values like:
com.acme.www
com.acme.mail
com.acme.ftp

Is there a way to specify the legend so that it only displays the last substring:
www
mail
ftp

I’m using version 10.4.5.

Use Rename by regex transformation:

3 Likes

Wow, that’s exactly what I needed. Thanks ebabeshko !

Thanks for the response man. I have been trying to get it to work with overrides. Is it possible to have this globally on a dashboard level?