- Configure the agent by editing
/etc/netsil-dd-agent/conf.d/dns_check.yamlin the collectors.
init_config: default_timeout: 4 instances: - name: example hostname: www.example.org # please notice: nameserver must be a valid IP address nameserver: 127.0.0.1 timeout: 8 # Specify an (optional) `record_type` to customize the record type # queried by the check (default: "A") # record_type: A # The check will automatically tag `nameserver` and `resolved_hostname` # Use this section to add additional tags # # tags: # - tag:one # - tag:two # If you use NXDOMAIN as the `record_type`, an NXDOMAIN result is expected from the query, # and the check instance will report response time data. # In many DNS systems, NXDOMAIN results are uncached. Further a query for a unqualified domain # name that one expects to return an NXDOMAIN result can result in many dns queries, depending # on the resolver's configured search domain. # For these reasons, these queries are good candidates to monitor the worst-case performance of a DNS lookup. # See https://github.com/DataDog/dd-agent/pull/2849 for more details. # - name: nxdomain_example # hostname: nxdomain.example.org # nameserver: 127.0.0.1 # record_type: NXDOMAIN
Check and make sure that all yaml files are valid with following command:
Restart the Agent using the following command:
Execute the info command to verify that the integration check has passed:
||second||The response time for DNS query for a given record, tagged by hostname, e.g. 'hostname:example.com'.|