telegraf: Outputs.influxdb authorization failed messages after upgrade to v1.27
Relevant telegraf.conf
[[outputs.influxdb]]
database = "asd"
insecure_skip_verify = false
password = "xxxxxxxxx"
skip_database_creation = true
urls = ["https://hostname.redacted:8086"]
username = "xxxxxxxxx"
Logs from Telegraf
2023-06-15T06:31:10.885805-05:00 hostname.redacted telegraf[2653546]: 2023-06-15T11:31:10Z E! [outputs.influxdb] E! [outputs.influxdb] Failed to write metric (will be dropped: 401 Unauthorized): authorization failed
System info
Telegraf v1.27.0 on RHEL 8.6 EUS
Docker
No response
Steps to reproduce
- Have a working [[outputs.influxdb]] config with Telegraf v1.26.3
- Upgrade to Telegraf v1.27.0 and restart service
- Observe Telegraf logs (and also notice metrics have stopped sending to InfluxDB
Expected behavior
Upgrading to Telegraf v1.27.0 won’t break the ability to ship metrics to InfluxDB
Actual behavior
When performing the above steps we get 401: Authorization Failed messages and metrics are not sent to the database. Reverting back to v1.26.3 allows things to work again.
Additional info
No response
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 21 (13 by maintainers)
I’ve confirmed this is indeed our issue. Escaping
$
in the password entry with$$
allows it to work with telegraf1.27.0
.by any chance your password contains
$
?