Probes log locally only while the hub is unreachable; the hub confirms silences with that log
Probe: no access log, nothing written while reports get through. When the hub can't be reached, failed reports go to data/outage.jsonl and unsent results to data/backlog.jsonl (survives restarts). The first report that gets through uploads both and they are deleted. Hub: a probe that misses reports gets a "Not reporting" incident. When it reports again, the runs from its outage log become confirmed "Hub unreachable" incidents; the rest of the silence (probe off or restarting) is dropped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
462525b1e2
commit
be727949c1
13 changed files with 449 additions and 32 deletions
|
|
@ -240,7 +240,9 @@ Probe settings live in `/opt/network-probe/.env`; `.env.probe.example` lists the
|
|||
2. runs the throughput download, one peer at a time
|
||||
3. posts the results and its ARP neighbors to `/api/probe/report`. On Linux the gateway and neighbors come from `/proc/net`; on macOS from `route` and `arp`.
|
||||
|
||||
The hub's reply is the probe's configuration: its peers and targets. The probe caches that reply in `/data`. While the hub is unreachable, results queue in memory, up to 20,000 measurements (hours of data), and upload once the hub is back. Outages are therefore recorded from the probe's side even when the hub can't hear it.
|
||||
The hub's reply is the probe's configuration: its peers and targets. The probe caches that reply in `/data`. While reports get through, the probe writes nothing else to disk. While the hub can't be reached, it keeps a local outage log in its data folder: each failed report, and the results it couldn't send (up to 20,000 measurements, hours of data), so a restart doesn't lose them. Once the hub answers, the probe uploads the results and the log, then deletes both.
|
||||
|
||||
When a probe goes quiet, the hub lists it as "Not reporting". When it reports again, the hub checks its outage log. The parts of the silence the log covers become "Hub unreachable" incidents. The rest is dropped, because the probe was off or restarting rather than cut off.
|
||||
- **Health maths** (`app/hub/health.py`). Each check is OK, slow or failed. Slow means over the threshold, or 30% or more ping loss. A time slice is:
|
||||
- **down** when at least half its checks failed
|
||||
- **degraded** when at least a fifth were slow or failed
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue