Re: Question about Chrony's metrics

Miroslav Lichvar <[email protected]>
Newsgroups gmane.comp.time.chrony.user
Message-ID <ZRGecgBkjUmk18DJ@localhost>
On Mon, Sep 25, 2023 at 04:27:13PM +0900, Semyon Galichenko wrote:
> Hi all,
> 
> I have Chrony configured with 2 sources like so:
> ```
> server 192.168.10.1 prefer iburst
> server 192.168.10.2 noselect
> ```
> The server should be synchronized only with the first source and just
> monitor the second one (hence `noselect` option).
> I want to be sure that the time set on the server has no more than 1
> second difference with the time obtained from both sources.
> 
> What would be the right way to do it with Chrony? What metric can be
> used to check such a time drift?

You would need to monitor the offset of the second source reported in
the statistics log (enabled by logdir + log statistics in chrony.conf)
or periodically check the output of the "chronyc sources" command. 

If you remove the noselect option and let chronyd use both sources,
chronyd will do that for you. It will log a "no majority" error
message when the sources don't agree with each other.

-- 
Miroslav Lichvar


-- 
To unsubscribe email chrony-users-request-kWFZVVI9zxvPqho9SqqRMmD2FQJk+8+b@public.gmane.org 
with "unsubscribe" in the subject.
For help email chrony-users-request-kWFZVVI9zxvPqho9SqqRMmD2FQJk+8+b@public.gmane.org 
with "help" in the subject.
Trouble?  Email [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.