We are using SCOM to monitor our SQL Server Environments, which includes several AlwaysON groups. Everything related to SQL shows up as healthy in SCOM, except for the Availability Groups, which all show a warning. Opening up the Health Explorer for an AG shows that the Availability Replicas Role monitor and the Availability Replicas Connection monitor are the unhealthy monitors, both only for the secondary replica.
I have understood this has to do / is caused by the way the dmv sys.dm_hadr_availability_replica_states works, as this dmv shows both replicas when executed on the primary server, but only shows the secondary replica when executed on the secondary server.
I was a bit surprised by this, as we are using SCOM 2019 and I would expect this version to take this into account.
So my questions are:
- our SQL Server version is 2017 : is this issues perhaps solved when we migrate to SQL 2022 ?
- If not, how can we circumvent or solve this issue and get rid of the (false) warnings?