I have the following metrics that I want to display in my graph as Legend
I have done this by using the aliasSub:
aliasSub('^(.*)\.cluster\.(.*)\.MAX', '\1 \2')
and it display the Legend correctly :
however I need to replace the underline with space (so the legend will show “node1 status machine”
I can not use only alias or aliasByNode as “node1” can be anything, and “status_machine” can be anything like “status_engine”, “status_of_kernel”, “status_of_red_engine”.
my aim is to display it instead as “node1 status machine” (the underline is replaced). if I am using metrics of"status_of_kernel" then it will display “node1 status of kernel”
This is not possible with re.sub, due to the fact that the second group can be build from multiple words and underlines.
However, I want to know if there is a work around to allow me displaying the Legend based on the metrics without underline.