Skip to content

Monitoring Availability Groups Part 1 – Perfmon Counters

Monitoring Availability Groups can be tricky.  The DMVs don’t update the log_send_rate and redo_rate all the time especially if nothing is happening so if you try to use those for calculations when monitoring you could false results worse yet pages in the middle of the night.  In order to calculate the log_send_rate and redo_rate you need to capture the perfmon counters ‘Log Bytes Flushed/sec’, ‘Redone Bytes/sec’, and ‘Log Bytes Received/sec’ into temporary tables WAITFOR 1 second then capture them again.  Below is query that captures this along side what you see in the DMV for when Microsoft might fix the issue.

If you use Get-CMSHost function from my Running SQL Scripts Against Multiple Servers Using PowerShell post you can run this against a group of servers and check the status of all your Availability Groups at once.

Series NavigationMonitoring Availability Groups Part 2 – SQL Agent Alerts >>

2 thoughts on “Monitoring Availability Groups Part 1 – Perfmon Counters

  1. Julien says:

    Hi Tracy,
    Thanks for the scripts.
    I just wanted to let you know that on my instance (13.0.4411.0), counters [object_name] have this format > MSSQL$:Database Replica.
    And also that is_primary_replica column is not available for 11.0.5058.0.

  2. Julien says:

    It’s MSSQL$instancename:Database Replica


Leave a Comment