Pcornel
Observability · Observability Troubleshooting

Clock Skew and Timestamps

Cheat sheet · https://pcornel.dk/topic.php?topic=6234

Back to the Topic

Answer

Clock skew between hosts makes telemetry timestamps disagree: spans with negative durations, logs out of order, rejected samples (out-of-order/too old).

Remember

Run NTP/chrony everywhere and alert on offset. Prefer backend-assigned ingest time only when source time is unreliable.

First checks

  • chronyc tracking — first check for this topic
  • curl -s localhost:9090/-/ready — Prometheus ready
  • curl -s 'localhost:9090/api/v1/query?query=up' — scrape targets up/down
  • promtool check config prometheus.yml — config valid

Verify in this order

host clock → timestamp on telemetry → backend ordering/validation

Where it usually breaks

Containers use the host clock, so fix it on the node.

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=6234

Confirmation

Confirm action

Continue?