问题描述
我关注了此博客https://rancher.com/blog/2020/prometheus-metric-federation 在我们的kubernetes中设置thanos。
我们在集群A中仅包含-thanos Receiver,thanos Store和thanos Query。
每2个小时将数据块成功加载到S3中。但是,当我们指出Grafana仪表板使用thanos查询时,如果查询时间在10分钟(或少于2小时)内,则不会显示任何数据结果。但是查询时间范围在2小时之前的数据,则显示数据。
thanos Querier是否可以从thanos Receiver(来自Prometheus)查询实时数据?这是我的thanos Querier部署配置(如下) 我错过了任何配置吗?
containers:
- args:
- query
- --log.level=info
- --grpc-address=0.0.0.0:10901
- --http-address=0.0.0.0:9090
- --query.replica-label=prometheus_replica
- --query.replica-label=rule_replica
- --store=dnssrv+_grpc._tcp.thanos-store.thanos.svc.cluster.local
image: quay.io/thanos/thanos:v0.15.0
解决方法
是的,Thanos Query能够从Thanos Receive获取实时数据。 Thanos documentation for receive声明:
它公开了StoreAPI,以便Thanos Queriers可以实时查询收到的指标。
只需在查询调用中添加另一个--store选项即可指向thanos-receive gRPC端口