1
resposta

Telegraf não se conecta ao Influx

Alguém poderia me ajudar ? Eu fiz como na aula, subi o Grafana e o Influxdb pelo docker, com as portas informadas, mas quando instalei o Telegraf na minha maquina ele não se conecta ao banco. Estou executando em um servidor linux, e ao testar o serviço do Telegraf foi retornado que ele está ativo, mas com essa mensagem.

agent error writing to outputs, influxdb could not write any address - 401 unauthorized
1 resposta

Estou com o mesmo problema.

vagrant@ubuntu-bionic:~$ sudo service telegraf status
● telegraf.service - The plugin-driven server agent for reporting metrics into InfluxDB
   Loaded: loaded (/lib/systemd/system/telegraf.service; enabled; vendor preset: enabled)
   Active: active (running) since Tue 2021-06-15 01:18:57 UTC; 23h ago
     Docs: https://github.com/influxdata/telegraf
 Main PID: 24245 (telegraf)
    Tasks: 9 (limit: 1151)
   CGroup: /system.slice/telegraf.service
           └─24245 /usr/bin/telegraf -config /etc/telegraf/telegraf.conf -config-directory /etc/telegraf/telegraf.d

Jun 16 00:30:03 ubuntu-bionic telegraf[24245]: 2021-06-16T00:30:03Z E! [outputs.influxdb] When writing to [http://localhost:8086]: 401 Unauthorized
Jun 16 00:30:03 ubuntu-bionic telegraf[24245]: 2021-06-16T00:30:03Z E! [agent] Error writing to outputs.influxdb: could not write any address
Jun 16 00:30:13 ubuntu-bionic telegraf[24245]: 2021-06-16T00:30:13Z E! [outputs.influxdb] When writing to [http://localhost:8086]: 401 Unauthorized
Jun 16 00:30:13 ubuntu-bionic telegraf[24245]: 2021-06-16T00:30:13Z E! [agent] Error writing to outputs.influxdb: could not write any address
Jun 16 00:30:23 ubuntu-bionic telegraf[24245]: 2021-06-16T00:30:23Z E! [outputs.influxdb] When writing to [http://localhost:8086]: 401 Unauthorized
Jun 16 00:30:23 ubuntu-bionic telegraf[24245]: 2021-06-16T00:30:23Z E! [agent] Error writing to outputs.influxdb: could not write any address
Jun 16 00:30:33 ubuntu-bionic telegraf[24245]: 2021-06-16T00:30:33Z E! [outputs.influxdb] When writing to [http://localhost:8086]: 401 Unauthorized
Jun 16 00:30:33 ubuntu-bionic telegraf[24245]: 2021-06-16T00:30:33Z E! [agent] Error writing to outputs.influxdb: could not write any address
Jun 16 00:30:43 ubuntu-bionic telegraf[24245]: 2021-06-16T00:30:43Z E! [outputs.influxdb] When writing to [http://localhost:8086]: 401 Unauthorized
Jun 16 00:30:43 ubuntu-bionic telegraf[24245]: 2021-06-16T00:30:43Z E! [agent] Error writing to outputs.influxdb: could not write any address
vagrant@ubuntu-bionic:~$