# Telegraf plugin problem

**URL:** <https://community.influxdata.com/t/telegraf-plugin-problem/18899>\
**Category:** Telegraf\
**Tags:** influxdb, outputs, docker\
**Created:** [March 15, 2021, 9:58pm UTC](https://community.influxdata.com/t/telegraf-plugin-problem/18899 "2021-03-15T21:58:37Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![1forrest](https://avatars.discourse-cdn.com/v4/letter/1/54ee81/32.png) [@1forrest](https://community.influxdata.com/u/1forrest)\
**Post date:** [March 15, 2021, 9:58pm UTC](https://community.influxdata.com/t/telegraf-plugin-problem/18899/1 "2021-03-15T21:58:37Z")

</div>

Hi!

I have installed influxdb and Telegraf on my Synology NAS in the Docker. In the Influxdb UI I created the bucket, telegraf configuration and token. When I start my Telegraf in the Terminal I can see the following problem:

[outputs.influxdb] When writing to [[http://localhost:8086](http://localhost:8086)]: 401 Unauthorized  
[agent] Error writing to outputs.influxdb: could not write any address

I saw somewhere that the localhost after the http should be changed to influxdb but I do not know how and not know if this is what I need to perform.

Thanks for your help!  
Krisztian

---

<div class="post-metadata">

**Author:** ![mhall119](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/mhall119/32/3898_2.png) [@mhall119](https://community.influxdata.com/u/mhall119)\
**Post date:** [March 15, 2021, 10:46pm UTC](https://community.influxdata.com/t/telegraf-plugin-problem/18899/2 "2021-03-15T22:46:13Z")

</div>

HI @1forrest,

The `localhost` should be changed to whatever the hostname is for your InfluxDB container. If you called it `influxdb` (which is common) then indeed you should replace `localhost` with `influxdb`, but if you’ve named it something else you’ll need to use that name instead.

---

<div class="post-metadata">

**Author:** ![1forrest](https://avatars.discourse-cdn.com/v4/letter/1/54ee81/32.png) [@1forrest](https://community.influxdata.com/u/1forrest)\
**Post date:** [March 16, 2021, 10:13am UTC](https://community.influxdata.com/t/telegraf-plugin-problem/18899/3 "2021-03-16T10:13:42Z")

</div>

Thanks for your answer. Can you help me with a description how I can change this? When I check the config file in the etc directory I cannot find it. I do not know how I can change this setting. Thanks!

---

<div class="post-metadata">

**Author:** ![Franky1](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/franky1/32/6666_2.png) [@Franky1](https://community.influxdata.com/u/Franky1)\
**Post date:** [March 16, 2021, 10:39am UTC](https://community.influxdata.com/t/telegraf-plugin-problem/18899/4 "2021-03-16T10:39:55Z")

</div>

@1forrest

I don’t know your setup exactly, but if you use docker, then the influxdb container has a name.  
You can run `docker ps` and the column `NAMES` will give you the name of the container.  
Afaik you have to use this name instead of `localhost`

---

<div class="post-metadata">

**Author:** ![1forrest](https://avatars.discourse-cdn.com/v4/letter/1/54ee81/32.png) [@1forrest](https://community.influxdata.com/u/1forrest)\
**Post date:** [March 16, 2021, 11:41am UTC](https://community.influxdata.com/t/telegraf-plugin-problem/18899/5 "2021-03-16T11:41:38Z")

</div>

The name is clear my problem is how to change this in the Telegraf’s config file. I assume I have to rewrite but I do not know how I can do it.  
I also tried to download the Telegraf config fle from Influxdb and whn I put it to the custom mounted path I have given during installation, Telegraf does not start up. It says that the confog file is not correct.  
So I do not know how to change the default config file of Telegraf and the one created by Influxdb does not work.

---

<div class="post-metadata">

**Author:** ![Franky1](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/franky1/32/6666_2.png) [@Franky1](https://community.influxdata.com/u/Franky1)\
**Post date:** [March 16, 2021, 11:47am UTC](https://community.influxdata.com/t/telegraf-plugin-problem/18899/6 "2021-03-16T11:47:46Z")

</div>

Which version of InfluxDB are you using?

> [@1forrest](#):
>
> It says that the confog file is not correct.

Please post the exact error message here:

````markdown
```log
put the error message here
```

````

Please post your Telegraf config in Markdown format here:

````markdown
```toml
put the Telegraf config code here
```

````

---

<div class="post-metadata">

**Author:** ![1forrest](https://avatars.discourse-cdn.com/v4/letter/1/54ee81/32.png) [@1forrest](https://community.influxdata.com/u/1forrest)\
**Post date:** [March 16, 2021, 7:41pm UTC](https://community.influxdata.com/t/telegraf-plugin-problem/18899/7 "2021-03-16T19:41:05Z")

</div>

Version:

 ![image](https://us1.discourse-cdn.com/flex023/uploads/influxdata/original/2X/3/3d137701ff0ca246fab9a181276df11bf8a49733.png)

---

<div class="post-metadata">

**Author:** ![1forrest](https://avatars.discourse-cdn.com/v4/letter/1/54ee81/32.png) [@1forrest](https://community.influxdata.com/u/1forrest)\
**Post date:** [March 16, 2021, 7:43pm UTC](https://community.influxdata.com/t/telegraf-plugin-problem/18899/8 "2021-03-16T19:43:12Z")

</div>

Log:  
2021-03-16T19:37:47Z I! Starting Telegraf 1.17.3 stdout  
2021-03-16T19:37:44Z I! Using config file: /etc/telegraf/telegraf.conf stdout  
2021-03-16T19:37:44Z E! [telegraf] Error running agent: Error: no inputs found, did you provide a valid config file? stdout

---

<div class="post-metadata">

**Author:** ![1forrest](https://avatars.discourse-cdn.com/v4/letter/1/54ee81/32.png) [@1forrest](https://community.influxdata.com/u/1forrest)\
**Post date:** [March 16, 2021, 7:45pm UTC](https://community.influxdata.com/t/telegraf-plugin-problem/18899/9 "2021-03-16T19:45:18Z")

</div>

Telegraf config, made by Influxdb. This is what I moved to /etc/telegraf/ folder and should be picked up by the Telegraf but goes to error

# Configuration for telegraf agent

[agent]

## Default data collection interval for all inputs

interval = “10s”

## Rounds collection interval to ‘interval’

## ie, if interval=“10s” then always collect on :00, :10, :20, etc.

round\_interval = true

## Telegraf will send metrics to outputs in batches of at most

## metric\_batch\_size metrics.

## This controls the size of writes that Telegraf sends to output plugins.

metric\_batch\_size = 1000

## For failed writes, telegraf will cache metric\_buffer\_limit metrics for each

## output, and will flush this buffer on a successful write. Oldest metrics

## are dropped first when this buffer fills.

## This buffer only fills when writes fail to output plugin(s).

metric\_buffer\_limit = 10000

## Collection jitter is used to jitter the collection by a random amount.

## Each plugin will sleep for a random time within jitter before collecting.

## This can be used to avoid many plugins querying things like sysfs at the

## same time, which can have a measurable effect on the system.

collection\_jitter = “0s”

## Default flushing interval for all outputs. Maximum flush\_interval will be

## flush\_interval + flush\_jitter

flush\_interval = “10s”

## Jitter the flush interval by a random amount. This is primarily to avoid

## large write spikes for users running a large number of telegraf instances.

## ie, a jitter of 5s and interval 10s means flushes will happen every 10-15s

flush\_jitter = “0s”

## By default or when set to “0s”, precision will be set to the same

## timestamp order as the collection interval, with the maximum being 1s.

## ie, when interval = “10s”, precision will be “1s”

## when interval = “250ms”, precision will be “1ms”

## Precision will NOT be used for service inputs. It is up to each individual

## service input to set the timestamp at the appropriate precision.

## Valid time units are “ns”, “us” (or “µs”), “ms”, “s”.

precision = “”

## Logging configuration:

## Run telegraf with debug log messages.

debug = false

## Run telegraf in quiet mode (error log messages only).

quiet = false

## Specify the log file name. The empty string means to log to stderr.

logfile = “”

## Override default hostname, if empty use os.Hostname()

hostname = “”

## If set to true, do no set the “host” tag in the telegraf agent.

omit\_hostname = false

[[outputs.influxdb\_v2]]

## The URLs of the InfluxDB cluster nodes.

## 

## Multiple URLs can be specified for a single cluster, only ONE of the

## urls will be written to each interval.

## urls exp: [http://127.0.0.1:8086](http://127.0.0.1:8086)

urls = [“[http://192.168.1.124:8086](http://192.168.1.124:8086)”]

## Token for authentication.

token = “$INFLUX\_TOKEN”

## Organization is the name of the organization you wish to write to; must exist.

organization = “forest”

## Destination bucket to write into.

bucket = “forest\_bucket”

---

<div class="post-metadata">

**Author:** ![Franky1](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/franky1/32/6666_2.png) [@Franky1](https://community.influxdata.com/u/Franky1)\
**Post date:** [March 16, 2021, 8:07pm UTC](https://community.influxdata.com/t/telegraf-plugin-problem/18899/10 "2021-03-16T20:07:03Z")

</div>

Please post your config in markdown format here, it is barely readable…  
I would say, you don’t have any `inputs` plugin in your Telegraf config?

---

<div class="post-metadata">

**Author:** ![1forrest](https://avatars.discourse-cdn.com/v4/letter/1/54ee81/32.png) [@1forrest](https://community.influxdata.com/u/1forrest)\
**Post date:** [March 16, 2021, 8:08pm UTC](https://community.influxdata.com/t/telegraf-plugin-problem/18899/11 "2021-03-16T20:08:08Z")

</div>

Using Putty through SSH, I receive the bellow error when run docker ps

Got permission denied while trying to connect to the Docker daemon socket at uni x:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.39/containers /json: dial unix /var/run/docker.sock: connect: permission denied

---

<div class="post-metadata">

**Author:** ![Franky1](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/franky1/32/6666_2.png) [@Franky1](https://community.influxdata.com/u/Franky1)\
**Post date:** [March 16, 2021, 8:20pm UTC](https://community.influxdata.com/t/telegraf-plugin-problem/18899/12 "2021-03-16T20:20:11Z")

</div>

```auto
sudo docker ps

```

---

<div class="post-metadata">

**Author:** ![1forrest](https://avatars.discourse-cdn.com/v4/letter/1/54ee81/32.png) [@1forrest](https://community.influxdata.com/u/1forrest)\
**Post date:** [March 16, 2021, 8:45pm UTC](https://community.influxdata.com/t/telegraf-plugin-problem/18899/13 "2021-03-16T20:45:28Z")

</div>

No data

 ![image](https://us1.discourse-cdn.com/flex023/uploads/influxdata/original/2X/7/7ed9af74ef2166c8707dc6160c4911443a197061.png)

---

<div class="post-metadata">

**Author:** ![Franky1](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/franky1/32/6666_2.png) [@Franky1](https://community.influxdata.com/u/Franky1)\
**Post date:** [March 17, 2021, 11:46am UTC](https://community.influxdata.com/t/telegraf-plugin-problem/18899/14 "2021-03-17T11:46:27Z")

</div>

> [@1forrest](#):
>
> 2021-03-16T19:37:44Z E! [telegraf] Error running agent: Error: no inputs found, did you provide a valid config file? stdout

As the error message makes clear, you have not configured any **input** plugin in Telegraf.  
How do you send data to InfluxDB without data? 😏

---

<div class="post-metadata">

**Author:** ![1forrest](https://avatars.discourse-cdn.com/v4/letter/1/54ee81/32.png) [@1forrest](https://community.influxdata.com/u/1forrest)\
**Post date:** [March 17, 2021, 9:53pm UTC](https://community.influxdata.com/t/telegraf-plugin-problem/18899/15 "2021-03-17T21:53:57Z")

</div>

Thanks! I have added the Fibaro plugin and at least it passed through but came up a new error message. 192.168.1.1:53 No such host error

 ![image](https://us1.discourse-cdn.com/flex023/uploads/influxdata/original/2X/0/0262967db10ab63b72074545a72f683628f74559.png)

---

<div class="post-metadata">

**Author:** ![1forrest](https://avatars.discourse-cdn.com/v4/letter/1/54ee81/32.png) [@1forrest](https://community.influxdata.com/u/1forrest)\
**Post date:** [March 18, 2021, 10:25am UTC](https://community.influxdata.com/t/telegraf-plugin-problem/18899/16 "2021-03-18T10:25:19Z")

</div>

I tried to look for IP address but I do not know what is it and why influxdb is looked up under that IP. Do I need to adjust the host file?

---

<div class="post-metadata">

**Author:** ![Franky1](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/franky1/32/6666_2.png) [@Franky1](https://community.influxdata.com/u/Franky1)\
**Post date:** [March 18, 2021, 10:47am UTC](https://community.influxdata.com/t/telegraf-plugin-problem/18899/17 "2021-03-18T10:47:57Z")

</div>

I don’t know your setup, so I can only guess.  
Is the InfluxDB instance running at all?  
Is the container running?

```auto
sudo docker ps -a

```

---

<div class="post-metadata">

**Author:** ![1forrest](https://avatars.discourse-cdn.com/v4/letter/1/54ee81/32.png) [@1forrest](https://community.influxdata.com/u/1forrest)\
**Post date:** [March 18, 2021, 12:31pm UTC](https://community.influxdata.com/t/telegraf-plugin-problem/18899/18 "2021-03-18T12:31:35Z")

</div>

Yes, it is running

 ![image](https://us1.discourse-cdn.com/flex023/uploads/influxdata/original/2X/4/4884df62b1c997e4908719046c0609a7dbc0f281.png)

---

<div class="post-metadata">

**Author:** ![1forrest](https://avatars.discourse-cdn.com/v4/letter/1/54ee81/32.png) [@1forrest](https://community.influxdata.com/u/1forrest)\
**Post date:** [March 18, 2021, 12:32pm UTC](https://community.influxdata.com/t/telegraf-plugin-problem/18899/19 "2021-03-18T12:32:35Z")

</div>

What I do not know where this IP is coming from

---

<div class="post-metadata">

**Author:** ![Franky1](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/franky1/32/6666_2.png) [@Franky1](https://community.influxdata.com/u/Franky1)\
**Post date:** [March 18, 2021, 12:38pm UTC](https://community.influxdata.com/t/telegraf-plugin-problem/18899/20 "2021-03-18T12:38:01Z")

</div>

> [@1forrest](#):
>
> Yes, it is running

Yes, but the InfluxDB container has no ports open, it is not accessible.  
Please post here your docker configuration or your `docker-compose.yml` file for the InfluxDB container.

[Next page](https://community.influxdata.com/t/telegraf-plugin-problem/18899.md?page=2)
