Add status pages (a share link kind) and a downloadable Grafana dashboard
- Share links can open a status page: an admin picks servers, integrations and Uptime Kuma monitors and names them; the public sees only those names, Working / Not working / Being worked on / Can't tell, an optional message and the 30-day figure (share_links.kind/ title/message and status_items, migration 0033). A status address doesn't open the wall and the other way round; Uptime Kuma is asked at most every 30 seconds - Grafana dashboard built from code (download in Settings -> API and webhooks); a test checks it only uses series /metrics serves - Tests and docs Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
2744a84719
commit
5cc51c57de
24 files changed
+4880
-35
No files matched your search
@@ -75,6 +75,25 @@ All gauges. Labels are escaped as Prometheus requires.
|
||||
Some alerting ideas: `homelab_server_up == 0`, `homelab_server_disk_used_percent > 90`,
|
||||
`homelab_secret_expiry_days < 14`, `homelab_server_disk_days_to_full < 7`, `homelab_alerts{severity="critical"} > 0`, `time() - homelab_selfbackup_last_success_timestamp_seconds > 2 * 86400`.
|
||||
|
||||
## A Grafana dashboard
|
||||
|
||||
Settings → API and webhooks → **Download the dashboard** (administrators) gives `homelab-manager-dashboard.json`; the same file is at
|
||||
`GET /api/metrics-tokens/grafana-dashboard.json` for a signed-in administrator. In Grafana: **Dashboards → New → Import**, upload it, and
|
||||
choose your Prometheus when asked (the file never names one, so it isn't tied to any installation). It is a dashboard with a **Server**
|
||||
picker (taken from `homelab_server_up`) and five rows:
|
||||
|
||||
| Row | What it has |
|
||||
|---|---|
|
||||
| Needs attention | Critical alerts, warnings, acknowledged, open incidents, servers down and up, integrations failing, maintenance, stale and failed backups, failed services, updates waiting, restarts needed; alerts over time; each integration's state. |
|
||||
| Servers | One table (up, CPU, memory, updates, security updates, failed services, agent behind), CPU and memory over time, 30-day uptime, time since each agent last reported. |
|
||||
| Disks | Usage with a 90% line, disks filling up (days to full), SMART health, SSD life used, disk temperature, ZFS pools. |
|
||||
| Backups | Guests by backup state, the age of each newest backup, and the age, last result and count of Homelab Manager's own backups. |
|
||||
| Secrets, power and the app itself | Secrets and certificates by days left, the inventory's power draw, how long `/metrics` takes to build. |
|
||||
|
||||
The dashboard is built by the app from the same code that serves `/metrics`, and a test checks that it only asks for series that are
|
||||
really served — so after an upgrade that adds series, download it again to get panels for them. It was written for Grafana 9 and later
|
||||
and has been checked for structure (every panel on the grid, every query well-formed, every series real), **not** opened in a Grafana here.
|
||||
|
||||
## Event webhooks
|
||||
|
||||
A webhook is a URL (http or https, no user name or password in it) with a list of events it wants. It is
|
||||
|
||||
Reference in new issue
Block a user