solarOSsolarOS Docs
Concepts

Device health (green/amber/red, shown on the customer portal's system health banner) isn't a stored field: it's computed on the fly by determineHealthStatus in apps/web/src/lib/monitoring/system-health.ts from two inputs: open alerts (AlertSeverity: LOW/MEDIUM/HIGH/CRITICAL, only NEW/ACTIVE/RESOLUTION_IN_PROGRESS statuses count as "open") and each device's ConnectionStatus (CONNECTED/PENDING/DISCONNECTED/ERROR/ INACTIVE/SUSPENDED). Per that file's own doc comment: red if any high/critical alert is open or every device is down; amber if any low/medium alert is open or some devices are down; green otherwise.

TODO(owner, likely engineering): write the full page from apps/web/src/lib/monitoring/system-health.ts: walk through determineHealthStatus's exact precedence when alerts and connection status disagree, and confirm whether PENDING/INACTIVE/SUSPENDED count as "down" the same as DISCONNECTED/ERROR for this computation (read the function body, not just the header comment, before publishing).

Was this page helpful?