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"