shorten variable

  • What Grafana version and what operating system are you using?

  • Grafana in Docker Grafana v7.1.3 (5723d951af) oder Grafana v8.0.4 (81fef5b4b4)

  • What are you trying to achieve?

  • Shorten Template Variable ($hostname)

  • How are you trying to achieve it?

  • No Ideas

  • What happened?

  • Nothing

  • What did you expect to happen?

  • Tutorial / Help to shorten Variable

we pull from a icinga2 database all host names, we use these in different dashboards with templates to display uniform graphs for all machines. With a handful of graphs, however, it bothers us that icinga provides the fqdn name, but I do not want to see this in the dashboard. is there a way to shorten variables?

Variable hostname
Query: SHOW TAG VALUES WITH KEY = “hostname”.
Regex: /win.c00505|win.c00508|win.c00512|win.c00531|win.c00542|win.mgmt/

(names by way of example)


for some graphs and text fields I would like to display ONLY app-c00508-p06-win instead of

thanks in advance

This topic was automatically closed after 365 days. New replies are no longer allowed.