I tried to create a project as part of my studies using AWS EC2, docker, Grafana, InfluxDB and Telegraf.
I created EC2, installed Docker, created Grafana and InfluxaDB containers, and installed Telegraf on the machine. Everything I did is on my github.
https://github.com/jeti20/Docker-InfluxDB-Grafana.Telegraf
Unfortunately, when I turn on Telegraf, I encounter a problem. After entering "sudo journalctl -f -u telegraf.service" I get the information:
telegraf[2304]: 2024-03-24T19:52:55Z W! [outputs.influxdb] When writing to [http://hereIsMyEC2IP:8086]: database "telegraf" creation failed: 401 Unauthorized
[outputs.influxdb] E! [outputs.influxdb] Failed to write metric (will be dropped: 401 Unauthorized):
I'm doing this for the first time so I'm not sure if it is problem with this token or maybe with permissions, not sure, I spend 2 days on this and dont know what to do next.
I will be grateful for feedback about the architecture if it is bad tell me why, I will be grateful for the feedback because I want to learn.