Prometheus Alerting on NodeClockNotSynchronising for VMs

Whatever the ntpd you are running, the kernel time discipline is reporting an error.

See man ntp_adjtime for the API and related constants.

On Linux, this could either be from NTP or PPS. Let's assume NTP, and further assume the error status is STA_UNSYNC, unsynchronized. This is set at boot. And cleared if a system call is done with a ADJ_OFFSET mode, in other words if a ntpd is attempting to gradually change the clock. This not happening does not make sense, all clocks will be at least a little bit off.

Review your /etc/ntp.conf. Ensure it contains 4 or more sources via server or pool directives. Delete any undisciplined local clocks, which begin with server 127.127.1. LOCL is obsolete, most server clocks are not amazing, and possibly the 0 offset is preventing the unsync from being cleared.

Restart ntpd and wait two minutes. Watch the offsets compared to the NTP servers with ntpq -p, or chronyc sources -v, should be single or double digit ms but not zero.

Double check the date. Try it without confusing time zones: date --utc