Notification routing rules, per-browser push wishes, escalation of unacknowledged alerts
- Routing: rules pick channels by kind, severity and server tags (first match wins, none = nobody); mixed batches split per route; recoveries follow their alert; quiet-hours digest keeps each notification's audience - Push: each subscribed browser can ask for a minimum severity and some kinds - Escalation: up to three timed steps re-notify alerts nobody has acknowledged, through chosen channels and an optional extra email; an acknowledgement stops them - Fix ntfy: titles with an em dash made every ntfy send fail (header not Latin-1); now RFC 2047 encoded Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
9caa414829
commit
43fc5e0272
21 files changed
+4769
-55
No files matched your search
@@ -134,6 +134,7 @@ cleared.
|
||||
|---|---|---|
|
||||
| `id` | integer PK | |
|
||||
| `title`, `message` | text NOT NULL | |
|
||||
| `audience` | text | JSON of who it was for (`channels`, `pushIds`, `email`) when a routing rule or an escalation picked them; null = everyone. The digest is sent to each audience separately. |
|
||||
| `created_at` | text NOT NULL | SQLite UTC. |
|
||||
|
||||
#### `maintenance_windows`
|
||||
@@ -526,6 +527,8 @@ One time an alert was raised and later went away. When the same alert comes back
|
||||
| `resolved_at` | text | ISO; null while open. Set to when it first went missing, once it has been missing long enough. |
|
||||
| `last_seen_at` | text NOT NULL | ISO. |
|
||||
| `missing_since` | text | ISO; set while it has been missing from the last look(s), before it is called over. |
|
||||
| `escalated_step` | integer NOT NULL, default 0 | The highest escalation step already sent for this incident (0 = none); a new incident starts again. |
|
||||
| `escalated_at` | text | ISO; when that step was sent. |
|
||||
|
||||
Resolved rows older than 400 days are deleted, with their notes.
|
||||
|
||||
@@ -614,6 +617,8 @@ A browser or phone that asked for push notifications, one row per device.
|
||||
| `label` | text | What the person calls it, or the browser it is. |
|
||||
| `created_at` | text NOT NULL | ISO. |
|
||||
| `last_success_at` | text | When the push service last accepted a message for it. |
|
||||
| `min_severity` | text | `warning` or `critical`: this browser only wants alerts at least that bad. Null = every severity. |
|
||||
| `categories` | text | JSON array of the kinds of alert it wants (`offline`, `disk`, …). Null = every kind. |
|
||||
|
||||
A subscription is removed when the push service says it is gone (HTTP 404 or 410), when its owner or an administrator removes it, and all of them are removed if the server's own key pair has to be made again.
|
||||
|
||||
@@ -714,6 +719,8 @@ that were never changed aren't stored; the app fills in defaults when reading.
|
||||
| Key | Holds |
|
||||
|---|---|
|
||||
| `gotify`, `ntfy`, `smtp`, `webhook` | The four notification channels: enabled, address, and credentials (token / password / secret). The credential fields are stored encrypted (prefix `enc:v1:`) — see [Retention and backups](#retention-and-backups). |
|
||||
| `routing` | Routing rules: `rules`, an ordered array of `{id, name, enabled, categories, minSeverity, tags, channels}` — the first enabled rule a notification matches decides which channels get it (empty `channels` = nobody). |
|
||||
| `escalation` | `enabled` (false) and up to three `steps` of `{afterMinutes, minSeverity, channels, extraEmail, evenInQuietHours}`, in time order. |
|
||||
| `webPush` | Push to phones and browsers: `enabled` (false) and `contact` (an email or https address the push services may reach whoever runs this on; blank is fine). Who is subscribed is in `push_subscriptions`; the server's key pair is below. |
|
||||
| `notifications` | Which events notify (`dnsAdd`, `healthAlerts`, …), the daily-reminder time (`secretCheckTime`, default `08:00`) and `timezone` (default `UTC`), and the integration-failure threshold (default 3). |
|
||||
| `quietHours` | `enabled`, `start`, `end`. |
|
||||
|
||||
Reference in new issue
Block a user