Skip to main content

DNS Monitor

The DNS monitor queries DNS records and validates the results. Use it to verify that your DNS is resolving correctly and returning expected values.

Configuration Options

OptionDescriptionDefault
HostnameThe domain name to queryRequired
Record typeDNS record type to queryA
Expected valueValue the record should resolve toNone
TimeoutMaximum time to wait for response10s
IntervalHow often to run the check60s
RegionsWhich regions run the checkAll

Supported Record Types

TypeDescriptionExample Value
AIPv4 address93.184.216.34
AAAAIPv6 address2606:2800:220:1:248:1893:25c8:1946
CNAMECanonical nameexample.cdn.com
MXMail exchange10 mail.example.com
TXTText recordv=spf1 include:_spf.google.com ~all

How It Works

The monitor performs a DNS lookup for the specified hostname and record type. If an expected value is configured, the returned records must contain a match. If no expected value is set, the check passes as long as the query returns at least one record.

Examples

Verify an A record

curl -X POST https://app.kamustatus.com/api/monitors \
-H "x-api-key: km_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"name": "DNS A Record",
"type": "dns",
"hostname": "example.com",
"recordType": "A",
"expectedValue": "93.184.216.34",
"interval": 300
}'

Monitor MX records

curl -X POST https://app.kamustatus.com/api/monitors \
-H "x-api-key: km_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"name": "Mail DNS",
"type": "dns",
"hostname": "example.com",
"recordType": "MX",
"expectedValue": "mail.example.com",
"interval": 300
}'

Check a CNAME record

curl -X POST https://app.kamustatus.com/api/monitors \
-H "x-api-key: km_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"name": "CDN CNAME",
"type": "dns",
"hostname": "cdn.example.com",
"recordType": "CNAME",
"expectedValue": "example.cdn.provider.com",
"interval": 300
}'