How to set field suffix as alias in Grafana with Elasticsearch

Viewed 1154

I have graphs defined from Elasticsearch source with long field names such as private_data.systemMetrics.systemData.cpu.usage_user. I would like to set alias for the cpu usage fields that will display only the field name suffixes, in above example, usage_user. Using Grafana v4.5.2

CPU Usage graph with alias set to {{field}}:{{metric}}

I found a way to display a short alias but it is costly. I split the query with multiple fields into a list of queries, each on a single field with explicit alias.

Is there a better way to do it?

CPU Usage graph with multiple queries and explicit alias

0 Answers
Related