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.
check_ntp_peer for chrony
-
DoubleDoubleA
- Posts: 290
- Joined: Thu Feb 09, 2017 5:07 pm
Re: check_ntp_peer for chrony
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
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
-
justinbieber
- Posts: 1
- Joined: Fri Jun 14, 2024 9:25 pm
Re: check_ntp_peer for chrony
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.
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.
-
nagios-dnelson
Re: check_ntp_peer for chrony
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!
https://library.nagios.com/training/gui ... m-plugins/
I hope that helps!
-
davismaria
- Posts: 1
- Joined: Sat Apr 04, 2026 4:27 am
Re: check_ntp_peer for chrony
You can use the chronyc command to achieve similar functionality. Specifically, you can run chronyc sources to check the status of your time sources and see the offset. If you want to automate this, you could create a script that parses the output of chronyc sources to confirm the primary source and its offset. Let me know if you need help with the script!