How to set up an alert for when the Service Bus is unavailable

Hari Prathipati 0 Reputation points
2024-02-20T05:28:59.6666667+00:00

Hello, I am trying to create an alert using a KQL Query or a predefined condition in Azure Metrics to notify me when the Service Bus is down or unavailable for any reason. However, I did not find any metrics such as "Availability" or "Successful Requests" in the Azure Metrics table. Can someone help me set up an alert for this scenario? Thank you in advance. Regards, Hari.

Azure Service Bus
Azure Service Bus
An Azure service that provides cloud messaging as a service and hybrid integration.
700 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Deepanshu katara 16,720 Reputation points MVP Moderator
    2024-02-20T06:02:23.3633333+00:00

    Hi ,

    To set up an alert for when the Service Bus is unavailable using a KQL (Kusto Query Language) query, you'll typically use data from Azure Monitor logs.

    1. Identify relevant log sources: Determine which log sources contain data related to Service Bus availability. This might include logs from Azure Activity Log, Azure Monitor logs (such as diagnostic logs), or custom logs if you're logging specific events related to Service Bus availability.
    2. Write a KQL query: Craft a KQL query that checks for signs of Service Bus unavailability. This could involve checking for errors or lack of expected activity.
    3. Define the condition: Set up a condition in the alert rule that triggers when the KQL query results meet certain criteria, indicating Service Bus unavailability.
    4. Set up the alert rule: Create an alert rule in Azure Monitor that uses your KQL query and condition to trigger alerts.

    Example KQL Query

    AzureDiagnostics

    | where TimeGenerated > ago(30m) | where ResourceProvider =="MICROSOFT.SERVICEBUS" | where Category == "Error" | summarize count() by EventName_s, _ResourceId Please check this link for https://learn.microsoft.com/en-us/azure/service-bus-messaging/monitor-service-bus?tabs=AzureDiagnostics

    Accept answer if helps, Thanks!


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.