Hub 2.3.1: a server running a job is busy, not down

An agent before 1.1.1 neither polls nor sends stats while it runs a job,
so after 5 minutes the Hub alerted (and emailed) that it was down. While
a job it handed out is within its time limit, the server counts as busy:
no agent_silent alert, online for New install, "Running a job" in the UI.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-18 19:02:49 +02:00
co-authored by Claude Opus 5.5
parent da219c15d4
commit 5a2aec7a67
13 changed files with 76 additions and 21 deletions
+1 -1
View File
@@ -91,7 +91,7 @@ export default function ServerPage() {
return (
<div className="space-y-6">
<div>
<PageTitle title={s.name} subtitle={<>{s.mode === "central" ? "Central server" : "Church server"} · {s.hostname} · agent {s.agentVersion} · last heard {ago(s.lastSeenAt)} <StatusPill status={s.online ? "online" : "offline"} /></>} />
<PageTitle title={s.name} subtitle={<>{s.mode === "central" ? "Central server" : "Church server"} · {s.hostname} · agent {s.agentVersion} · last heard {ago(s.lastSeenAt)} <StatusPill status={s.busy ? "busy" : s.online ? "online" : "offline"} /></>} />
<ServersNav active="/servers" />
<Message msg={msg} />
</div>
@@ -99,7 +99,7 @@ export default function InstallsPage() {
<label key={s.id} className={`flex cursor-pointer gap-2 rounded-lg border p-3 text-sm ${form.serverId === s.id ? "border-indigo-500 bg-indigo-50" : "border-slate-200"}`}>
<input type="radio" name="server" value={s.id} checked={form.serverId === s.id} onChange={() => setForm({ ...form, serverId: s.id })} disabled={!s.online} />
<span>
<span className="font-medium">{s.name}</span> <StatusPill status={s.online ? "online" : "offline"} />
<span className="font-medium">{s.name}</span> <StatusPill status={s.busy ? "busy" : s.online ? "online" : "offline"} />
<span className="block text-xs text-slate-500">RAM free {s.ram ? `${(s.ram.availableBytes / 1024 ** 3).toFixed(1)} GB` : "?"} · CPU day avg {pct(s.lastDay?.cpuAvg)} · disk {pct(s.disk.reduce((m, d) => Math.max(m, d.totalBytes ? (d.usedBytes / d.totalBytes) * 100 : 0), 0))} · {s.deployments ?? 0} site(s)</span>
{low && <span className="block text-xs font-medium text-amber-800">Not recommended: under 1.5 GB RAM free</span>}
</span>
+1 -1
View File
@@ -76,7 +76,7 @@ export default function ServersPage() {
<div className="font-medium">{s.name}</div>
<div className="text-xs text-slate-500">{s.mode === "central" ? "Central server" : "Church server"} · {s.hostname || "?"} · agent {s.agentVersion || "?"}</div>
</div>
<StatusPill status={s.online ? "online" : "offline"} />
<StatusPill status={s.busy ? "busy" : s.online ? "online" : "offline"} />
</div>
<dl className="mt-4 grid grid-cols-3 gap-2 text-sm">
<div><dt className="text-xs text-slate-500">RAM used</dt><dd className="tabular-nums">{pct(s.ram?.usedPercent)} <span className="text-xs text-slate-500">of {bytes(s.ram?.totalBytes)}</span></dd></div>