check_ntp_peer for chrony

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Post Reply
shoreypu
Posts: 134
Joined: Wed Mar 13, 2019 2:06 pm

check_ntp_peer for chrony

Post 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.
DoubleDoubleA
Posts: 273
Joined: Thu Feb 09, 2017 5:07 pm

Re: check_ntp_peer for chrony

Post 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
justinbieber
Posts: 1
Joined: Fri Jun 14, 2024 9:25 pm

Re: check_ntp_peer for chrony

Post 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.
nagios-dnelson

Re: check_ntp_peer for chrony

Post 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!
Post Reply