---
title: NTP
description: Get alerts when your hosts drift out of sync with your chosen NTP server.
breadcrumbs: Docs > Integrations > NTP
---

# NTP
Supported OS Integration version1.0.0
## Overview{% #overview %}

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 other hosts you are monitoring, you may experience:

- Incorrect alert triggers
- Metric delays
- Gaps in graphs of metrics

By default, the check detects which cloud provider the Agent is running on and uses the private NTP server of that cloud provider, if available. If no cloud provider is detected, the agent will default to the NTP servers below:

- `0.datadog.pool.ntp.org`
- `1.datadog.pool.ntp.org`
- `2.datadog.pool.ntp.org`
- `3.datadog.pool.ntp.org`

**Note:** NTP requests do not support proxy settings.

## Setup{% #setup %}

### Installation{% #installation %}

The NTP check is included in the [Datadog Agent](https://app.datadoghq.com/account/settings/agent/latest) package, so you don't need to install anything else on your servers.

### Configuration{% #configuration %}

{% tab title="Host" %}
#### Host{% #host %}

The Agent enables the NTP check by default. 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](https://docs.datadoghq.com/agent/guide/agent-configuration-files/#agent-configuration-directory). See the [sample ntp.d/conf.yaml](https://github.com/DataDog/datadog-agent/blob/master/cmd/agent/dist/conf.d/ntp.d/conf.yaml.default) for all available configuration options.

Outgoing UDP traffic over the port `123` should be allowed so the Agent can confirm that the local server time is reasonably accurate according to the Datadog NTP servers.

**Note**: If you edit the Datadog-NTP check configuration file, [restart the Agent](https://docs.datadoghq.com/agent/guide/agent-commands/#start-stop-and-restart-the-agent) to effect any configuration changes.
{% /tab %}

{% tab title="Containerized" %}
#### Containerized{% #containerized %}

For containerized environments, see the documentation concerning [Autodiscovery configurations](https://docs.datadoghq.com/containers/kubernetes/integrations/?tab=annotations#configuration) for guidance on applying the parameters below. See the sample [ntp.d/conf.yaml](https://github.com/DataDog/datadog-agent/blob/main/cmd/agent/dist/conf.d/ntp.d/conf.yaml.default) for all available configuration options.

##### Metric collection{% #metric-collection %}

| Parameter            | Value                        |
| -------------------- | ---------------------------- |
| `<INTEGRATION_NAME>` | `["ntp"]`                    |
| `<INIT_CONFIG>`      | `[{}]`                       |
| `<INSTANCE_CONFIG>`  | `[{"host": "<NTP_SERVER>"}]` |

{% /tab %}

### Validation{% #validation %}

[Run the Agent's `status` subcommand](https://docs.datadoghq.com/agent/guide/agent-commands/#agent-status-and-information) and look for `ntp` under the Checks section.

## Data Collected{% #data-collected %}

### Metrics{% #metrics %}

|  |
|  |
| **ntp.offset**(gauge)         | The time difference between the NTP reference clock and the local clock.*Shown as second*                                                                                |
| **ntp.intake\_offset**(gauge) | The time difference between the Datadog intake server clock and the local clock, derived from the HTTP Date response header. Available from Agent 7.79.*Shown as second* |

### Events{% #events %}

The NTP check does not include any events.

### Service Checks{% #service-checks %}

**ntp.in\_sync**

Returns CRITICAL if the host clock is more than the configured threshold away from the NTP time. Returns UNKNOWN if the Agent can not connect to the NTP server. Returns OK otherwise.

*Statuses: ok, critical, unknown*

## Troubleshooting{% #troubleshooting %}

Need help? Contact [Datadog support](https://docs.datadoghq.com/help/).
