Print substrings or portions of legend metrics name
Closed this issue · 1 comments
Data source: PCP-Redis
Is your feature request related to a problem? Please describe.
The problem is that there are some metrics like the metrics related to procs, like hotproc.memory.rss (or similar) that prints the rss of some processes, but sometimes this processes can have a very very long name (like java processes), that doesn't give useful information, and the graphic that results has very long legend name and is unreadable if there are a high number of processes, and i want to only select a portion of this long name, for example i can have:
server.hotproc.memory.rss.056363 java -Xmx8G -Xms512M -Djava 2Esecurity2Eegd 3Dfile 3A///dev/2E/urandom -Djava2Esecurity -Djava 2Esecurity 2Emanager SCM PARAMS 2020 2E062E16
And i only want the legend have one of the last fields, like SCM
Describe the solution you'd like
Would be useful in the legend field of grafana-pcp, to enter some regular expression to only show the field in the legend that you are interested, like a substring of the full legend original name, or some portion of that
Describe alternatives you've considered
An alternative for example would be to replace some values to another shorter, for example in the previous:
server.hotproc.memory.rss.056363 java -Xmx8G -Xms512M -Djava2Esecurity 2Eegd 3Dfile3A///dev/2E/urandom -Djava 2Esecurity 2Emanager SCM PARAMS 2020 2E06 2E16
If all the processes start with the same process name can substitute:
server.hotproc.memory.rss.056363 java -Xmx8G -Xms512M -Djava 2Esecurity2Eegd 3Dfile 3A///dev/ 2E/urandom -Djava 2Esecurity 2Emanager -> To some name like "Memory", and this would give a shorter legend much more readable
Additional context
This issue has been automatically marked as stale because it has not had recent activity in the last 60 days. It will be closed in 30 days if no further activity occurs. Thank you for your contributions.