Nameserver monitors
A nameserver monitor watches one authoritative nameserver that you run. It asks the server for the SOA record of each zone you list, with recursion off. The monitor is up when the server gives an authoritative answer for every zone.
Use it to find a dead server, a zone that a server stopped serving, and a firewall that blocks TCP. To check one record of a domain, or every nameserver of a zone that you do not run yourself, use a DNS monitor. A nameserver monitor counts as one monitor on your plan, for up to 20 zones.
Add a nameserver monitor
- In the sidebar, select Monitors.
- Select New monitor.
- Under Type, select Nameserver.
- In Target, enter the host name or IP address of the server, for example
ns1.example.com. - In Zones, enter the zones the server must answer for, one per line.
- Select Create and start.
The default port is 53. To use another port, add it to the target, for example ns1.example.com:5353. For an IPv6 address with a port, put the address in brackets: [2001:db8::53]:5353. Spectate stores the target with its port.
The server must answer queries from the Spectate checkers over UDP and TCP. Spectate does not monitor private or reserved addresses.
What a check does
- If the target is a host name, the Spectate checker looks up its address through its own resolver. It tries IPv4 first, then IPv6.
- The checker sends one SOA query per zone over UDP, all at the same time, with recursion off.
- If a query gets no response or
SERVFAIL, the checker sends it once more. Each attempt can use half of Timeout. - The checker sends one SOA query over TCP, for a zone that gave an authoritative answer.
An authoritative answer has the response code NOERROR, the AA flag and the SOA record of the zone.
The check fails if any of these is true:
| What happened | Error |
|---|---|
| The server does not respond for any zone | nameserver ns1.example.com:53 did not answer: timed out after 10s |
| A zone gets no authoritative answer | no authoritative answer for example.com (REFUSED), example.org (no AA flag) |
| The host name has no address | could not resolve nameserver ns1.example.com |
| The address is private or reserved | target address 10.0.0.53 is private, loopback, link-local or otherwise not publicly routable; refusing to connect |
One zone that fails is enough. The monitored server is the only subject of this monitor, so a zone that it fails to serve counts as down.
The response time is the slowest UDP query that got a response. The TCP query does not count.
Alerts
| Problem | Monitor | Severity | Alert title |
|---|---|---|---|
| The check fails | Down | critical | NAME is down |
| TCP fails | Up | low | NAME: ns1.example.com:53 doesn't answer over TCP |
The monitor goes down after a recheck, like every monitor. See locations and checks.
TCP fails when the TCP query gets no response, or a response code other than NOERROR. Spectate fires this alert when two checks in a row find the problem, so one lost query does not fire it. A successful check without the problem resolves the alert. A failed check does not change this alert, because the critical alert covers that case.
Results
The monitor page shows the result of the latest check. Spectate does not keep a history of these values.
- Authoritative zones shows how many zones gave an authoritative answer. It also says TCP fails when the TCP query failed, and Offers recursion when the responses have the RA flag.
- Zones has one row per zone, with the answer, the SOA serial and the response time.
Spectate does not fire an alert for recursion. An RA flag alone does not prove that the server resolves names for others.
Settings reference
| Dashboard label | API field | Default |
|---|---|---|
| Target | uri | Port 53 if you enter no port |
| Zones | advanced_settings.nameserver_zones | None. Required, 1 to 20 domain names |
Add the monitor with the public API:
Code
The latest result is in check_details, in the fields nameserver_zones, nameserver_recursion and nameserver_issues.