Monitors / DNS
DNS
Query a named resolver. Assert the rcode and the first answer.
How it works
Target is the resolver, not the name you are looking up. The probe asks that resolver for dns_query_name / dns_query_type and records the rcode plus answers. [BODY] is the first answer. [DNS_RCODE] is the response code (NOERROR, NXDOMAIN, …).
DNS monitors do not look up domain expiry. Use an HTTP, ping, or TLS monitor with [DOMAIN_EXPIRATION] for that.
Target
Resolver host or IP. Port defaults to 53.
1.1.1.1Type fields
| Field | What it does |
|---|---|
dns_query_name | Name to look up, e.g. example.com. |
dns_query_type | A, AAAA, CNAME, MX, NS, PTR, SRV, or TXT. Defaults to A. |
Placeholders
Available on this type. See conditions for operators and pat() / has() / len() / any().
[DNS_RCODE] [BODY] [CONNECTED] [RESPONSE_TIME] [IP]
Defaults
New monitors of this type start with:
[DNS_RCODE] == NOERRORExample conditions
[DNS_RCODE] == NOERROR[BODY] == 93.184.216.34[BODY] == pat(v=spf1*)GraphQL
type is Dns. Same fields as the admin, camelCase in the input (intervalSeconds, requestBody, probeIds).
mutation {
createMonitor(input: {
name: "example.com A"
type: Dns
target: "1.1.1.1"
dnsQueryName: "example.com"
dnsQueryType: A
conditions: ["[DNS_RCODE] == NOERROR"]
}) { id }
}Terraform
Resource is nominal_monitor from returnearly/nominal. type is Dns. Shared arguments match the shared fields in snake_case (name, target, interval_seconds, probe_ids, channel_ids). Omitted conditions use the type defaults.
Type arguments: dns_query_name, dns_query_type.
resource "nominal_monitor" "example_a" {
name = "example.com A"
type = "Dns"
target = "1.1.1.1"
dns_query_name = "example.com"
dns_query_type = "A"
conditions = ["[DNS_RCODE] == NOERROR"]
}