Influxdb tag substring

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

I can’t find a way to cut the tag data(like MySQL’s method substring) when i use the [[tag_hostname]] in influxdb datasource.

Example: hostname like 1.1 1.2 1.3

Expect display:
xxx1 1.1
xxx2 1.2
xxx3 1.3

Your’s software is fantastic, I appreciate Grafana so much that no word can express this feeling.

I may not fully understand your question, but would the Alias By box help achieve what you desire?

  • Yes,i had been using the alias by, here is my alias
  • here is the problem, the hostname’s length is too long, such as “”, “”. Now i just wanna display “bob” and “jim”, cut the “.name.123”, just like mysql’s function “substring”.
  • How should i solve this problem?

Hello, i have same problem. Did you solve it ?

To shorten up a long name (for example, web_server_01 to just 01), you can use an override like this:

Thank you alot grant2

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