前言
使用了阿里云的SLS 存储时序数据, 告警则用 Remote read 进行处理。 不过在使用的时候发生了怪事,每次当Prometheus Write tsdb trunk 的时, Prometheus就会默认从本地去检索数据。
问题就出现在本地检索数据, 完全没有数据他怎么检索。
解决
1 | remote_read: |
“read_recent: true”表示近期数据也要读远程存储。因为Prometheus近期数据无论如何都是要读本地存储的,如果开启这个标志位,Prometheus会把本地和远程的数据进行Merge。