我启动 Loki 和 Telegraf 容器;Telegraf 无法写信给 Loki;初始日志条目显示成功:
telegraf_1 | 2022-01-17T13:56:13Z D! [agent] Attempting connection to [outputs.loki]
telegraf_1 | 2022-01-17T13:56:13Z D! [agent] Successfully connected to outputs.loki
但是后来 Telegraf 失败了:
telegraf_1 | 2022-01-17T13:56:33Z D! [outputs.loki] Buffer fullness: 117 / 10000 metrics
telegraf_1 | 2022-01-17T13:56:33Z E! [agent] Error writing to outputs.loki: when writing to [http://loki:3100/loki/api/v1/push] received status code: 400
Telegraf 输出配置:
[[outputs.loki]]
## The domain of Loki
domain = "http://loki:3100"
## Endpoint to write api
endpoint = "/loki/api/v1/push"
## If the request must be gzip encoded
gzip_request = false
Telegram 和 Loki 的日志级别都设置为调试,还有其他方法可以解决这个问题吗?