Page 1 of 1
check_ntp_peer for chrony
Posted: Thu Aug 14, 2025 7:55 am
by shoreypu
Hello,
We have a new time server that now uses Chrony vs NTP, so the check_ntp_peer no longer works. Is anyone aware of a chronyc version of that script? We are just looking to confirm that a primary source is set and the offset.
Thanks in advance.
Re: check_ntp_peer for chrony
Posted: Thu Aug 14, 2025 1:25 pm
by DoubleDoubleA
Hi @shoreypu,
It doesn't look like there is a chrony version in Nagios official plugins but when I search "check_chrony" in my browser I get a couple of options. Hopefully one of those might work for you.
Aaron
Re: check_ntp_peer for chrony
Posted: Thu Aug 14, 2025 11:21 pm
by justinbieber
You might be able to adapt something pretty quickly using chronyc tracking or chronyc sources in a custom script.
For example, chronyc tracking will give you the current offset, and chronyc sources -v shows whether you’re synced to a primary source. Parsing those outputs with awk/grep could give you the same checks check_ntp_peer did.
Re: check_ntp_peer for chrony
Posted: Thu Sep 11, 2025 4:21 pm
by nagios-dnelson
If you haven't solved this yet, but you'd like to take a crack at making your own script into a plugin, I suggest taking a look at this article.
https://library.nagios.com/training/gui ... m-plugins/
I hope that helps!