Hello everyone I can’t fix this problem when I start the service sudo service telegraf start
I get this error
basalisco@HASSIO:~$ sudo service telegraf status
● telegraf.service - Telegraf
Loaded: loaded (/lib/systemd/system/telegraf.service; enabled; preset: enabled)
Active: active (running) since Tue 2024-01-09 21:38:07 CET; 1min 6s ago
Docs: https://github.com/influxdata/telegraf
Main PID: 7539 (telegraf)
Tasks: 9 (limit: 9345)
Memory: 47.5M
CGroup: /system.slice/telegraf.service
└─7539 /usr/bin/telegraf -config /etc/telegraf/telegraf.conf -config-directory /etc/telegraf/telegraf.d
gen 09 21:38:29 HASSIO telegraf[7539]: 2024-01-09T20:38:29Z E! [outputs.influxdb_v2] When writing to [http://10.0.0.30:8086]: failed to write metric to Monitoring (401 Unauthorized): unauthorized: unauthorized access
gen 09 21:38:29 HASSIO telegraf[7539]: 2024-01-09T20:38:29Z E! [agent] Error writing to outputs.influxdb_v2: failed to send metrics to any configured server(s)
gen 09 21:38:39 HASSIO telegraf[7539]: 2024-01-09T20:38:39Z E! [outputs.influxdb_v2] When writing to [http://10.0.0.30:8086]: failed to write metric to Monitoring (401 Unauthorized): unauthorized: unauthorized access
gen 09 21:38:39 HASSIO telegraf[7539]: 2024-01-09T20:38:39Z E! [agent] Error writing to outputs.influxdb_v2: failed to send metrics to any configured server(s)
gen 09 21:38:49 HASSIO telegraf[7539]: 2024-01-09T20:38:49Z E! [outputs.influxdb_v2] When writing to [http://10.0.0.30:8086]: failed to write metric to Monitoring (401 Unauthorized): unauthorized: unauthorized access
gen 09 21:38:49 HASSIO telegraf[7539]: 2024-01-09T20:38:49Z E! [agent] Error writing to outputs.influxdb_v2: failed to send metrics to any configured server(s)
gen 09 21:38:59 HASSIO telegraf[7539]: 2024-01-09T20:38:59Z E! [outputs.influxdb_v2] When writing to [http://10.0.0.30:8086]: failed to write metric to Monitoring (401 Unauthorized): unauthorized: unauthorized access
gen 09 21:38:59 HASSIO telegraf[7539]: 2024-01-09T20:38:59Z E! [agent] Error writing to outputs.influxdb_v2: failed to send metrics to any configured server(s)
gen 09 21:39:09 HASSIO telegraf[7539]: 2024-01-09T20:39:09Z E! [outputs.influxdb_v2] When writing to [http://10.0.0.30:8086]: failed to write metric to Monitoring (401 Unauthorized): unauthorized: unauthorized access
gen 09 21:39:09 HASSIO telegraf[7539]: 2024-01-09T20:39:09Z E! [agent] Error writing to outputs.influxdb_v2: failed to send metrics to any configured server(s)
but when I start it as a program with the command telegraf telegraf --config /etc/telegraf/telegraf.conf
I don’t have any problem, everything works. I can’t fix this problem