How do I get Nagios to check whether the time is set correctly on a remote machine? (Where "correctly" is defined as "within a few seconds of the time on the Nagios server".)
The problem I keep running into is that for whatever reason, the time becomes wrong on one of my servers (because it rebooted while the ntp server was unreachable, or who knows what). Generally I only discover this days later when something has gone annoyingly wrong, like tickets are still on sale after doors.
I don't see an easy way to write such a Nagios plugin, though. Does such a thing already exist?
(Just checking whether an ntpd process is running is not enough. I want to do something like: string-compare the textual output of a pair of "date" commands.)
Update: Ok, I guess 'check_ntp -H ntp-server' is pretty close to what I want... though it won't detect the timezone going wonky.