I want to trigger alert when any queue in the storage has messages not processed. In Azure storage queue, there is a metric "Queue Message Count" with Aggregration type "Average". This gives an average value, however alert should be triggered only if messages are greater than zero for last X hours continuously. The average aggregration triggers the alert even if there is a spike for a short duration as the average will be greater than zero.
In dynamic threshold type, there is an option to provide number of such violations, but it determines the threshold value automatically and that won't work either. Is there an option to achieve this alert either using queue metrics or Log Analytics workspace ?
Update 1: Queue Message Count metric is not shown in Log Analytics.
I want to trigger alert when any queue in the storage has messages not processed. In Azure storage queue, there is a metric "Queue Message Count" with Aggregration type "Average". This gives an average value, however alert should be triggered only if messages are greater than zero for last X hours continuously. The average aggregration triggers the alert even if there is a spike for a short duration as the average will be greater than zero.
In dynamic threshold type, there is an option to provide number of such violations, but it determines the threshold value automatically and that won't work either. Is there an option to achieve this alert either using queue metrics or Log Analytics workspace ?
Update 1: Queue Message Count metric is not shown in Log Analytics.
Share edited Mar 24 at 6:48 DxG asked Mar 4 at 6:52 DxGDxG 2099 silver badges24 bronze badges1 Answer
Reset to default 0trigger alert when any queue in the storage has messages not processed
You used the “Queue Message Count” measure with the “Average” aggregation type.
To obtain the alert using the Log Analytics workspace and queue metrics, we canenable the transaction by going to metrics and then enable storage read, write, delete under the Diagnostics settings by keeping destination as log analytics workspace.
To retrieve the unprocessed queue messages from storage, use the KQL query below.
AzureMetrics
| where TimeGenerated > ago(7d)
| where MetricName == "QueueMessageCount"
| where Total > 0
| summarize Count=count() by bin(TimeGenerated, 1h), ResourceId
| where Count == X
| order by TimeGenerated desc
Created the alert rule while utilizing the dynamic threshold.
Created the Action groups:
The Alert had been triggered to the mail as I had connected to the Action group of the alerts:
References:
Create an Azure Monitor metric alert with dynamic thresholds - Azure Monitor
Monitor Azure Queue Storage
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745058518a4608818.html
评论列表(0条)