feat: host heartbeat status and dashboard metrics (2.2)

Track agent.heartbeat and report.daily.ssh per host; show online/stale
on Hosts UI; dashboard counters and SAC_HEARTBEAT_STALE_MINUTES config.
This commit is contained in:
2026-05-27 13:36:17 +10:00
parent 9ba3c4b63b
commit 04301ab359
14 changed files with 246 additions and 4 deletions
+6
View File
@@ -76,6 +76,9 @@ export interface HostSummary {
ipv4: string | null;
last_seen_at: string;
event_count: number | null;
last_heartbeat_at: string | null;
last_daily_report_at: string | null;
agent_status: "online" | "stale" | "unknown";
}
export interface HostListResponse {
@@ -116,6 +119,9 @@ export async function resolveProblem(problemId: number): Promise<{ id: number; s
export interface DashboardSummary {
events_last_24h: number;
hosts_total: number;
hosts_stale: number;
heartbeats_24h: number;
daily_reports_24h: number;
problems_open: number;
severity_24h: Record<string, number>;
recent_events: EventSummary[];