The Network Time Protocol (NTP) integration is enabled by default and reports the time offset from an ntp server every 15 minutes. When the local agent's time is more than 15 seconds off from the Datadog service and the other hosts that you are monitoring, you may experience:
- Incorrect alert triggers
- Metric delays
- Gaps in graphs of metrics
Default NTP servers reached:
0.datadog.pool.ntp.org1.datadog.pool.ntp.org2.datadog.pool.ntp.org3.datadog.pool.ntp.org
Follow the instructions below to install and configure this check for an Agent running on a host. For containerized environments, see the Autodiscovery Integration Templates for guidance on applying these instructions.
The NTP check is included in the Datadog Agent package, so you don't need to install anything else on your servers.
The Agent enables the NTP check by default, but if you want to configure the check yourself, edit the file ntp.d/conf.yaml in the conf.d/ folder at the root of your Agent's configuration directory. See the sample ntp.d/conf.yaml for all available configuration options:
init_config:
instances:
- offset_threshold: 60 # seconds difference between local clock and NTP server when ntp.in_sync service check becomes CRITICAL; default is 60
# host: pool.ntp.org # set to use an NTP server of your choosing
# port: 1234 # set along with host
# version: 3 # to use a specific NTP version
# timeout: 5 # seconds to wait for a response from the NTP server; default is 1
# use_local_defined_servers: false # Use the NTP servers defined in the localhost; default is false
Configuration Options:
host(Optional) - Host name of alternate ntp server, for examplepool.ntp.orgport(Optional) - What port to useversion(Optional) - ntp versiontimeout(Optional) - Response timeoutuse_local_defined_servers(Optional) - True to use NTP servers defined in the localhost. For Unix system, the servers defined in /etc/ntp.conf and etc/xntp.conf are used. For Windows system, the servers defined in registry key HKLM\SYSTEM\CurrentControlSet\Services\W32Time\Parameters\NtpServer are used. Caveat: Enabling this option will make the NTP check unable to detect issues if the clock of the target NTP server of the system is skewed
Restart the Agent to effect any configuration changes.
Run the Agent's status subcommand and look for ntp under the Checks section.
See metadata.csv for a list of metrics provided by this check.
The NTP check does not include any events.
ntp.in_sync:
Returns CRITICAL if the NTP offset is greater than the threshold specified in ntp.yaml, otherwise OK.
Need help? Contact Datadog support.