Re: [chrony-users] check_ntp_peer with Chrony

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-users Archives ]


Il giorno 18 gen 2018, alle ore 19:12, Bill Unruh <unruh@xxxxxxxxxxxxxx> ha scritto:
> You might also tell us what it is you want to learn, since it may be possible
> that someone has a better way of doing so than using icinga or nagios... Ie, you seem to have settled on a solution and are having problems
> implimenting it, when the problem might have a much simpler solution.

Intro: i have asked to monitoring plugins guys to consider the problem, as check_ntp_peer is not documented on the fact that on openntpd and chrony is not working.
https://github.com/monitoring-plugins/monitoring-plugins/issues/1526

The goal:
I am already managing the environment with $automationsytems (let’s say puppet, but may be ansible or whatever) and i would like to check the time for all of the nodes.

Plus, i would like to check the status of my internal ntp servers, two for each site.

My preferred way to check it is to monitor on all of the nodes the numbers of available servers and its synchronization status.

In example, on ntp servers if i have less then 2 servers currently available and with less then 0.1 second (example) offset from the master, then trigger the alarm.
on ntp client, if i have less then 1 server currently available... you got the idea i think.

so, on ntp internal servers check_ntp_peer behavior is my preferred solution (see below for explanation).
Is fine to run it locally or remotely (currently local check through nrpe is performed with ntpd).

In my understanding, `chronyc sources` show the data needed to accomplish this output.
There is the offset, there is the stratum, there is the synchronization status with the remote server.
But as i am new to chrony, i may be totally wrong :)

What i would like to have, is a different way then `chronyc sources` output parsing (regexp?). Something more close to a protocol call/api approach.
Therefore i think chronyc protocol to call chronyd directly -- dunno if this is really possible to ask only for some data.

On the “clients” is fine to use something simpler, but the above may apply as well.
So, `chronyc tracking`.

Again, it would be awesome to query chrony directly, and avoid output parsing.

To have a comparison with the current provided solution with the standard monitoring tools, the check of time can be done in two way as highlighted above.
This make use of ntp protocol in both cases -even if with some mode not requested as to be implemented-, to the best of my knowledge.

check_ntp_peer
https://www.monitoring-plugins.org/doc/man/check_ntp_peer.html
 Use this plugin to check the health of an NTP server. It supports
 checking the offset with the sync peer, the jitter and stratum. This
 plugin will not check the clock offset between the local host and NTP
 server; please use check_ntp_time for that purpose.

With this, is possible also to check the available ntp sources.
This is not intended to check the local server time (even if, this is done if you are running it on the local system and ntp server is synchronizing the time).

If you need to check only the offset of the local system,

check_ntp_time
https://www.monitoring-plugins.org/doc/man/check_ntp_time.html
This plugin checks the clock offset between the local host and a
remote NTP server. It is independent of any commandline programs or
external libraries.

Hope this clarify,

Any suggestion is welcome,

Thank you very much for the support,
Daniele

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/