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:
neil 2026-11-04 20:50:30 -08:00
parent 462525b1e2
commit be727949c1
13 changed files with 449 additions and 32 deletions

View file

@ -3,7 +3,7 @@ import { confirmDialog, copyText, el, modal, segmented, store, toast } from '../
import { del, get, patch, post } from '../api.js';
import { lineChart, seriesLegend, statusChip, statusLegend, strip, tipRow, tipTitle, hideTip, STATUS } from '../charts.js';
import { ago, axisTime, dur, mbps, ms, pct, when } from '../fmt.js';
import { RANGES, SPANS, every, errorBox, screen, section, table, fill } from '../common.js';
import { RANGES, SPANS, every, errorBox, screen, section, table, fill, incidentChecks, incidentDetail, incidentTarget, incidentTypeText } from '../common.js';
const METHOD = { icmp: 'Ping', http: 'HTTP', dns: 'DNS', throughput: 'Throughput' };
@ -173,10 +173,10 @@ function detail(root, ctx, id) {
table(['Started', 'Lasted', 'Target', 'Type', 'Checks', 'Detail'], inc.incidents.map((i) => el('tr', {},
el('td.nowrap', {}, when(i.start)),
el('td.nowrap', {}, i.ongoing ? el('span.chip.danger', {}, `Ongoing · ${dur(i.duration)}`) : dur(i.duration)),
el('td', {}, i.label, el('span.muted.small', {}, ` ${i.methods.map((m) => METHOD[m] || m).join(', ')}`)),
el('td', {}, statusChip(i.type)),
el('td.num', {}, i.failed ? `${i.failed}/${i.samples} failed` : `${i.samples} slow`),
el('td.small', {}, i.error || (i.max_latency ? `peak ${ms(i.max_latency)}` : '')))), { empty: `No incidents in the last ${range}.` }),
el('td', {}, incidentTarget(i)),
el('td', {}, statusChip(i.type, incidentTypeText(i))),
el('td.num', {}, incidentChecks(i)),
el('td.small', {}, incidentDetail(i)))), { empty: `No incidents in the last ${range}.` }),
);
}