Add address aliases for the Uptime Kuma maintenance sync, and ignore Kuma's "null"

Uptime Kuma often watches a host by another address than the one it was added
with here (a Proxmox host monitored over Tailscale, say). Address aliases on
the Maintenance page say that an address belongs to a server, integration or
DNS provider, so the sync puts the window there; matching stays exact.
Migration 0018 adds maintenance_aliases.

Also fixes monitors whose empty hostname/URL/port arrive from Kuma's metrics as
the text "null": they were taken as an address, hiding the real URL.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
bobbanandClaude Sonnet 5.5 committed 2026-10-13 20:25:57 +02:00
1 parent 3e6404371b
commit 44cc9d1cf2
12 files changed
+2239 -14

No files matched your search

@@ -0,0 +1,9 @@
CREATE TABLE `maintenance_aliases` (
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
`address` text NOT NULL,
`target_type` text NOT NULL,
`target_id` integer NOT NULL,
`created_at` text DEFAULT (current_timestamp) NOT NULL
);
--> statement-breakpoint
CREATE UNIQUE INDEX `maintenance_aliases_unique_idx` ON `maintenance_aliases` (`address`,`target_type`,`target_id`);