Requesting Help Configuring check_ntp_time
Requesting Help Configuring check_ntp_time
I am interesting comparing the time on the Nagios host and a NTP server. I understand how to write the definitions within the configuration files, but I do not now much about NPT servers.
Are there public NTP servers that I can access (and where can I find the credentials like ip address/host name of the public server)?
Also I am currently hosting my Nagios on a RHEL machine, but in the future I will be switching the host to a mac mini. Will there be any changes I will have to make to the definitions or configurations if I make this change?
Are there public NTP servers that I can access (and where can I find the credentials like ip address/host name of the public server)?
Also I am currently hosting my Nagios on a RHEL machine, but in the future I will be switching the host to a mac mini. Will there be any changes I will have to make to the definitions or configurations if I make this change?
-
- Skynet Drone
- Posts: 2620
- Joined: Wed Feb 11, 2015 1:56 pm
Re: Requesting Help Configuring check_ntp_time
Welcome back rockxd,
there are lots of public NTP servers in a pool. I suggest you read up here:
http://www.pool.ntp.org/en/
The question going forward - now that you have all of your servers using time protocol to compare remote time to Nagios server time, do you want to deploy that check to all of your remote servers or are you just hoping to verify the time of your Nagios server. Verifying the time of your Nagios server is trivial. You just setup a command definition and service for your localhost using the check_ntp plugin.
add to commands.cfg:
add to localhost.cfg:
It should be just that easy.
there are lots of public NTP servers in a pool. I suggest you read up here:
http://www.pool.ntp.org/en/
The question going forward - now that you have all of your servers using time protocol to compare remote time to Nagios server time, do you want to deploy that check to all of your remote servers or are you just hoping to verify the time of your Nagios server. Verifying the time of your Nagios server is trivial. You just setup a command definition and service for your localhost using the check_ntp plugin.
add to commands.cfg:
Code: Select all
define command{
command_name check_ntp
command_line $USER1$/check_ntp $ARG1$
}
Code: Select all
define service {
host_name localhost
service_description NTP
check_command check_ntp!-H pool.ntp.org
use generic-service
}
Re: Requesting Help Configuring check_ntp_time
As for the configs, nothing should need to change in terms of changing things like "service_description" if that's what you mean.
Former Nagios employee
Re: Requesting Help Configuring check_ntp_time
All I want is to check my Nagios host with the NTP server. I used the configuration you suggested, but i get a CRITICAL message of "No response from NTP server "
-
- Skynet Drone
- Posts: 2620
- Joined: Wed Feb 11, 2015 1:56 pm
Re: Requesting Help Configuring check_ntp_time
Possibly a connection issue?
Code: Select all
[jdalrymple@localhost libexec]$ sudo ntpdate -v pool.ntp.org
13 Mar 13:41:53 ntpdate[94765]: ntpdate 4.2.6p5@1.2349-o Sat Dec 20 02:53:40 UTC 2014 (1)
13 Mar 13:41:54 ntpdate[94765]: adjust time server 97.107.129.217 offset 0.001322 sec
-
- Skynet Drone
- Posts: 2620
- Joined: Wed Feb 11, 2015 1:56 pm
Re: Requesting Help Configuring check_ntp_time
This just means that NTP is functioning on that server, which is good
Code: Select all
[jdalrymple@localhost libexec]$ sudo /etc/init.d/ntpd stop
Shutting down ntpd: [ OK ]
[jdalrymple@localhost libexec]$ sudo ntpdate -v pool.ntp.org
13 Mar 14:18:28 ntpdate[105149]: ntpdate 4.2.6p5@1.2349-o Sat Dec 20 02:53:40 UTC 2014 (1)
13 Mar 14:18:29 ntpdate[105149]: adjust time server 199.102.46.76 offset 0.001079 sec
[jdalrymple@localhost libexec]$ sudo /etc/init.d/ntpd start
Starting ntpd: [ OK ]
Re: Requesting Help Configuring check_ntp_time
It is saying that my server is not suitable for synchronization.
-
- Skynet Drone
- Posts: 2620
- Joined: Wed Feb 11, 2015 1:56 pm
Re: Requesting Help Configuring check_ntp_time
Can you ping pool.ntp.org?
Usually that message means either the ntp server is unreachable, or your clock skew is too great to correct it.
It might also be worthwhile to checkout your ntp.conf and make sure we even have some servers configured:
Usually that message means either the ntp server is unreachable, or your clock skew is too great to correct it.
It might also be worthwhile to checkout your ntp.conf and make sure we even have some servers configured:
Code: Select all
[jdalrymple@localhost ~]$ sudo grep ^server /etc/ntp.conf
server 0.centos.pool.ntp.org iburst
server 1.centos.pool.ntp.org iburst
server 2.centos.pool.ntp.org iburst
server 3.centos.pool.ntp.org iburst
Re: Requesting Help Configuring check_ntp_time
Those servers are not in the configuration, should I add them?