Facing issue in running telegraf docker

  • I have a docker container running influxdb (version: v2.7.6).
  • My telegraf.conf looks like this:
 ## 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:
 urls = ["http://localhost:8086"]

 ## Token for authentication.

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

 ## Destination bucket to write into.
 bucket = "bucket_test"
  • When I am running my Telegraf docker with the following command:
docker run -d --name=telegraf \
      -v /mytelegrafconfigsdir/telegraf.conf:/var/lib/influxdb \
      --net=influxdb-telegraf-net \
  • it is failing to run and the log is as below:
2024-07-10T07:25:56Z I! Loading config: /etc/telegraf/telegraf.conf
2024-07-10T07:25:56Z E! [telegraf] Error running agent: no outputs found, did you provide a valid config file?

I am unable to understand why is my output isn’t considered from the config file. Pardon me for any blunders but I am just a day old in this. Thanks in advance!

This is not the right path to upload the config to. It should be /etc/telegraf/telegraf.conf

1 Like