Feb 06 2019
- last edited on
Apr 07 2022
Is it possible to get metrics for the Azure Alerts available to query LogAnalytics. i.e. for example I'd like to show on an Azure Dashboard, along side the other resource metrics know how many active Sev 1 alerts etc for a specific time period.
I have looked in LogAnalytics (query) and I see the Alert table however it's empty - I do have some active and closed Alerts.
Am I looking in the right place, or is that this data is not available?
Feb 07 2019 11:06 PMSolution
Azure Alerts data is not in Log Analytics. It is located in API:
Microsoft does not provide any dashboards for alerts unfortunately. Might be best to request this feature in Azure Monitor user voice.
Oct 01 2019 04:00 PM - edited Oct 01 2019 04:02 PM
Hey Bryan, the Workbooks blade in Azure Monitor can do something that's at least very, very close to what your asking.
Go to 'Monitor' -> 'Workbooks' blades, then click 'New':
Click 'Add Query':
Then click the tiny '(change)' option next to where it says 'Query: None.....'
Then we get to the good stuff:
Make the following changes to the option to get you something close to what you want:
Data Source = Alerts (preview)
Resource Type = Subscriptions
Subscriptions = <select the subscriptions you want to cover>
Time Range = <define the desired time range for your query>
Results = Alerts
Severity/Condition/Alert State = <define as per your needs>
Visualisation = Grid
This new workbook can then be saved, and the step pinned to a Dashboard.
You'll probably want to tweak a bit to get it to suit your requirements, but I think this should get you close?