azure - Trigger Alert when storage queues have messages - Stack Overflow

I want to trigger alert when any queue in the storage has messages not processed. In Azure storage queu

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 badges
Add a comment  | 

1 Answer 1

Reset to default 0

trigger 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

相关推荐

  • azure - Trigger Alert when storage queues have messages - Stack Overflow

    I want to trigger alert when any queue in the storage has messages not processed. In Azure storage queu

    6小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信