tig-stack icon indicating copy to clipboard operation
tig-stack copied to clipboard

DB creation failed in Telegraf logs

Open jpcapone opened this issue 2 years ago • 1 comments

I am modifying the telegraf.conf file to point to the influx db and I get the error below:

This is when i point to the ip of the influx db container:

[outputs.influxdb] When writing to [http://172.18.0.2:8086]: database "vmware" creation failed: Post "http://172.18.0.2:8086/query": dial tcp 172.18.0.2:8086: connect: connection refused
2023-01-02T23:16:33Z E! [outputs.influxdb] E! [outputs.influxdb] Failed to write metric (will be dropped: 401 Unauthorized):

This is when i point to the ip of the docker host:

[outputs.influxdb] When writing to [http://10.229.181.68:8086]: database "vmware" creation failed: Post "http://10.229.181.68:8086/query": read tcp 172.18.0.4:60732->10.229.181.68:8086: read: connection reset by peer
2023-01-02T23:17:27Z E! [outputs.influxdb] E! [outputs.influxdb] Failed to write metric (will be dropped: 401 Unauthorized): 

Any suggestions would be greatly appreciated.

jpcapone avatar Jan 02 '23 23:01 jpcapone

If someone stumbles across this post - my problem was that i was attempting to configure the [[outputs.influxdb]] section instead of the [[outputs.influxdb_v2]] portion of the telegraf.conf file. this stack is predicated on the .env file variables correctly populating the v2 section based on your config. There was no need for me to edit the v1 section.

jpcapone avatar Jan 06 '23 03:01 jpcapone