Please have a look above link and help to creat the same.
We've instituted the above alert for our AG and it worked like a charm. We were notified when the PRIMARY NODE's lease expired and failed over to the 2ndary - we were able to then react to this issue before anyone knew that an issue had occurred. I would recommend setting the check intervals to 1 minute though as a 5 minute window or greater could be spell disaster.
if you have DPA, it can monitor and alert on Availability Groups for both failover and status change.
See this article for more information on AG functionality and alerts in DPA: https://support.solarwinds.com/Success_Center/Database_Performance_Analyzer_(DPA)/DPA_111_feature_Im...
SolarWinds solutions are rooted in our deep connection to our user base in the THWACK® online community. More than 150,000 members are here to solve problems, share technology and best practices, and directly contribute to our product development process.