You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Fleet cards: PostgreSQL targets always show null CPU/memory metrics - the reader only queries SQL Server metric views #3267
Every PostgreSQL/Aurora target's card in get_fleet_overview / /api/fleet carries cpu_percent, total_cpu_percent, memory_mb, buffer_pool_mb, and the threads block as null, always - healthy or not. #3236's field report noted the nulls beside the staleness false positive; the staleness half is fixed, and investigating it confirmed the nulls are a separate, structural gap, not a windowing artifact.
Mechanism (verified in source)
DarlingFleetReader reads metrics exclusively from the SQL Server tables:
FleetCpuSql -> v_cpu_utilization_stats (= cpu_utilization_stats, the SQL Server ring-buffer collector's table)
FleetMemorySql -> v_memory_stats
FleetThreadsSql -> v_cpu_scheduler_stats
FleetMemoryPressureSql -> v_memory_grant_stats
A PostgreSQL target has no rows in any of these; its instance CPU lands in collect.pg_cpu_utilization (the #2719 collector, populated from AWS Performance Insights on Aurora/RDS), which nothing in the fleet reader queries. The reads are NOT time-bounded (DISTINCT ON (server_id) ... ORDER BY collection_time DESC), so this is not a too-tight-window problem - there is no window to widen. The data exists in the store (get_pg_cpu_utilization serves it per server); the fleet card simply never looks.
Why it matters
On a pure-PG fleet the overview's per-server cards carry bands but no numbers, so an operator triaging from the fleet view gets Warning/Healthy labels with nothing behind them, and cpu_severity reads Unknown on every card. On a mixed fleet PG targets rank in the worst-first list only by collection/collector state, never by load.
Scope sketch (design needed, hence an issue rather than a rider on #3236)
CPU: one more bounded cross-server read over collect.pg_cpu_utilization (latest sample per server), merged into the card for is_postgres targets; CpuSeverity thresholds presumably apply as-is to os.cpuUtilization.total.avg.
Memory/threads/memory-pressure: no PG equivalent is collected today - decide whether those stay null (honest) or gain PG sources first.
Fixed by #3271, merged to dev. Closing explicitly because a dev merge does not fire closing keywords against the default branch.
Landing in v3.7.0: fleet cards read a PostgreSQL/Aurora target's instance CPU from collect.pg_cpu_utilization through the same severity ladder, with a new cpu_source field naming which collector answered. Memory, buffer pool and the threads block stay null — no PostgreSQL equivalent is collected and none was invented.
The CpuSeverity transfer was tested rather than assumed: PI's os.cpuUtilization.total.avg and the SQL Server ring buffer's 100 - SystemIdle share quantity, denominator and averaging window. Validated against the live fleet — 50 of 50 targets have rows in the freshness window, p50 8.4%, and 348 of 71,990 samples reach 80, so the existing cutoffs do not turn a healthy PostgreSQL fleet amber.
#3271 also folded in what was filed as #3272: the memory-pressure, blocking and deadlock bands no longer report Healthy for a source a PostgreSQL target has no row in. #3272 is rescoped to the remaining open question, whether pg_blocking should feed the card's counts at all.
Activity
Merge pull request #3271 from erikdarlingdata/fix/3267-pg-fleet-cpu
erikdarlingdata commentedon Sep 10, 2026
Claude posting for Erik Darling
Fixed by #3271, merged to dev. Closing explicitly because a dev merge does not fire closing keywords against the default branch.
Landing in v3.7.0: fleet cards read a PostgreSQL/Aurora target's instance CPU from
collect.pg_cpu_utilizationthrough the same severity ladder, with a newcpu_sourcefield naming which collector answered. Memory, buffer pool and the threads block stay null — no PostgreSQL equivalent is collected and none was invented.The
CpuSeveritytransfer was tested rather than assumed: PI'sos.cpuUtilization.total.avgand the SQL Server ring buffer's100 - SystemIdleshare quantity, denominator and averaging window. Validated against the live fleet — 50 of 50 targets have rows in the freshness window, p50 8.4%, and 348 of 71,990 samples reach 80, so the existing cutoffs do not turn a healthy PostgreSQL fleet amber.#3271 also folded in what was filed as #3272: the memory-pressure, blocking and deadlock bands no longer report Healthy for a source a PostgreSQL target has no row in. #3272 is rescoped to the remaining open question, whether
pg_blockingshould feed the card's counts at all.Merge origin/dev into release/v3.7.0: sync #3236 revert + #3267 fleet…
Make the server stale band honor each collector's own cadence (erikda…
Fleet cards read a PostgreSQL target's instance CPU (erikdarlingdata#…
Live-store round trip for the fleet PostgreSQL CPU read (erikdarlingd…