Skip to main content
DNS monitors require a hostname and support assertions against resolution results, response times, and specific record values.
Define this in code. YAML format · Terraform

Config fields

FieldTypeRequiredDefaultDescription
config.hostnamestringYesDomain name to resolve
config.recordTypesarray of stringNo["A", "AAAA"]Record types to query: A, AAAA, CNAME, MX, NS, TXT, SRV, SOA, CAA, PTR
config.nameserversarray of stringNo["8.8.8.8", "1.1.1.1"]Custom nameservers to query, tried in order
config.timeoutMsintegerNo1500Per-resolver timeout in milliseconds
config.totalTimeoutMsintegerNo4000Total timeout for all queries in milliseconds

Assertions

AssertionRequired fieldsDescription
dns_resolves(none)Passes if the hostname resolves at all
dns_response_timemaxMsFails if resolution takes longer than threshold
dns_response_time_warnwarnMsRecords degraded hint for elevated resolution time
dns_expected_ipsips (array)Fails if resolved IPs don’t match expected set
dns_expected_cnamevalueFails if CNAME target doesn’t match
dns_record_containsrecordType, substringFails if record value doesn’t contain substring
dns_record_equalsrecordType, valueFails if record value doesn’t match exactly
dns_txt_containssubstringFails if no TXT record contains substring
dns_min_answersrecordType, minFails if answer count is below minimum
dns_max_answersrecordType, maxFails if answer count exceeds maximum
dns_ttl_lowminTtlFails if TTL is below minimum
dns_ttl_highmaxTtlFails if TTL exceeds maximum

Examples

Basic resolution check

Full validation with expected IPs

SPF record validation

Next steps

DNS overview

When to use DNS monitors.

Regions

Available probe regions.