Skip to main content

Dnscheck Receiver

Status Maintainers: @dmitryax Source: opentelemetry-collector-contrib

Supported Telemetry

Metrics

Overview

Configuration

The following configuration settings are available:
  • dns_servers (required): The list of DNS servers to query.
  • hostnames (required): The list of hostnames and record types to resolve.
  • collection_interval (optional, default = 60s): This receiver collects metrics on an interval. Valid time units are ns, us (or µs), ms, s, m, h.
  • initial_delay (optional, default = 1s): Defines how long this receiver waits before starting.

DNS Server Configuration

Each entry in dns_servers has the following properties:
  • endpoint (required): The DNS server address, as host or host:port (default port 53).
  • network (optional, default = udp): The transport protocol used to query the server. One of udp, tcp, or tcp-tls.
  • timeout (optional, default = 5s): Per-query dial timeout for this server.

Hostname Configuration

Each entry in hostnames has the following properties:
  • name (required): The hostname to resolve.
  • record_type (optional, default = A): The DNS record type to query (e.g. A, AAAA, CNAME, MX, TXT).

Optional Metrics Configuration

Each metric can be enabled or disabled individually. By default, all metrics are enabled except dnscheck.error. Example:

Metrics

Details about the metrics produced by this receiver can be found in documentation.md

RCODE Reference

The dnscheck.status metric carries the DNS response code (RCODE) returned for the query in its dns.rcode attribute. This attribute is present whenever a response was received from the server, even if the response itself indicates a failure (e.g. NXDOMAIN, SERVFAIL, REFUSED). It is absent only when no response was received at all, such as on a timeout or network unreachable error. The table below covers RCODE values 0-23; see the IANA DNS Parameters registry for the full and up-to-date list.

Example Configuration

Metrics

Attributes


Last generated: 2026-08-03