DNS Check

Agent CheckAgent Check


Monitor the resolvability of and lookup times for any DNS records using nameservers of your choosing.



The DNS check is packaged with the Agent, so simply install the Agent on any host from which you want to probe your DNS servers. Though many metrics-oriented checks are best run on the same host(s) as the monitored service, you may want to run this status-oriented check from hosts that do not run the monitored DNS services.

If you need the newest version of the DNS check, install the dd-check-dns package; this package’s check will override the one packaged with the Agent. See the integrations-core repository for more details.


Create a file dns_check.yaml in the Agent’s conf.d directory. See the sample dns_check.yaml for all available configuration options:


  - name: Example (com)
    # nameserver:   # The nameserver to query, this must be an IP address
    hostname: example.com # the record to fetch
    # record_type: AAAA   # default is A
  - name: Example (org)
    hostname: example.org

If you omit the nameserver option, the check will use whichever nameserver is configured in local network settings.

Restart the Agent to begin sending DNS service checks and response times to Datadog.


Run the Agent’s info subcommand and look for dns_check under the Checks section:


      - instance #0 [OK]
      - instance #1 [OK]
      - Collected 2 metrics, 0 events & 2 service checks



The DNS check is compatible with all major platforms.

Data Collected


The response time for DNS query for a given record, tagged by hostname, e.g. 'hostname:example.com'.
shown as second


The DNS check does not include any event at this time.

Service Checks

This agent check tags all service checks it collects with:

  • nameserver:<nameserver_in_yaml>
  • resolved_hostname:<hostname_in_yaml>


Returns CRITICAL if the Agent fails to resolve the request, otherwise returns UP.

Tagged by hostname and record_type.


Need help? Contact Datadog Support.

Further Reading

Learn more about infrastructure monitoring and all our integrations on our blog