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:
1 parent
e4cd01e9ba
commit
312093d3f7
24 files changed
+10189
-7
No files matched your search
+59
-1
@@ -1519,6 +1519,61 @@ export interface AdguardInstance {
|
||||
problems: { key: string; message: string; severity: "warning" | "critical" }[];
|
||||
}
|
||||
|
||||
/** One Technitium DNS Server (an integration of type technitium), as its page shows it. */
|
||||
export interface TechnitiumInstance {
|
||||
id: number;
|
||||
name: string;
|
||||
enabled: boolean;
|
||||
url: string;
|
||||
status: { at: string; ok: boolean; error: string | null } | null;
|
||||
fresh: boolean;
|
||||
state: {
|
||||
version: string | null;
|
||||
/** When the DNS server last started. */
|
||||
startedAt: string | null;
|
||||
dnsPort: number;
|
||||
blockingEnabled: boolean;
|
||||
blockingOffSince: string | null;
|
||||
settings: { blockLists: { count: number; intervalHours: number | null; nextUpdate: string | null }; cacheMaximumEntries: number | null; recursion: string | null; dnssecValidation: boolean | null };
|
||||
/** The last day. */
|
||||
stats: {
|
||||
period: string;
|
||||
queries: number;
|
||||
noError: number;
|
||||
serverFailure: number;
|
||||
nxDomain: number;
|
||||
refused: number;
|
||||
authoritative: number;
|
||||
recursive: number;
|
||||
cached: number;
|
||||
blocked: number;
|
||||
dropped: number;
|
||||
clients: number;
|
||||
zones: number | null;
|
||||
cachedEntries: number | null;
|
||||
allowedZones: number | null;
|
||||
blockedZones: number | null;
|
||||
allowListZones: number | null;
|
||||
blockListZones: number | null;
|
||||
blockedPercent: number | null;
|
||||
cachedPercent: number | null;
|
||||
failurePercent: number | null;
|
||||
topClients: { name: string; count: number }[];
|
||||
topDomains: { name: string; count: number }[];
|
||||
topBlocked: { name: string; count: number }[];
|
||||
} | null;
|
||||
zones: { total: number; disabled: number; issues: { name: string; problem: "expired" | "sync failed" }[] } | null;
|
||||
dhcp: { scopes: number; enabledScopes: number; leases: number } | null;
|
||||
/** The real DNS question put to it. */
|
||||
probe: { ok: boolean; ms: number | null; error: string | null; name: string; host: string } | null;
|
||||
probeFailSince: string | null;
|
||||
updatedAt: string;
|
||||
/** How long ago the block lists were due for an update, when that is overdue; null otherwise. */
|
||||
blockListsOverdueMs: number | null;
|
||||
} | null;
|
||||
problems: { key: string; message: string; severity: "warning" | "critical" }[];
|
||||
}
|
||||
|
||||
/** One Grafana (an integration of type grafana), as its page shows it. */
|
||||
export interface GrafanaInstance {
|
||||
id: number;
|
||||
@@ -2800,7 +2855,7 @@ export interface ManualTaskInput {
|
||||
enabled?: boolean;
|
||||
}
|
||||
|
||||
export type IntegrationType = "proxmox" | "synology" | "semaphore" | "tailscale" | "gitea" | "dockhand" | "uptimekuma" | "phpipam" | "pbs" | "osticket" | "unifi" | "npm" | "homeassistant" | "ups" | "jellyfin" | "authentik" | "prometheus" | "immich" | "paperless" | "nextcloud" | "netbox" | "n8n" | "hetzner" | "speedtest" | "fragnet" | "sonarr" | "radarr" | "prowlarr" | "adguard" | "grafana" | "lidarr" | "readarr";
|
||||
export type IntegrationType = "proxmox" | "synology" | "semaphore" | "tailscale" | "gitea" | "dockhand" | "uptimekuma" | "phpipam" | "pbs" | "osticket" | "unifi" | "npm" | "homeassistant" | "ups" | "jellyfin" | "authentik" | "prometheus" | "immich" | "paperless" | "nextcloud" | "netbox" | "n8n" | "hetzner" | "speedtest" | "fragnet" | "sonarr" | "radarr" | "prowlarr" | "adguard" | "technitium" | "grafana" | "lidarr" | "readarr";
|
||||
|
||||
export interface IntegrationField {
|
||||
key: string;
|
||||
@@ -3407,6 +3462,9 @@ export const api = {
|
||||
save: (data: { enabled: boolean; alertAfterDays: number }) => request<AppVersions>("/api/versions/settings", { method: "PUT", body: JSON.stringify(data) }),
|
||||
refresh: () => request<AppVersions & { result: { checked: number; failed: number } }>("/api/versions/refresh", { method: "POST" }),
|
||||
},
|
||||
technitium: {
|
||||
list: () => request<{ instances: TechnitiumInstance[] }>("/api/technitium"),
|
||||
},
|
||||
adguard: {
|
||||
list: () => request<{ instances: AdguardInstance[] }>("/api/adguard"),
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user