Alert rules of your own, storage forecasts for Proxmox and Synology, and snooze

- Monitoring -> Alert rules: CPU, memory, disk use and disk temperature limits with a time, severity and scope (all, one server, a tag); try before saving; findings are ordinary health conditions
- Proxmox storages and Synology volumes are written down on each health pass (hourly, 400 days) and forecast like server disks: badge and history chart on the pages, alert, digest line, /metrics gauge
- Snooze an alert until a time; held back like maintenance, messages held, announced once again if still there when it ends
- Docs updated

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
bobbanandClaude Sonnet 5.5 committed 2026-10-20 23:38:36 +02:00
1 parent 788b3e073c
commit 24ae8db380
38 files changed
+7847 -8

No files matched your search

+60 -1
View File
@@ -62,6 +62,8 @@ erDiagram
integrations ||--o{ network_segments : "cascade"
integrations ||--o{ network_server_links : "cascade"
integrations ||--o{ ha_watched : "cascade"
integrations ||--o{ storage_series : "cascade"
storage_series ||--o{ storage_samples : "cascade"
integrations ||--o{ ha_entities : "cascade"
integrations ||--o{ ha_readings : "cascade"
users ||--o{ todos : "assignee (set null)"
@@ -78,7 +80,7 @@ erDiagram
integrations ||--o{ alert_tickets : "osTicket used (set null)"
```
Eighteen tables stand alone, with no foreign keys: `settings`, `notes`, `secrets`,
Twenty tables stand alone, with no foreign keys: `settings`, `notes`, `alert_rules`, `alert_snoozes`, `secrets`,
`ipam_entries`, `domains`, `diag_log`, `notification_queue`,
`consistency_ignores`, `tag_definitions`, `share_links`, `maintenance_schedules`, `metrics_tokens`, `event_webhooks`, `alert_incidents`, `dependencies`, `endpoint_checks`, `restore_tests`, `heartbeats`. `maintenance_windows` and `maintenance_aliases` also have no
foreign key — see [soft references](#soft-references-not-foreign-keys).
@@ -804,6 +806,63 @@ A numeric value of a watched entity at a moment, for the chart: one at most ever
| `at` | text NOT NULL | ISO. |
| `value` | real NOT NULL | |
#### `alert_rules`
Limits of the administrator's own (Monitoring → Alert rules), judged for the servers they cover on the health pass; what they find is ordinary health conditions keyed `rule:<id>:server:<server>[:<disk>]`.
| Column | Type | Notes |
|---|---|---|
| `id` | integer PK | |
| `name` | text NOT NULL | Shown in the alert's message, in square brackets. |
| `enabled` | bool NOT NULL, default 1 | |
| `metric` | text NOT NULL | `cpu`, `mem`, `disk` (use, percent) or `disk_temp` (°C, from the SMART report). |
| `mount` | text | For `disk`: one mount point or drive; null = every disk. |
| `operator` | text NOT NULL, default `above` | `above` or `below`. |
| `threshold` | real NOT NULL | Percent (0–100), or °C (0–150). |
| `for_minutes` | integer NOT NULL, default 0 | How long every sample must have been past the limit (0–1440); always 0 for `disk_temp`. |
| `severity` | text NOT NULL, default `warning` | `warning` or `critical`. |
| `server_id` | integer | One server. A plain reference, **not a foreign key**: a rule for a server that is gone judges nothing. Not together with `tag`. |
| `tag` | text | Servers with this tag; with a null `server_id` too, every server. |
| `created_by`, `created_at` | text | |
#### `storage_series`
A pool an integration reports — a Proxmox storage or root filesystem, a Synology volume — so that it can be forecast (see README, *Forecasts for Proxmox storage and Synology volumes*).
| Column | Type | Notes |
|---|---|---|
| `id` | integer PK | |
| `integration_id` | integer NOT NULL → `integrations.id`, **cascade** | Unique together with `key`. |
| `key` | text NOT NULL | `<node>:storage:<id>`, `shared:<id>`, `<node>:rootfs` (Proxmox) or `volume:<id>` (Synology). |
| `label` | text NOT NULL | What to call it in a message. |
| `latest_percent` | real NOT NULL | The newest reading. |
| `used_bytes`, `total_bytes` | integer | |
| `updated_at` | text NOT NULL | ISO; a pool not reported for 30 days is deleted. |
#### `storage_samples`
One reading of a pool an hour at most, kept 400 days. `series_id` is a foreign key with **cascade**; (`series_id`, `at`) is indexed.
| Column | Type | Notes |
|---|---|---|
| `id` | integer PK | |
| `at` | text NOT NULL | ISO. |
| `value` | real NOT NULL | Percent used. |
#### `alert_snoozes`
An alert hidden until a time (see README, *Snooze*). Keyed like `alert_acks`, by the alert's id on the Alerts page; no foreign keys.
| Column | Type | Notes |
|---|---|---|
| `id` | integer PK | |
| `alert_id` | text NOT NULL, unique | |
| `condition_key` | text NOT NULL | The key behind it, which the notifications carry (so they can be held). |
| `message` | text NOT NULL | What it said when it was snoozed. |
| `until` | text NOT NULL | ISO. When it has passed, an alert that is still there is announced again and the row is deleted. |
| `snoozed_by`, `snoozed_at` | text NOT NULL | |
| `last_seen_at` | text NOT NULL | ISO; the last time the alert was there. A row whose alert has been gone for 30 minutes is deleted. |
#### `push_subscriptions`
A browser or phone that asked for push notifications, one row per device.