Afternoon all. Slowing adding servers and checks, and ran into a check I am not sure how to handle. As the subject states, I am using NRPE and checking a lot of things, but want to make sure time on the servers never drifts past x seconds.
There are some out there that do it via SSH, the issue I have is a lot of servers are behind a load balancer, so I am using NRPE on the same IP but different ports so I control what goes where. The plugins all do it via SSH. Now I guess I could check via ssh on other ports to do the same, but that would involve keygen's, and a lot of work, as opposed to something already in place and working.
I don't care if I check the drift against the nagios server (which most do), or via ntp.ubuntu.com, or any other ntp server, but anyone have experience or know how?
Thanks.
check server time via NRPE plugin?
Re: check server time via NRPE plugin?
You could run check_ntp through nrpe. Or you could run check_ntp_perr through nrpe to have the server check against a time server of your choice.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
-
- Posts: 10
- Joined: Fri Apr 11, 2014 12:38 pm
Re: check server time via NRPE plugin?
ugh, I saw them, didn't put 2 and 2 together when it was looking for the host!
/usr/lib/nagios/plugins/check_ntp_time -H ntp.ubuntu.com -w .5 -c 10
NTP OK: Offset 0.007176041603 secs|offset=0.007176s;60.000000;240.000000;
Worked like a charm, thanks for the quick reply, hate when I ask questions like that ... usually I know better, but still thanks for the prompt reply!
/usr/lib/nagios/plugins/check_ntp_time -H ntp.ubuntu.com -w .5 -c 10
NTP OK: Offset 0.007176041603 secs|offset=0.007176s;60.000000;240.000000;
Worked like a charm, thanks for the quick reply, hate when I ask questions like that ... usually I know better, but still thanks for the prompt reply!