diff --git a/roundtable/alerts/routes.py b/roundtable/alerts/routes.py index 22b661f..bbcb9ef 100644 --- a/roundtable/alerts/routes.py +++ b/roundtable/alerts/routes.py @@ -22,6 +22,10 @@ METRIC_CATALOG: dict[str, list[str]] = { "unifi": ["is_up", "latency_ms", "total_clients"], "docker": ["cpu_pct", "mem_pct"], "http": ["is_up", "response_ms"], + "host_agent": [ + "cpu_pct", "mem_used_pct", "mem_available_bytes", "swap_used_bytes", + "disk_used_pct_worst", "load_1m", "load_5m", "load_15m", "uptime_secs", + ], # snmp metrics are user-defined OID labels — populated dynamically from plugin_metrics "snmp": [], } diff --git a/roundtable/core/widgets.py b/roundtable/core/widgets.py index 8d678c2..15f8b56 100644 --- a/roundtable/core/widgets.py +++ b/roundtable/core/widgets.py @@ -247,6 +247,38 @@ WIDGET_REGISTRY: dict[str, dict] = { "poll": True, "params": [], }, + "host_resources": { + "key": "host_resources", + "label": "Host Agent — Resources", + "description": "Fleet view: CPU, memory, disk, and load per monitored host", + "hx_url": "/plugins/host_agent/widget", + "detail_url": "/plugins/host_agent/settings/", + "plugin": "host_agent", + "poll": True, + "params": [], + }, + "host_resource_history": { + "key": "host_resource_history", + "label": "Host Agent — History", + "description": "CPU/memory/disk history for one host", + "hx_url": "/plugins/host_agent/widget/history", + "detail_url": "/plugins/host_agent/settings/", + "plugin": "host_agent", + "poll": True, + "params": [ + { + "key": "hours", + "label": "Time range", + "type": "select", + "default": 6, + "options": [ + {"value": 1, "label": "Last 1 hour"}, + {"value": 6, "label": "Last 6 hours"}, + {"value": 24, "label": "Last 24 hours"}, + ], + }, + ], + }, }