我们正在尝试在灭霸和普罗米修斯的帮助下建立监控平台。我们让 Thanos 运行单独的集群,并且我们有多个 Prometheus 设置,它们通过 remoteWrite 将指标推送到 Thanos 接收器下面是我们在 Prometheus 中使用的 remoteWrite 的配置片段:
remoteWrite:
- url: https://abc.example.com/api/v1/receive
tlsConfig:
insecureSkipVerify: true
caFile: /etc/prometheus/secrets/thanos-tls-certs/ca.crt
certFile: /etc/prometheus/secrets/thanos-tls-certs/server.crt
keyFile: /etc/prometheus/secrets/thanos-tls-certs/server.key
以下是 Thanos 接收器进程及其参数:
receive
--log.level=info
--log.format=logfmt
--grpc-address=0.0.0.0:10901
--http-address=0.0.0.0:10902
--remote-write.address=0.0.0.0:19291
--receive.replication-factor=1
--objstore.config=$(OBJSTORE_CONFIG)
--tsdb.path=/var/thanos/receive
--label=replica="$(NAME)"
--label=receive="true"
--tsdb.retention=15d
--remote-write.server-tls-cert=/etc/ssl/certs/server.crt
--remote-write.server-tls-key=/etc/ssl/certs/server.key
--remote-write.server-tls-client-ca=/etc/ssl/certs/ca.crt
--receive.local-endpoint=127.0.0.1:10901
--receive.hashrings-file=/var/lib/thanos-receive/hashrings.json
我们有大约 4 个 Prometheus 实例用完,其中只有两个 Prometheus 实例的指标在 Thanos 上可见。所有 prometheus 实例都具有相同的配置。寻求任何帮助或指导。