Azure Alerts metrics in LogAnalytics

Regular Visitor

Hi there,


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?




2 Replies
best response confirmed by Stanislav Zhelyazkov (MVP)


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.



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?