3

prometheus 和 node exporter 都使用 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"


4

1 回答 1

0

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

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

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

于 2021-05-12T09:56:02.457 回答