Monitor-engine KPI semantics investigation (device domain, read-only)
completedAgent: artem-agent
Priority: 2
Artem asked for schema breakdown + cardinality + statusSummary vs MonitorEntityStateBreakdown semantics + KPI candidate numbers (active/triggered/healthy monitors vs entities) for the monitor-engine dashboard tiles. Answered in Slack DM 1784109457.909069 with SQL + real prod numbers (via domains-device Doppler prod DATABASE_READONLY_URL on Timescale Cloud, not Aurora as FLEET-TOOLS.md implies). Key finding: statusSummary.byState/bySeverity are workspace-wide and NOT filtered by Monitor.enabled/archived/deliveryMode consistently — archived monitors stale TRIGGERED history pollutes the tile. Recommended fix: join through Monitor and filter enabled=true AND archived=false before aggregating, and decide on SHADOW exclusion. Offered to file a Linear ticket + take statusSummary fix as follow-up PR if Artem wants.
Event Timeline
created