Monitoring Azure Service Bus
  • 25 Sep 2020
  • 5 Minutes to read
  • Contributors
  • Dark
  • PDF

Monitoring Azure Service Bus

  • Dark
  • PDF

Going Forward, Entities will be referred as Resources. Activities Will be referred as Automated Tasks.

Monitoring silence in your Azure Service Bus Queues

Are you not aware of a situation where no messages are flowing in your Queue/Topic?


It is very simple to configure and get alerted to this situation with Serverless360 Data Monitoring.

The flow of messages in your resources is of prime importance when you use Queues or Topic Subscription in your integration architecture. Messages flow at a different rate in the system. Sometimes, publishers generate messages at a faster rate, there may be an orchestration or workflow processing a batch of messages that push them back to the system. There will be a flurry of messages, during certain period there will be a huge volume of messages passing through and at times there are no messages at all. Whatever be the case, setting up appropriate monitoring will help to watch your system for any abnormalities. For instance, if there are any unexpected scenario to occur, you need to be notified so that you can take a look at the respective resources and take corrective actions in your system.

In this section, let us discuss a scenario where you need to be notified when there is no message flowing through your resource either a Queue or a Topic for a specific period of time, in other words, if your Queue is silent for, say 15 minutes. This may be because your publishing applications are not sending messages to the resource or there is a different problem that you will fix as soon as you come to know about this situation.

Serverless360 Data Monitoring

This is exactly the reason, we have built Serverless360 Data Monitoring. Resources can be monitored based on certain metrics within a specified time window. This will help you to check if your resource or system keeps up with your business SLA.

In Serverless360, you can create a data monitor to check the following metrics:
Incoming Messages – set Warning < 5 & Error < 1
Outgoing Messages – set Warning < 5 & Error < 1

It is an OR logic implementation. If any of the metric configurations fails, it will forward the alert.

Data monitor - queue

And check if there is any flow of messages (inbound or outbound) for every 15 minutes.

Based on the above configuration, Serverless360 will monitor the ingress and egress of messages to your queue every 15 minutes and if there are less than 5 messages flowing, it will forward a warning alert and if there are no messages moved in the 15-minute window, it will forward an error alert.

Data monitor report - queue

For more reading on Serverless360 Data Monitoring capability, refer to this document.

## Monitoring Azure Service Bus Queue availability
### Are you not aware of availability of your Queue ?
Threshold monitor and Data Monitoring capabilities in our platform will help you to configure and get alerted whenever the queue is unavailable in your Azure Subscription.

The queue might become unavailable in any of the following scenarios. Consider an Azure Service Bus queue which is already associated to a Serverless360 Composite Application and being monitored by a threshold monitor for the expected status.

1) When the queue is in Disabled / Send disabled / Receive disabled state
If Azure Service Bus Queue state is not ‘Active’ the queue will be unavailable for certain operations. When the state is –

  • ‘Disabled’ - the queue will not be available for message send or receive operations.
  • ‘Send Disabled’ - sending messages to the queue is not possible.
  • ‘Receive Disabled’ - receiving messages from the queue, other than peek lock, is not possible.

2) When the queue is removed from the Service Bus namespace
If the resource is removed from the Azure Subscription, then the status of the queue will be ‘Unknown’ and will not be available for any operations in the client applications. Serverless360 will mention this resource as ‘orphaned’ in the notification.

3) When the subscription in which the queue is present is disabled
If the Azure subscription in which the queue is present is disabled, the queue will be detected to be in status ‘Unknown’. Serverless360 will mention this resource as ‘orphaned’ in the notification.

Serverless360 can monitor Azure Service Bus Queue state and notify on the expected state not being met. Threshold monitor can be configured to get notified on the above 3 scenarios.

A notification forwarded due to unavailability of Queue will look like this:
Threshold monitor

Changing status of your queues using Serverless360
Azure Service Bus queue state can be set as ‘Send Disabled’ or ‘Receive Disabled’ in Serverless360, however this is not possible in Azure portal where a queue can hold only two states, ‘Active’ or ‘Disabled’. The screen shot below shows how Management Stack in Serverless360 facilitates editing Azure Service Bus queue’s status property.


4) When there is a temporary unavailability due to outage
This will raise a situation for Server Errors which can be monitored in Serverless360 using Data monitor.

5) When the Quota on the Queue has exceeded
When the queue already has messages that occupy its total size, sending any more messages to the queue is not possible. Any more attempts to send message to the queue will result in User error. Monitoring for User Error can check for queue availability in this scenario.

You can monitor your queue for number of Server / User Errors that occurred over a period i.e. say every 15-minute window.

server & user errors

Based on the above configuration, you will receive warning alert if the number of errors is less than 5 in the last 15 minutes and error alert when the errors are greater than 5. This way you can receive alerts when there are errors in your resources. In this example, We used User Errors to explain the concept as We cannot create Server Errors. Server Errors can happen when there is a challenge at infrastructure.

Threshold Monitor / Data Monitor?
Threshold monitor will check the current value of properties of your resources and alert only in case of violation. Data monitor will report the metrics collected over a period of time say 15-minutes. You can choose to receive reports only when there are Server Errors or other metrics in your resources.

Refer Data Monitoring in product documentation for more details.

We'd love to hear your thoughts
Please visit our feedback system to suggest new Features or Enhancements. You can also take a look at our Roadmap

Was this article helpful?