【采坑小计】thanos receiver的官方文档中,并未说明tsdb落盘的配置方式

官方文档的地址在:https://thanos.io/tip/components/receive.md/
一开始以为落盘的时间间隔是:--tsdb.retention=15d
实际测试中发现,thanos receiver的落盘时间是2小时,上面的配置看起来只是tsdb文件在本地磁盘保留的时间。

最后发现以下配置有效:

tsdb.min-block-duration=10m
tsdb.max-block-duration=10m

如何知道tsdb落盘的时间间隔是多少呢?通过10909端口的数据,然后用另一个pormetheus采集,通过promql可以查出来:

(prometheus_tsdb_head_max_time{instance="xx.xxx.192.115:10909"} - prometheus_tsdb_head_min_time{instance="xx.xxx.192.115:10909"})/1000/60
原文地址:https://www.cnblogs.com/ahfuzhang/p/15222011.html