I have a influxdb, grafana setup, using Telegraf to feed it.
On the “localhost” I use telegraf, I created it’s token inside influxdb gui and it works. So now onto the next machine I want to fetch metrics from. I create an new bucket (why not?), create an rw token for that bucket. Create an telegram.conf on that machine fix it and start telegram using docker-compose.
This is what I get:
E! [agent] Error writing to outputs.influxdb_v2: failed to write metric (401 Unauthorized): unauthorized: unauthorized access
This is the part where the output is set:
[[outputs.influxdb_v2]]
urls = ["http://10.1.1.150:8086"]
token = "${INFLUX_TOKEN}"
organization = "home"
bucket = "dockerone"
And here is the docker-compose for telegraf:
telegraf:
image: telegraf:latest
pid: "host"
container_name: telegraf
ports:
- 8092:8092
- 8094:8094
- 8125:8125
volumes:
- ./appdata/telegraf/telegraf.conf:/etc/telegraf/telegraf.conf:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
- /sys:/host/sys:ro
- /proc:/host/proc:ro
- /etc:/host/etc:ro
environment:
- HOST_PROC=/host/proc
- HOST_SYS=/host/sys
- HOST_ETC=/host/etc
restart: unless-stopped
I have tried with two different tokens, the one I created for that bucket and I got a access all token same error. I tried redoing the token for the bucket, still the same error.
I have created the two token the same way, they look the same in influxgui.
What have I missed?