AdGuard Home, Grafana, Docker image age, foldable server page cards
New integration kinds adguard (status, statistics, filter lists and a real DNS question over UDP; alerts for DNS down/not running, protection left off, stale lists) and grafana (alert rules firing or failing, data-source health). Optional warning for running Docker images built more than N days ago (off by default). A server's overview cards can be folded and arranged, kept per user. Migrations 0075-0077; docs, metrics and tests included. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3d9a2310bb
commit
551eb1597a
53 files changed
+27700
-33
No files matched your search
@@ -60,6 +60,7 @@ the dashboard views themselves load fine. (UniFi, Nginx Proxy Manager, Home Assi
|
||||
- **Container health:** on the 15-minute health pass the app also reads every container's state and status text and raises alerts for what is broken — see [Docker containers that are broken](docs/MONITORING.md#docker-containers-that-are-broken). A Docker host that Dockhand
|
||||
cannot read (its Hawser agent is down) is an alert too, and its containers' alerts are held, not cleared. The Docker page shows each container's problem and has a **Leave alone** button.
|
||||
- **Vulnerability scans:** every fifteen minutes the app also reads what Dockhand's scans have stored — `GET /api/vulnerabilities/count?env=` for each environment, and `GET /api/vulnerabilities?env=&severity=critical&limit=100` only where that count is above zero (needs the *images: view* permission). Nothing is scanned from here. **Critical** findings are a warning per Docker host — and so are **high** ones once a host has as many as a number you set (*Also warn when a Docker host has this many high vulnerabilities*, off by default) — (a setting turns the critical one off — see [MONITORING.md](docs/MONITORING.md#docker-containers-that-are-broken)); the Docker page lists them. **Written from Dockhand's source and OpenAPI file, not tried against a live Dockhand** — its published docs show the lists at the top level of the answer, its code puts the counts under `summary`; the reader follows the code and reads nothing it does not find as *unknown*.
|
||||
- **Image age:** the same pass reads each Docker host's images and containers (`GET /api/images?env=`, `GET /api/containers?env=&all=true`) and keeps, for every image a *running* container uses, when it was built (Docker's own `Created`). Matched by the name the container gives (Docker Hub's `docker.io/library/` and a missing `:latest` are not a difference) or by id. With *Warn about running Docker images that were built more than … days ago* set (Settings → Notifications; **off by default**), a host with such images is a warning — whatever the scans of them said. The Docker vulnerabilities view shows each host's oldest running images either way. **Written from Dockhand's documented list (`Id`, `RepoTags`, `Created`), not tried against a live Dockhand**; an image whose date cannot be found is not judged.
|
||||
|
||||
### Uptime Kuma
|
||||
|
||||
@@ -424,6 +425,26 @@ osTicket's API cannot close a ticket, so this is the one place in the app that *
|
||||
- `/metrics` has `homelab_fragnet_server_running`, `homelab_fragnet_disk_used_bytes`, `homelab_fragnet_disk_limit_bytes`, `homelab_fragnet_memory_used_bytes`, `homelab_fragnet_memory_limit_bytes` and `homelab_fragnet_newest_backup_timestamp_seconds`.
|
||||
- **Not verified against a live account** — the endpoints (`/api/client?include=egg,allocations`, `/servers/{id}/resources`, `…/backups`, `…/schedules`, `…/databases`, `POST …/power`) and their fields are as Pterodactyl's own source and Fragnet's documentation have them, and the reader is tried against a pretend panel. Fragnet's fork may differ: the game is left out (shown as the Docker image) if the panel does not send the egg, and a panel that refuses the extra `include` is asked again plainly. Disk and memory limits are in MB as the panel counts them and shown in binary units. What the servers cost is not in the API: add it under Records → Costs.
|
||||
|
||||
### AdGuard Home
|
||||
|
||||
- **Config fields:** the **URL** of its web interface and, if it has a sign-in, the **user name** and **password** (HTTP Basic; stored encrypted). Optional: the **DNS server address** (the host of the URL unless told — fill it in if a reverse proxy sits in front of the web interface), the **name to test DNS with** (`example.com`) and *Allow self-signed certificate*.
|
||||
- **Required access:** the web interface reachable from the app over HTTP(S), and — for the DNS test — its DNS port (read from its status, usually 53) reachable from the app **over UDP**. If the app sits where UDP 53 to AdGuard Home is blocked, the test will say so (no answer) and DNS will be reported down; allow it or set the DNS server address to one the app can reach.
|
||||
- **What it does:** every **two minutes** it reads `GET /control/status` (running, protection, version, DNS port), `GET /control/stats` (queries, blocked, average time, top names and clients) and `GET /control/filtering/status` (the lists and when each was updated) and puts **one DNS question** — the address of the test name — to its DNS server. An answer, or "no such name", means the resolver works; a server failure or a refusal does not. **Network → AdGuard Home** shows it all. Nothing is changed: protection is never switched, no list refreshed.
|
||||
- **Alerts** (source *AdGuard Home*; held back by maintenance on the integration): the DNS server **not running** (critical); the test question **unanswered in every read for ten minutes** (critical — one lost packet is not an outage); **protection switched off for an hour** (warning); **filter lists** switched on and **not updated for a week** (warning, one for all). See [MONITORING.md](docs/MONITORING.md#adguard-home).
|
||||
- If it cannot be read for ten minutes its alerts are neither raised nor cleared, the Alerts page says it could not check, and the integration is raised as failing like any other. A part that could not be read (the statistics, the lists) is shown as *could not be read*, never as none.
|
||||
- `/metrics` has `homelab_adguard_running`, `homelab_adguard_protection_enabled`, `homelab_adguard_dns_up`, `homelab_adguard_dns_probe_seconds`, `homelab_adguard_queries`, `homelab_adguard_blocked` and `homelab_adguard_avg_processing_seconds`.
|
||||
- **Not verified against a live install** — the endpoints and fields are as AdGuard Home's published OpenAPI file has them (`ServerStatus`, `Stats`, `FilterStatus`), and the reader (and the DNS question, against a pretend DNS server) is tried against pretend ones. The statistics are over AdGuard Home's own period (a day unless set otherwise). A DNS question is asked of the host in the URL: with a proxy in front, set *DNS server address*.
|
||||
|
||||
### Grafana
|
||||
|
||||
- **Config fields:** the **URL** and a **service account token** (Administration → Users and access → Service accounts → add a service account with the *Viewer* role → add a token; shown once; stored encrypted), and *Allow self-signed certificate*. To also test the data sources the service account needs permission to read and query them (the Viewer role usually has it); without it they are shown as *could not be listed* and the rules still work.
|
||||
- **Required access:** Grafana's address reachable from the app. A read is a few requests plus one for each data source, every five minutes.
|
||||
- **What it does:** every **five minutes** the alert rules (`GET /api/prometheus/grafana/api/v1/rules` — Grafana-managed alerting's Prometheus-compatible view: which are firing, pending, or cannot be evaluated) and the data sources with Grafana's own health check of each (`GET /api/datasources`, `GET /api/datasources/uid/{uid}/health`) are read and stored. **Monitoring → Grafana** shows them. Nothing is silenced, paused or changed.
|
||||
- **Alerts** (source *Grafana*; held back by maintenance on the integration): a rule **firing** (critical when it carries the label `severity` = `critical` or `page`, a warning otherwise; a pending rule is shown, not raised), a rule **Grafana cannot evaluate**, and a **data source that fails its health check**. Grafana can notify about its own alerts too — with both switched on you hear twice; this is for having them in one list, or for the ones that reach you nowhere else. See [MONITORING.md](docs/MONITORING.md#grafana).
|
||||
- If Grafana cannot be read for 20 minutes its alerts are neither raised nor cleared, the Alerts page says it could not check, and the integration is raised as failing like any other.
|
||||
- `/metrics` has `homelab_grafana_rules`, `homelab_grafana_rules_firing`, `homelab_grafana_rules_error` and `homelab_grafana_datasources_failing`.
|
||||
- **Not verified against a live Grafana** — the endpoints and fields are as Grafana's HTTP API documentation has them, and the reader is tried against a pretend one. Only **Grafana-managed** rules are read (rules of a Prometheus or Loki data source that Grafana merely shows are not). A data source whose type has no health check is *not tested*, which is not the same as healthy.
|
||||
|
||||
### Speedtest Tracker
|
||||
|
||||
- **Config fields:** the **address** of Speedtest Tracker (`http://speedtest.example.lan`) and an **API token** (the profile menu → *API tokens* → create one with the **results:read** ability; stored encrypted — that is all it needs). Optional: **the download and upload you pay for** (Mbit/s) and **the share below which to warn** (60% unless you say), which the alerts use, and, for an https address with a certificate of its own, *insecure*.
|
||||
|
||||
Reference in new issue
Block a user