Uptime monitors

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

  1. In the sidebar, select Monitors.
  2. Select New monitor.
  3. Under Type, select Nameserver.
  4. In Target, enter the host name or IP address of the server, for example ns1.example.com.
  5. In Zones, enter the zones the server must answer for, one per line.
  6. 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

  1. If the target is a host name, the Spectate checker looks up its address through its own resolver. It tries IPv4 first, then IPv6.
  2. The checker sends one SOA query per zone over UDP, all at the same time, with recursion off.
  3. If a query gets no response or SERVFAIL, the checker sends it once more. Each attempt can use half of Timeout.
  4. 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 happenedError
The server does not respond for any zonenameserver ns1.example.com:53 did not answer: timed out after 10s
A zone gets no authoritative answerno authoritative answer for example.com (REFUSED), example.org (no AA flag)
The host name has no addresscould not resolve nameserver ns1.example.com
The address is private or reservedtarget 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

ProblemMonitorSeverityAlert title
The check failsDowncriticalNAME is down
TCP failsUplowNAME: 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 labelAPI fieldDefault
TargeturiPort 53 if you enter no port
Zonesadvanced_settings.nameserver_zonesNone. Required, 1 to 20 domain names

Add the monitor with the public API:

TerminalCode
curl https://api.spectate.net/v1/monitors \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "label": "Primary nameserver", "protocol": "nameserver", "uri": "ns1.example.com", "interval": 300, "advanced_settings": { "nameserver_zones": ["example.com", "example.org"] } }'

The latest result is in check_details, in the fields nameserver_zones, nameserver_recursion and nameserver_issues.