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
|
|
@ -3,7 +3,7 @@ import { el, segmented, store } from '../ui.js';
|
|||
import { get } from '../api.js';
|
||||
import { STATUS, statusChip, statusLegend, strip, tipRow, tipTitle, hideTip, showTip } from '../charts.js';
|
||||
import { axisTime, dur, 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' };
|
||||
|
||||
|
|
@ -53,7 +53,7 @@ export function mount(root, ctx) {
|
|||
section('Timeline', `${range} in ${st.buckets} slices of ${dur(st.width)}. A slice is down when half its checks fail, degraded when a fifth are slow or failing.`),
|
||||
statusLegend(),
|
||||
strips(st),
|
||||
section('Incidents', `Slow means over ${inc.thresholds.lan_ms} ms on the LAN, ${inc.thresholds.wan_ms} ms to the internet, ${inc.thresholds.dns_ms} ms for DNS, or ${pct(inc.thresholds.loss)}+ ping loss.`),
|
||||
section('Incidents', `Slow means over ${inc.thresholds.lan_ms} ms on the LAN, ${inc.thresholds.wan_ms} ms to the internet, ${inc.thresholds.dns_ms} ms for DNS, or ${pct(inc.thresholds.loss)}+ ping loss. A probe that stops reporting is kept as an incident only if its own log shows it couldn’t reach the hub.`),
|
||||
incidents(inc.incidents),
|
||||
);
|
||||
}
|
||||
|
|
@ -132,10 +132,10 @@ export function mount(root, ctx) {
|
|||
el('td.nowrap', { title: when(i.start) }, when(i.start)),
|
||||
el('td.nowrap', {}, i.ongoing ? el('span.chip.danger', {}, `Ongoing · ${dur(i.duration)}`) : dur(i.duration)),
|
||||
el('td', {}, el('a', { href: `/probes/${i.probe_id}` }, i.probe)),
|
||||
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)}` : '')),
|
||||
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}.` });
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue