---
title: External DNS
description: Track all your External DNS metrics with Datadog
breadcrumbs: Docs > Integrations > External DNS
---

# External DNS
Supported OS Integration version6.4.0
## Overview{% #overview %}

Get metrics from the external DNS service in real time to visualize and monitor DNS metrics collected with the Kubernetes external DNS Prometheus add on.

For more information about external DNS, see the [Github repo](https://github.com/kubernetes-incubator/external-dns).

**Minimum Agent version:** 7.17.0

## Setup{% #setup %}

### Installation{% #installation %}

The external DNS 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 %}

Edit the `external_dns.d/conf.yaml` file, in the `conf.d/` folder at the root of your [Agent's configuration directory](https://docs.datadoghq.com/agent/guide/agent-configuration-files.md#agent-configuration-directory), to point to your server and port, and to set the masters to monitor. See the [sample external_dns.d/conf.yaml](https://github.com/DataDog/integrations-core/blob/master/external_dns/datadog_checks/external_dns/data/conf.yaml.example) for all available configuration options.

#### Using with service discovery{% #using-with-service-discovery %}

If you are using one Datadog Agent pod per Kubernetes worker node, use these example annotations on your external-dns pod to retrieve the data automatically:

```yaml
apiVersion: v1
kind: Pod
metadata:
  annotations:
    ad.datadoghq.com/external-dns.check_names: '["external_dns"]'
    ad.datadoghq.com/external-dns.init_configs: '[{}]'
    ad.datadoghq.com/external-dns.instances: '[{"prometheus_url":"http://%%host%%:7979/metrics", "tags":["externaldns-pod:%%host%%"]}]'
```

- The `externaldns-pod` tag keeps track of the target DNS pod IP. The other tags are related to the Datadog Agent that is polling the information using the autodiscovery.
- The autodiscovery annotations are done on the pod. To deploy, add the annotations to the metadata of the template's specification.

### Validation{% #validation %}

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

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

### Metrics{% #metrics %}

|  |
|  |
| **external\_dns.controller.last\_sync**(gauge)    | Timestamp of last successful sync with the DNS provider*Shown as second* |
| **external\_dns.registry.endpoints.total**(gauge) | Number of registry endpoints*Shown as resource*                          |
| **external\_dns.registry.errors.total**(gauge)    | Number of registry errors*Shown as error*                                |
| **external\_dns.source.endpoints.total**(gauge)   | Number of source endpoints*Shown as resource*                            |
| **external\_dns.source.errors.total**(gauge)      | Number of source errors*Shown as error*                                  |

### Events{% #events %}

The external DNS check does not include any events.

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

**external\_dns.prometheus.health**

Returns `CRITICAL` if the check cannot access the metrics endpoint, otherwise returns `OK`.

*Statuses: ok, critical*

## Troubleshooting{% #troubleshooting %}

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