← Back to projects
PROJECT / 04Personal lab
Linux service monitor
A small dashboard for services and incidents.
WEB PROTOTYPE
Services and metrics are simulated. Trigger an incident and see the summary change.
Available services
Sample average latency
Incidents
| Service | Status | Latency |
|---|
View concept code
export function services(failed = false) {
return [
{ name: 'Web', latency: 42, up: true },
{ name: 'API', latency: failed ? null : 86, up: !failed },
{ name: 'Database', latency: 12, up: true },
{ name: 'Worker', latency: 28, up: true },
];
}
export function summary(rows) {
const up = rows.filter((r) => r.up);
return {
up: up.length,
down: rows.length - up.length,
latency: up.length ? Math.round(up.reduce((n, r) => n + r.latency, 0) / up.length) : 0,
};
}