Monitoring NTP service

Started by opn_nwo, January 31, 2022, 04:09:20 PM

Previous topic - Next topic
I use Monit to monitor few critical services, NTPD being one of them. Now that the pid file has been removed ( know it was unreliable at times) I can't monitor it the same way I used to. Any other way to monitor and restart it if dies?

Not sure about Monit integration but from a script I would use this:

# pgrep -q ntpd || echo "service not running"


Cheers,
Franco