完整的错误如下:
level=debug ts=2021-08-16T09:07:43.412451Z caller=handler.go:355 component=receive component=receive-handler msg="failed to handle request" err="store locally for endpoint : conflict"
开始以为是 thanos receive 命令行中配置了receive.local-endpoint
参数导致的,去掉参数仍然不行。
prometheus中的关键配置为:
# prometheus.yaml
remote_write:
- url: "http://127.0.0.1:10908/api/v1/receive"
thanos receiver的启动命令行为:
thanos receive \
--tsdb.path "./20210816/" \
--grpc-address 0.0.0.0:10907 \
--http-address 0.0.0.0:10909 \
--receive.replication-factor 1 \
--label "receive_replica=\"0\"" \
--label "receive_cluster=\"eu1\"" \
--remote-write.address 0.0.0.0:10908 \
--log.level=debug \
--log.format=logfmt