Skip to content

The Viewer's Availability Groups header counts AGs by name, so 42 RDS Multi-AZ instances read as "1 group" #4475

Description

@erikdarlingdata

Claude posting for Erik Darling

The Availability Groups tab's header counts distinct AGs by name, so a fleet of Amazon RDS for SQL Server Multi-AZ instances reads "1 group · 42 reporting servers · 42 views". Each Multi-AZ instance carries its own internal AG, and every one of them is named RDSAG0. So 42 distinct groups collapse into one in the header count.

Seen

The Darling Viewer's Availability Groups tab on a production store (43 servers, 42 of them RDS Multi-AZ), 2026-09-27: the header reads "1 group · 42 reporting servers · 42 views". The cards are correct (one per reporting server's view); only the group count is wrong.

Why

AgTopology.Counts (PerformanceMonitor.Common/AgTopology.cs) counts cards.Select(c => Key(c.AgName)).Distinct(), where Key is the upper-cased AG name. Two different AGs with the same name are one "group" to it. The collectors join on group_id on the monitored server, but don't store it, so the store has no AG identity beyond its name.

Fix options

  1. No schema change: count a group as (AG name + its set of replica server names), both of which the cards already carry. Two RDS instances' RDSAG0 have different replica sets, so they count separately. Two monitored replicas of the same real AG share a replica set, so they still count once. That's the case the "views" count exists for.
  2. Store the AG's group_id (a collector change + a store migration) and count by it. That's exact, but larger.

Option 1 fixes the header with no migration. Pin it with a fixture of 42 same-named single-AG servers → "42 groups", and two replicas of one AG → "1 group · 2 views".

Related: #4228, #4255 (the AG reads), #4471 (the MCP tool over the same data).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions