Get the time sync state
The console serves the clock of its host to the servers over the mesh (UDP port 123), and chrony on each server prefers it. The console reads the clock and the chrony source of each server every 5 minutes. The response has the readings of the last measurement.
/api/v1/console/time-synctse_sessionAPI key · cookierequiredOK
clockConsoleClockResponserequiredShow propertiesHide properties
checked_atstring<date-time>The time of the last measurement
limit_secondsinteger<int64>requiredThe largest offset for which the status is ok
offset_secondsnumber<double>The time to add to the console clock to get the reference time. Absent when the status is unknown
referencestringThe NTP server that answered, or the number of servers
sourcestringThe reference: an NTP server, or the clocks of the servers
ntpserversstatusstringrequiredok: the clock is within limit_seconds of the reference. wrong: it is not. unknown: no NTP server answered, and fewer than two servers have clocks that agree
okwrongunknownntp_serviceNtpServiceResponserequiredShow propertiesHide properties
addressstringThe mesh address and the UDP port of the NTP service
clock_syncedbooleanrequiredThe answers say that the console clock is synced. false: pool.ntp.org, or without its answer the kernel of the console host, says that the clock is not synced, and chrony on the servers does not use the console
errorstringWhy the console does not serve NTP
last_errorstringThe last read error of the NTP service, also when it serves again
last_error_atstring<date-time>The time of last_error
servingbooleanrequiredThe console answers NTP requests on its mesh address
serversTimeSyncServerResponse[]requiredThe readings of the enrolled servers at clock.checked_at, in the order of the servers
Show propertiesHide properties
TimeSyncServerResponseconsole_selectedbooleanrequiredchrony on the server selected the console as its source
demobooleanrequiredA demo server uses the clock of the Docker host and runs no chrony
errorstringWhy the console could not read the clock of the server
offset_secondsnumber<double>The server clock minus the console clock, in seconds. Absent when the console could not read the clock
selected_sourcestringThe address of the source that chrony on the server selected. Absent when chrony selected no source or does not run
server_idstringrequiredserver_namestringrequiredError
codestringStable code of the refusal, when the route has codes
detailsstring[]Additional detail, e.g. per-field validation failures
errorstringrequiredHuman-readable error message