Create Dynamic Tags

Hello influx community,

I’ve just post a question in grafana community, quoted below.

I’ve a variable called $url like = x.domain.com y.domain.com z.domain.com … I’m displaying up/down state in a “single stats” panel and displaying the name as $url.

I want to display the $url variable as x y z only without the “.domain.com” part but I’ve to collect the information as full url. Is there very to trim/separate this string in grafana? If you have alternative approaches, I would like to hear 'em.

I’ve been thinking, may be I should keep another tag for each like title = x for shorter version of the url that I want to display. How can I do that? I’m using inputs.ping and inputs.http_response plugins.

Regards,

Hey, this is not possible with InfluxQL; but if you enable Flux - this is possible using the strings package.

Let me know if you’d like an example

@rawkode, Of course I would like to hear an example.

Thanks for the help.