Commit Graph

6 Commits

Author SHA1 Message Date
Claude Agent
eb114f68e2 feat: implement Phase 5 — Alerting & Monitoring
Backend:
- AlertEvaluationService: evaluates metrics against AlertRules after each heartbeat
  - Supports cpu_usage_percent and memory_usage_percent metric paths
  - Operators: >, >=, <, <=, ==
  - 15-minute dedup window to prevent alert spam
- AlertRulesController: full CRUD for alert rules (GET/POST/PUT/DELETE)
- AlertsController: list with acknowledged filter + POST acknowledge endpoint
- IRmmHubClient: added AlertTriggered push method
- Program.cs: AlertEvaluationService registered as Scoped

Frontend:
- AlertsPage: two-tab layout (active alerts + rules)
  - Alerts tab: severity badges, acknowledge button, all/unack/ack filter
  - Rules tab: condition display, enabled toggle, delete with confirm
  - Create rule modal with MetricPath/Operator/Threshold/Severity selects
- api/types.ts: AlertRule, AlertItem, CreateAlertRuleRequest types
- api/client.ts: alertRulesApi and alertsApi
- useAgentSignalR: handles AlertTriggered → invalidates alerts query
- App.tsx: Alerts nav item with Bell icon

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 14:00:19 +01:00
Claude Agent
d17df20f5e feat: implement Phase 4 — SignalR real-time updates
Backend:
- RmmHub with typed IRmmHubClient interface (AgentMetricsUpdated, AgentStatusChanged, CommandResultUpdated)
- JoinAgentGroup / LeaveAgentGroup for per-agent subscriptions
- AgentGrpcService now pushes to SignalR after every Heartbeat and CommandResult
- Program.cs maps /hubs/rmm

Frontend:
- useSignalR hook with exponential backoff reconnect (0s/2s/10s/30s)
- useGlobalSignalR: invalidates agents query on AgentStatusChanged
- useAgentSignalR: joins agent group, invalidates metrics/tasks on updates
- DashboardPage: live agent status updates via SignalR
- AgentDetailPage: live metrics/command results + connection status indicator

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 13:53:40 +01:00
Claude Agent
0714961dd6 feat: add docker-compose for PostgreSQL and initial EF Core migration 2026-03-19 11:41:43 +01:00
Claude Agent
5c03c18ac7 feat: implement gRPC AgentService, Program.cs with Kestrel HTTP/2 config 2026-03-19 11:35:04 +01:00
Claude Agent
b2b07a2808 fix: upgrade to .NET 10 and add required NuGet packages 2026-03-19 11:19:00 +01:00
Claude Agent
5b6f9ebbfd feat: initialize .NET 8 solution with project structure 2026-03-19 10:27:37 +01:00