DNS
Performs queries to a DNS server, typical use cases include:
- Checking the latency of the DNS server in a Kubernetes cluster
 - Verifying that there are serving records for a DNS based load balancer.
 
dns.yamlapiVersion: 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*
| Field | Description | Scheme | 
|---|---|---|
name* | Name of the check, must be unique within the canary  | string  | 
query* | Domain name to lookup  | string  | 
server* | Address of DNS server to query e.g.   | string  | 
exactreply | Expected exact match result(s)  | []string  | 
minrecords | Minimum number of records expected in response  | int  | 
port | Port to query DNS server on. Defaults to   | |
querytype | Record type to query e.g.   | string  | 
thresholdMillis | Threshold response time from DNS server  | int  | 
timeout | Timeout in seconds  | int  | 
description | Description for the check  | string  | 
display | Expression to change the formatting of the display  | |
icon | Icon for overwriting default icon on the dashboard  | |
labels | Labels for check  | map[string]string  | 
metrics | Metrics to export from  | |
test | Evaluate whether a check is healthy  | |
transform | Transform data from a check into multiple individual checks  |