【问题标题】:prometheus samples are too old or are too far into the futureprometheus 样本太旧或未来太远
【发布时间】:2019-11-17 01:40:27
【问题描述】:

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"


【问题讨论】:

    标签: prometheus prometheus-node-exporter


    【解决方案1】:

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

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

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-05-15
      • 2016-12-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多