普罗米修斯样本太旧或太远

时间:2019-07-07 05:50:28

标签: prometheus prometheus-node-exporter

prometheus和节点导出器都使用chrony来同步时间。

[root@MiWiFi-R3-srv node_exporter-0.18.1.linux-amd64]# timedatectl 
      Local time: Sun 2019-07-07 13:48:15 CST
  Universal time: Sun 2019-07-07 05:48:15 UTC
        RTC time: Sun 2019-07-07 05:48:15
       Time zone: Asia/Shanghai (CST, +0800)
     NTP enabled: yes
NTP synchronized: yes
 RTC in local TZ: no
      DST active: n/a

[root@MiWiFi-R3-srv prometheus]# timedatectl 
      Local time: Sun 2019-07-07 13:48:44 CST
  Universal time: Sun 2019-07-07 05:48:44 UTC
        RTC time: Sun 2019-07-07 05:48:45
       Time zone: Asia/Shanghai (CST, +0800)
     NTP enabled: yes
NTP synchronized: yes
 RTC in local TZ: no
      DST active: n/a


但是普罗米修斯抱怨时间错了

level=warn ts=2019-07-07T05:46:02.960Z caller=scrape.go:1199 component="scrape manager" scrape_pool=prometheus target=http://192.168.2.22:9100/metrics msg="Error on ingesting samples that are too old or are too far into the future" num_dropped=429
level=warn ts=2019-07-07T05:46:02.960Z caller=scrape.go:952 component="scrape manager" scrape_pool=prometheus target=http://192.168.2.22:9100/metrics msg="appending scrape report failed" err="out of bounds"


1 个答案:

答案 0 :(得分:0)

在我的 Prometheus 服务器发生事件后,我遇到了同样的错误,该服务器因 OOM 重新启动。 herehere 讨论了该问题。

理论上,在传递错误设置的时间数据后,它应该再次记录指标。

如果旧数据不是问题,您可以删除 Prometheus 数据文件夹并重新启动服务作为快速解决方案。