Add server-side health checks for service online status
- update-health.js: pings every service URL from script.js (single source of truth) in parallel every minute via cron and writes health.json; any HTTP response below 500 counts as online, 5xx as error, timeouts/DNS failures as offline; TLS validity ignored - Card badges now show real state instead of a static Online label: grey Checking, green Online (with latency tooltip), amber Error (HTTP code), red Offline (reason); refreshed every 30 s - Entrypoint runs a first sweep at boot; nginx serves /health.json with no-cache; README documents the behavior
This commit is contained in:
@@ -21,7 +21,9 @@ External: gitlab-ixsol, gem360.
|
||||
with their GPU/CPU split)
|
||||
- Inline **Open WebUI prompt line with model selection** in the Open WebUI card
|
||||
(requires `OPENWEBUI_TOKEN`)
|
||||
- Responsive grid of service cards with icons, categories and a live "Online" indicator
|
||||
- Responsive grid of service cards with icons, categories and **real online status**
|
||||
(server-side health checks every minute: green = online, amber = 5xx error,
|
||||
red = unreachable; hover the badge for latency/details)
|
||||
- **Open** (new tab) + **Copy URL** per service
|
||||
- Live search / filter across names, categories and URLs
|
||||
- Live local clock
|
||||
@@ -101,9 +103,12 @@ docker run -d --name homelab-dashboard -p 8888:80 --restart unless-stopped homel
|
||||
|
||||
## Notes
|
||||
|
||||
- The "Online" badge is cosmetic (a static site can't probe your services from the browser
|
||||
due to CORS). If you want real health checks later, a tiny backend that pings each URL
|
||||
would be the next step.
|
||||
- Online badges are real health checks: `api/update-health.js` (cron, every minute)
|
||||
pings each service URL from the container with a 5 s timeout and writes
|
||||
`health.json`; the frontend refreshes badges every 30 s. Any HTTP response below
|
||||
500 counts as online (401/404 still means the server is up); 5xx shows as
|
||||
"Error", timeouts/DNS failures as "Offline". TLS certificate validity is ignored
|
||||
(reachability only).
|
||||
- Calendar dependencies are bundled in `api/node_modules` so the Docker build works
|
||||
offline. To update them, run `npm install` in the `api/` directory.
|
||||
- Port 8888 is published by the Compose file; change it there if needed.
|
||||
|
||||
Reference in New Issue
Block a user