Dependencies beyond servers, web push, inventory auto-fill with QR labels, Windows agent health
- Dependencies: servers and integrations can depend on each other; alerts are folded under the root cause, and a failure explained by something down isn't announced - Web push: hand-written VAPID and RFC 8291 encryption, per-device subscriptions, a fifth notification channel, service worker handlers - Inventory: maker/model/serial from the agents fill blank fields, "Refresh from agent", QR label printing and ?asset= deep links - Windows agent (v4) reports failed services, disk health, Storage Spaces pools and hardware identity; Linux agent (v5) reports hardware identity Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
5cc51c57de
commit
ec9c2f73f0
55 files changed
+12553
-65
No files matched your search
+22
-1
@@ -25,6 +25,8 @@ number when it is worth installing the agent again for.
|
||||
| 3 (Linux) | Asks the package manager outside the agent's systemd sandbox, so `dnf` and `zypper` hosts can answer (below). Install again to get it: the unit file changes too. |
|
||||
| 3 (Windows) | Can replace itself with the newer script when automatic updates are switched on (below). |
|
||||
| 4 (Linux) | Also reports failed services, disk health (SMART) and ZFS pool state; reads `pacman`; and can replace itself when automatic updates are switched on. |
|
||||
| 4 (Windows) | Also reports failed services, disk health and Storage Spaces pools (below), and what the machine is (maker, model, serial number). |
|
||||
| 5 (Linux) | Also says what the machine is — maker, model and serial number, read from the firmware — so the inventory can fill itself in (below). |
|
||||
|
||||
Reports are always read leniently — a field an older agent doesn't send is simply left alone, and a field
|
||||
an agent sends that the server doesn't know yet is ignored — so there is never a rush, and a mixed fleet of
|
||||
@@ -198,7 +200,26 @@ What it can't do:
|
||||
| **ZFS pools** | `zpool list` | Needs the `zpool` command. A pool in any state but ONLINE is a critical alert. |
|
||||
|
||||
A report that leaves one of these out leaves what was last said alone (an agent that skips a part never turns an old problem into
|
||||
"all well"); an empty list is an answer ("none failed") and clears the old one. Windows doesn't report these.
|
||||
"all well"); an empty list is an answer ("none failed") and clears the old one.
|
||||
|
||||
## What the Windows agent reports about the machine (version 4)
|
||||
|
||||
The same three parts, from what Windows itself knows (the agent runs as SYSTEM, so nothing needs installing):
|
||||
|
||||
| What | Where it comes from | Notes |
|
||||
|---|---|---|
|
||||
| **Failed services** | `Win32_Service` | A service that starts by itself, isn't running, and stopped with an error. Services that finished normally (exit code 0), that start on a trigger (1077) or that are starting up are not failures. Some services always do this (updaters, for one): list them under `ignoreServices` in `agent.json` (or `IGNORE_SERVICES` in the environment), as names or patterns like `gupdate*`. |
|
||||
| **Disk health** | `Get-PhysicalDisk` and its reliability counters | Windows' own verdict: *Healthy* passes, *Warning* and *Unhealthy* fail, anything else says nothing. Temperature and wear come from the counters where the drive gives sane ones. Virtual disks are left out. |
|
||||
| **Storage pools** | `Get-StoragePool` (Storage Spaces) | *Healthy*, *Warning* and *Unhealthy* are reported as ONLINE, DEGRADED and FAULTED, with how full the pool is, and show beside ZFS pools. A machine with no pools reports an empty list. |
|
||||
|
||||
## What the machine is (Linux version 5, Windows version 4)
|
||||
|
||||
The agents say who made the machine, its model and its serial number (Linux reads `/sys/class/dmi/id`, where the serial is only
|
||||
readable by root; Windows asks the computer system, the BIOS, and the motherboard when those say nothing — a home-built PC). What
|
||||
a maker writes when it has nothing to say ("To Be Filled By O.E.M.", "Default string", all zeros) is left out, and many virtual
|
||||
machines and single-board computers say nothing at all. The figures are kept on the server and used by the **Inventory**: a
|
||||
linked entry gets its blank maker, model and serial number filled in, and *Refresh from agent* on the Inventory page replaces
|
||||
what is written there with what the agent says, when you choose to.
|
||||
|
||||
To see exactly what a host finds, as root: `sudo /usr/local/bin/homelab-manager-agent.sh --check-updates` — it prints the
|
||||
update figures, the failed services, the SMART readings and the ZFS pools, says whether it would update itself, and changes nothing.
|
||||
|
||||
Reference in new issue
Block a user