79505413

Date: 2025-03-13 04:30:32
Score: 1.5
Natty:
Report link

\> 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 can

enable 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.

\> 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 can

enable 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.

```kql

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.

![enter image description here](https://i.imgur.com/Jpx1eBL.png)

![enter image description here](https://i.imgur.com/43oUYNJ.png)

Created the Action groups

![enter image description here](https://i.imgur.com/rwlvXcl.png)

The Alert had been triggered to the mail as I had connected to the Action group of the alerts

![enter image description here](https://i.imgur.com/zfLdebu.png)

**References:**

[Create an Azure Monitor metric alert with dynamic thresholds - Azure Monitor](https://learn.microsoft.com/en-us/azure/azure-monitor/alerts/alerts-dynamic-thresholds)

[Monitor Azure Queue Storage](https://learn.microsoft.com/en-us/azure/storage/queues/monitor-queue-storage?tabs=azure-portal)

created the alert rule while utilizing the dynamic threshold.

![enter image description here](https://i.imgur.com/Jpx1eBL.png)

![enter image description here](https://i.imgur.com/43oUYNJ.png)

Created the Action groups

![enter image description here](https://i.imgur.com/rwlvXcl.png)

The Alert had been triggered to the mail as I had connected to the Action group of the alerts

![enter image description here](https://i.imgur.com/zfLdebu.png)

**References:**

[Create an Azure Monitor metric alert with dynamic thresholds - Azure Monitor](https://learn.microsoft.com/en-us/azure/azure-monitor/alerts/alerts-dynamic-thresholds)

[Monitor Azure Queue Storage](https://learn.microsoft.com/en-us/azure/storage/queues/monitor-queue-storage?tabs=azure-portal)

Reasons:
  • Blacklisted phrase (1): enter image description here
  • Long answer (-1):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Harshitha Bathini