Show cluster health in the Technitium DNS integration

Reads /api/admin/cluster/state (Technitium 14+): a Cluster table on the page,
alerts for a node unreachable for ten minutes (primary critical) and for a
secondary that has stopped taking the primary's configuration, and three
/metrics series. A server in no cluster shows nothing; a token that may not
view administration is told so and the rest of the read is unaffected.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
bobbanandClaude Sonnet 5.5 committed 2026-11-08 23:37:11 +01:00
1 parent 1ef686d1ba
commit d78aba8bf9
15 files changed
+9423 -15

No files matched your search

+4
View File
@@ -373,6 +373,10 @@ An integration of type *Technitium DNS* ([INTEGRATIONS.md](../INTEGRATIONS.md#te
| **Zone cannot sync** | Secondary zones that cannot sync with their primary and are going stale (none has expired yet) | warning |
| **Blocking off** | Blocking has been switched off for **an hour** while block lists are set up — someone paused it and forgot; nothing is being blocked. With no block lists, off is how it is and nothing is said | warning |
| **Block lists overdue** | The block lists' next update was due more than **six hours** ago and has not happened | warning |
| **Cluster node unreachable** | In a cluster (Technitium 14 and later), the node this app reads says another node is *unreachable*, and has for **ten minutes** (by the node's own *last seen*, or since this app first saw it so). One alert for each node. The cluster keeps answering without it, so a **secondary** is a warning; the **primary** is critical — the other nodes can take no configuration changes while it is down | warning; critical for the primary |
| **Cluster configuration out of step** | The node this app reads is a **secondary** and has not taken the configuration from the primary for three of its own refresh periods (15 minutes by default, so 45), and at least half an hour | warning |
**The cluster** is read from `/api/admin/cluster/state`, which needs the token's user to be allowed to **view administration** (without it the rest is read as before and the page says what is missing). A server that is in no cluster, or is older than 14, shows nothing of it. Point the integration at one node of the cluster, or one integration at each node to judge them from both sides: a node can only say what *it* can reach. Nothing is changed.
The server's own internal zones and zones that are switched off are not judged. "Since when" is **when the app first saw it** in a read. Maintenance on the integration holds the alerts; a reading older than ten minutes is not believed (they are neither raised nor cleared, and the Alerts page says it could not check). `/metrics` has whether it answers and how long an answer took, whether blocking is on, how long it has run, the last day's counts, the cache, the zones with a problem and the DHCP leases.