# Create Dynamic Tags

**URL:** <https://community.influxdata.com/t/create-dynamic-tags/12297>\
**Category:** Store\
**Tags:** influxdb, telegraf, grafana\
**Created:** [December 12, 2019, 7:58am UTC](https://community.influxdata.com/t/create-dynamic-tags/12297 "2019-12-12T07:58:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mert](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/mert/32/5152_2.png) [@Mert](https://community.influxdata.com/u/Mert)\
**Post date:** [December 12, 2019, 7:58am UTC](https://community.influxdata.com/t/create-dynamic-tags/12297/1 "2019-12-12T07:58:24Z")

</div>

Hello influx community,

I’ve just post a question in [grafana community](https://community.grafana.com/t/visualization-trim-string/23891), quoted below.

> I’ve a variable called $url like = [x.domain.com](http://x.domain.com/) [y.domain.com](http://y.domain.com/) [z.domain.com](http://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,

---

<div class="post-metadata">

**Author:** ![rawkode](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/rawkode/32/5161_2.png) [@rawkode](https://community.influxdata.com/u/rawkode)\
**Post date:** [December 14, 2019, 8:18pm UTC](https://community.influxdata.com/t/create-dynamic-tags/12297/2 "2019-12-14T20:18:25Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Mert](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/mert/32/5152_2.png) [@Mert](https://community.influxdata.com/u/Mert)\
**Post date:** [December 16, 2019, 1:04pm UTC](https://community.influxdata.com/t/create-dynamic-tags/12297/3 "2019-12-16T13:04:37Z")

</div>

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

Thanks for the help.
