A DNS check asks for one record type of one name and passes when the answer contains every expected value. With no expected values, any non-empty answer passes.
{ "type": "dns", "name": "example.com", "record": "MX", "expect": ["mail.example.com"]}| Field | Type | Default | Rules |
|---|---|---|---|
name |
string | required | A domain name |
record |
string | required | A, AAAA, CNAME, MX, TXT or NS |
resolver |
string | none | The resolver to ask, as an IP address or a name; port 53 |
expect |
array of strings | [] |
Up to 20 values; each one must be in the answer |
How answers compare
Section titled “How answers compare”Answers are compared as text:
- addresses in their canonical form (
2001:db8::1, not2001:0db8:0:0:0:0:0:1); - names in lowercase without the trailing dot;
MXas"<preference> <exchange>", for example10 mail.example.com. An expected value matches either the full form or the exchange alone;TXTas the concatenation of its strings.
A failed run lists the answers it got, so you can see what the record holds now.
Which resolver answers
Section titled “Which resolver answers”- the resolver the check names, after its address passes the node’s address rules;
- otherwise, on a platform node, fixed public resolvers;
- otherwise the node’s system resolver.
Platform nodes refuse single-label names (such as intranet): only the node’s own network could answer them. Use a private node for internal zones.
Failures: dns.nxdomain when the name does not exist, dns.no_records when it has no records of this type, dns.failed when the resolver gives no answer, and a list of missing values when an expected value is not in the answer.