Skip to main content

DNS

The DNS check queries DNS records and measures DNS response latency. Use this check to:

  • Check the latency of the DNS server in a Kubernetes cluster.
  • Verify that a DNS-based load balancer has serving records.
dns.yaml
apiVersion: canaries.flanksource.com/v1
kind: Canary
metadata:
name: dns-pass
spec:
schedule: "@every 1m"
dns:
- server: 8.8.8.8
name: A record query
port: 53
query: "1.2.3.4.nip.io"
querytype: "A"
minrecords: 1
exactreply: ["1.2.3.4"]
timeout: 100
thresholdMillis: 1000
- server: 1.1.1.1
port: 53
name: ptr query
query: "1.1.1.1"
querytype: "PTR"
minrecords: 1
exactreply: ["one.one.one.one."]
timeout: 100
thresholdMillis: 100
- server: 8.8.8.8
port: 53
name: cname query
query: "dns.google"
querytype: "CNAME"
minrecords: 1
exactreply: ["dns.google."]
timeout: 100
thresholdMillis: 1000
- server: 8.8.8.8
port: 53
query: "flanksource.com"
name: mx query
querytype: "MX"
minrecords: 1
exactreply:
- aspmx.l.google.com. 1
- aspmx.l.google.com. 1
- alt1.aspmx.l.google.com. 5
- alt2.aspmx.l.google.com. 5
- alt2.aspmx.l.google.com. 5
- alt1.aspmx.l.google.com. 5
- aspmx2.googlemail.com. 10
- aspmx3.googlemail.com. 10
- aspmx3.googlemail.com. 10
- aspmx2.googlemail.com. 10
timeout: 100
thresholdMillis: 1000
- server: 8.8.8.8
port: 53
name: txt query
query: "flanksource.com"
querytype: "TXT"
minrecords: 1
timeout: 100
thresholdMillis: 1000
- server: 8.8.8.8
port: 53
name: NS query
query: "flanksource.com"
querytype: "NS"
minrecords: 1
exactreply:
- "gina.ns.cloudflare.com."
- "walt.ns.cloudflare.com."
timeout: 100
thresholdMillis: 1000
# - server: 8.8.8.8
# port: 53
# querytype: "SRV"
# query: "_test._tcp.test"
# timeout: 10
# srvReply:
# target: ""
# port: 0
# priority: 0
# weight: 0*
FieldDescriptionScheme
name*

Name of the check, must be unique within the canary

string

query*

Domain name to look up

string

exactreply

Expected exact match result(s)

[]string

minrecords

Minimum number of records expected in response

integer

port

Port to query DNS server on. Defaults to 53

integer

querytype

Record type to query. Supported values are A, CNAME, SRV, MX, PTR, TXT, and NS.. Defaults to A

string

server

DNS server to query. If omitted, Canary Checker uses the host resolver.

string

thresholdMillis

Threshold response time from DNS server

integer

timeout

Check timeout in seconds. Defaults to 10

integer

dependsOn

Checks that must complete before this check runs

[]string

description

Description for the check

string

display

Expression to change the formatting of the display

Expression

icon

Icon for overwriting default icon on the dashboard

Icon

labels

Labels for check

[map[string]string]

markFailOnEmpty

If a transformation or datasource returns empty results, the check should fail

boolean

metrics

Metrics to export from

[]Metrics

namespace

Namespace to insert the check result into when it differs from the canary namespace

string

relationships

Relationships that link check results to components or configs

Relationship

test

Evaluate whether a check is healthy

Expression

transform

Transform data from a check into multiple individual checks

Expression

transformDeleteStrategy

Status to apply to transformed checks when the source check no longer returns them

string