Checks all Azure Resources in a given Azure Resource Group for the presence of a configured Alert Rule and reports the status for each Resource. This script does not check for multiple Alert Rules, simply the presence of 1 or none as that was the request given to me. Could be easily edited list out rules per resource. Please don't hesitate to provide feedback or requests for customization.
Example: Outputs whether a resource has rules configured or not.
Example: Outputs whether a resource has rules configured or not to a log.
Download script to see full logic flow, here is the snippet where the work happens.
TechNet gallery is retiring! This script was migrated from TechNet script center to GitHub by Microsoft Azure Automation product group. All the Script Center fields like Rating, RatingCount and DownloadCount have been carried over to Github as-is for the migrated scripts only. Note : The Script Center fields will not be applicable for the new repositories created in Github & hence those fields will not show up for new Github repositories.