Add a Technitium DNS Server integration for its statistics and health

A new integration type (Network, next to AdGuard Home) reads Technitium's API
every two minutes with a non-expiring API token in the Authorization header:
version and uptime, whether blocking is on, block lists and their next update,
the last day's queries and how they ended, cache and zone counts, the top
clients and names, zone health (expired or unsynced secondary zones), DHCP
leases — and puts one real DNS question to it over UDP. A Technitium page
shows it; alerts: DNS not answering (critical), blocking left off, block lists
overdue, zones expired or not syncing; /metrics gets homelab_technitium_*.
Nothing is changed on the server. Technitium's API has no CPU, memory or disk
figures; the page says a server agent covers that. New table technitium_state
(migration 0081).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
bobbanandClaude Sonnet 5.5 committed 2026-11-01 21:48:46 +01:00
1 parent e4cd01e9ba
commit 312093d3f7
24 files changed
+10189 -7

No files matched your search

+4 -1
View File
@@ -92,6 +92,7 @@ const SOURCES: Record<string, { label: string; link: string }> = {
readarr: { label: "Readarr", link: "/media" },
prowlarr: { label: "Prowlarr", link: "/media" },
adguard: { label: "AdGuard Home", link: "/adguard" },
technitium: { label: "Technitium DNS", link: "/technitium" },
versions: { label: "Versions", link: "/versions" },
grafana: { label: "Grafana", link: "/grafana" },
secrets: { label: "Secrets", link: "/secrets" },
@@ -140,6 +141,8 @@ function originOfConditionKey(key: string): { type: string; id: number | null; c
if (m) return { type: "versions", id: Number(m[1]), category: "updates" };
m = /^adguard-(stopped|dns|protection|filters):(\d+)/.exec(key);
if (m) return { type: "adguard", id: Number(m[2]), category: m[1] === "stopped" || m[1] === "dns" ? "services" : "monitoring" };
m = /^technitium-(dns|blocking|lists|zones):(\d+)/.exec(key);
if (m) return { type: "technitium", id: Number(m[2]), category: m[1] === "dns" || m[1] === "zones" ? "services" : "monitoring" };
m = /^grafana-(firing|rule-error|ds):(\d+):/.exec(key);
if (m) return { type: "grafana", id: Number(m[2]), category: m[1] === "ds" ? "integration" : "monitoring" };
m = /^(sonarr|radarr|prowlarr|lidarr|readarr)-(health|queue|disk):(\d+)/.exec(key);
@@ -298,7 +301,7 @@ export async function collectAlerts(): Promise<AlertsReport> {
if (held.has("slo")) cannotCheck("Service-level targets", "couldn't be judged — see the server log", "Server and storage health");
if (held.has("server:baseline")) cannotCheck("What is usual for the time", "couldn't be judged — see the server log", "Server and storage health");
for (const h of held) {
const m = /^(proxmox|synology|unifi|ups|dockhand|jellyfin|authentik|prometheus|immich|paperless|nextcloud|netbox|n8n|hetzner|speedtest|fragnet|sonarr|radarr|prowlarr|lidarr|readarr|adguard|grafana):(\d+)(?::(.+))?$/.exec(h);
const m = /^(proxmox|synology|unifi|ups|dockhand|jellyfin|authentik|prometheus|immich|paperless|nextcloud|netbox|n8n|hetzner|speedtest|fragnet|sonarr|radarr|prowlarr|lidarr|readarr|adguard|technitium|grafana):(\d+)(?::(.+))?$/.exec(h);
if (!m || (m[3] && held.has(`${m[1]}:${m[2]}`))) continue;
const row = intById.get(Number(m[2]));
cannotCheck(`${SOURCES[m[1]].label} “${row?.name ?? `#${m[2]}`}”${m[3] === "vuln" ? " (vulnerability scans)" : m[3] === "images" ? " (age of the images)" : m[3] ? ` (node ${m[3]})` : ""}`, "couldn't be read — see the Diagnostic Log", "Server and storage health");