Page 1 of 1
NTP plugin
Posted: Thu Jan 07, 2021 8:33 am
by mejokj
Hi Team,
Please suggest us on the below query for NTP plugin
If we want to use check_time plugin, NTP is enabled and then servers have to be configured in ntp.conf ?
whether the check_time plug-in check time on NTP server defined in the ntp conf?
Which NTP server is the plugin using to did the correct time and compare it with time on the client?
Is that NTP server hardcoded in plugins config or is it set based on what is configured on the client?
Thanks
Re: NTP plugin
Posted: Fri Jan 08, 2021 12:44 pm
by benjaminsmith
Hi
@mejokj,
The check_time plugin does not sue the ntp protocol, so I believe you would want to use check_ntp_time. The plugin will check the clock offset between the local host and a remote NTP server.
For example:
Code: Select all
./check_ntp_time -H 129.6.15.28 -w 0.5 -c 1
For a description of the plugin arguments, the man page is online at:
https://www.monitoring-plugins.org/doc/ ... _time.html
Let me know if that plugin is going to meet your requirements or not.
Best Regards,
Benjamin
Re: NTP plugin
Posted: Mon Jan 11, 2021 3:12 am
by mejokj
Hi Benjaminsmith,
Thanks for your reply. I have same questions about the check_ntp_time plugin as well.
Could you please help
If we want to use check_ntp_time plugin and ntp is enabled, then servers have to be configured in ntp.conf ??
whether check_ntp_time plug-in checks time only the ntp server defined in the ntp conf?
Which ntp server is plugin using to did the correct time and compare it with time on client?
Is that ntp server hardcoded in plugins config or is it set based on what is configured on the client?
Regards
Re: NTP plugin
Posted: Mon Jan 11, 2021 5:17 pm
by benjaminsmith
HI mejokj,
The check_ntp_time plugin does not parse the ntp server from ntp.conf, you'll want to specify the server in the plugin arguments. For example,
Code: Select all
./check_ntp_time -H 0.centos.pool.ntp.org -w 0.5 -c 10
This plugin will check the time offset with the specified NTP server. I would recommend checking the ntp.conf file on the remote systems to determine which time server(s) to run checks against.
Hope that helps answer your question, just let me know if you need clarification on anything.
Benjamin