AlwaysOn Series: Monitoring with SQL Agent Alerts

There are several ways to monitor your Availability Groups using native SQL tools. In this particular article I'm going to cover a few SQL Agent Alerts that I have used in the past.
Let's first identify some of the error numbers we will be referencing.
Error 1480 - Indicates a server role change. Basically when the primary fails over to a secondary.
Error 35264 - Let's us know if data movement has been suspended for whatever reason.
Error 35265 - Let's us know if/when data movement has resumed.
Create the alerts (pre-requisite create an operator first!):
Open the SQL Agent in SSMS -> Right click "Alerts" and select new Alert and fill out like below. Remember to specify the error number.


You can find a great script for these at Tracy Boggiano's site. This way you don't have to click through and create each alert individually.