# Display existing telegraf config in the influxdb 2 UI

**URL:** <https://community.influxdata.com/t/display-existing-telegraf-config-in-the-influxdb-2-ui/34974>\
**Category:** Telegraf\
**Tags:** influxdb, telegraf\
**Created:** [July 16, 2024, 7:06am UTC](https://community.influxdata.com/t/display-existing-telegraf-config-in-the-influxdb-2-ui/34974 "2024-07-16T07:06:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bartosz\_Jasiewicz](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/bartosz_jasiewicz/32/15979_2.png) [@Bartosz\_Jasiewicz](https://community.influxdata.com/u/Bartosz_Jasiewicz)\
**Post date:** [July 16, 2024, 7:06am UTC](https://community.influxdata.com/t/display-existing-telegraf-config-in-the-influxdb-2-ui/34974/1 "2024-07-16T07:06:23Z")

</div>

Hello,  
I have influxdb 2 and telegraf up and running as docker containers. Telegraf has its own configuration. It works okay, meaning it writes data to influxdb 2 local instance using output plugin . When I enter [http://localhost:8086/orgs/{org\_number}/load-data/telegrafs](http://localhost:8086/orgs/%7Borg_number%7D/load-data/telegrafs) I don’t see that telegraf config but I would like to be able to see it there. Is it possible at all?  
Second question, partially related. I would like to be able to edit the existing telegraf config. I know that there is this `GetTelegrafsApi` on the Influx Client in C# and it works properly, meaning I was able to create a config with this Api and see it under [http://localhost:8086/orgs/{org\_number}/load-data/telegrafs](http://localhost:8086/orgs/%7Borg_number%7D/load-data/telegrafs). But does this new config get copied to the running telegraf instance? Which telegraf agent does pick these configs that are created from `GetTelegrafsApi`? A new one runing in the influxdb 2 container?

---

<div class="post-metadata">

**Author:** ![jpowers](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/jpowers/32/8569_2.png) [@jpowers](https://community.influxdata.com/u/jpowers)\
**Post date:** [July 16, 2024, 1:55pm UTC](https://community.influxdata.com/t/display-existing-telegraf-config-in-the-influxdb-2-ui/34974/2 "2024-07-16T13:55:53Z")

</div>

> [@Bartosz\_Jasiewicz](#):
>
> I don’t see that telegraf config but I would like to be able to see it there. Is it possible at all?

You can see the telegraf configuration in the web interface. You can do what Telegraf does and download the config using your auth token and something like curl or wget.

> But does this new config get copied to the running telegraf instance?

No, not until you restart telegraf.

> Which telegraf agent does pick these configs that are created from `GetTelegrafsApi` ? A new one runing in the influxdb 2 container?

Not sure I understand the questions here.

---

<div class="post-metadata">

**Author:** ![Bartosz\_Jasiewicz](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/bartosz_jasiewicz/32/15979_2.png) [@Bartosz\_Jasiewicz](https://community.influxdata.com/u/Bartosz_Jasiewicz)\
**Post date:** [July 24, 2024, 2:24pm UTC](https://community.influxdata.com/t/display-existing-telegraf-config-in-the-influxdb-2-ui/34974/3 "2024-07-24T14:24:20Z")

</div>

Hi @jpowers,  
thanks for your answers! Still few things are unclear to me.

> You can see the telegraf configuration in the web interface  
> Hm, I used telegraf.conf which I mounted to the telegraf docker container, then I opened InfluxDB UI and I can’t see the config from telegraf.conf there. Probably I did something wrong?

> No, not until you restart telegraf.

Okay, let me rephrase to ensure I understood it completely:  
Each time I change something in the telegraf config _programatically_ (through let’s say InfluxDB C# client) I need to restart telegraf to get this new config applied?  
This is my setup:

> **[Best YAML Viewer Online](https://jsonformatter.org/yaml-viewer/16c354)**
>
> Free YAML Viewer is a web based viewer for YAML

> Which telegraf agent does pick these configs that are created from `GetTelegrafsApi` ? A new one runing in the influxdb 2 container?

I mean the situation like:

- I have InfluxDB docker container running
- I have telegraf docker container running with telegraf.conf mounted
- I used [Telegraf C# API to update already existing telegraf config](https://influxdata.github.io/influxdb-client-csharp/api/InfluxDB.Client.TelegrafsApi.html#InfluxDB_Client_TelegrafsApi_UpdateTelegrafAsync_System_String_InfluxDB_Client_Api_Domain_TelegrafPluginRequest_CancellationToken_)
- Will the telegraf docker container pick up this updated config? Or there is a _local_ telegraf agent running as linux proces inside the InfluxDB container?
- Will the telegraf container update the initial telegraf.conf not to loose the config created with the REST API?

Thanks in advance for your answers

---

<div class="post-metadata">

**Author:** ![jpowers](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/jpowers/32/8569_2.png) [@jpowers](https://community.influxdata.com/u/jpowers)\
**Post date:** [July 24, 2024, 2:28pm UTC](https://community.influxdata.com/t/display-existing-telegraf-config-in-the-influxdb-2-ui/34974/4 "2024-07-24T14:28:37Z")

</div>

> [@Bartosz\_Jasiewicz](#):
>
> Will the telegraf docker container pick up this updated config? Or there is a _local_ telegraf agent running as linux proces inside the InfluxDB container?

Telegraf has no way to know that the config was updated. You need to restart telegraf to fetch the config again.

> - Will the telegraf container update the initial telegraf.conf not to loose the config created with the REST API?

Telegraf has no write access to the remote config. It only does a GET to download the config.
