I have tried for hours to find this answer.
I have a storage account, this account has about 50 queues setup in it. I need to monitor some of them and get an alert if the process that services them stops for any reason. So I want to know when a specific queue has more than X number of messages in it.
Using Monitor:Alerts seems to allow a signal for the entire storage account, but not a specific queue, which is useless.
I am open to 3rd party solutions if that is the only way to do this. I would rather not write a custom application to do it because that is just another point of failure.
Thanks in advance!
Using Alerts, yes you can monitor for entire storage account, if you want to monitor specific queue in that case you can alternatively use Azure Logic Apps, and below is the design
which works for me:
Specify no of messages like below and you can send mail to outlook mail or gmail also and others also same as alerts with different connectors:
You can change 1 second and keep it as 1 hr or day as you wish from drop down. You can send to action group or sms with different connector.
Output:
Alternatively you can use log analytics workspaces. Send logs of queues to log analytics workspaces, set diagnostics settings as below :
and then save it:
Then you can check logs in log analytics workspace like below:
StorageQueueLogs
| where OperationName contains "PutMessage"
| where Uri contains "https://storageaccountname.queue.core.windows.net:443/queuename/messages?"
| count
Here https://storageaccountname.queue.core.windows.net:443/queuename/messages?
contains queuename(only queues you want).
While creating alert you can set the threshold value.