Possible to create an Alert/Monitoring on EventHub which provide a comparison of Incoming and Successfull Request/Messages

Jignesh Vala 61 Reputation points
2022-01-07T13:02:17.203+00:00

Hi All,
Hope you are safe.

  1. I need to set an alert on event hub which can do a comparison/Calculation of what ever "incoming request received" that completed through "successful request", means incoming and successful request count must be same in a particular time example 5 min or 15 min duration.
  2. Same comparison for incoming/outgoing messages. it should be same count.

Thanks,
Jignesh

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
3,645 questions
Azure Event Hubs
Azure Event Hubs
An Azure real-time data ingestion service.
719 questions
0 comments No comments
{count} votes

Accepted answer
  1. George Moise 2,361 Reputation points Microsoft Employee
    2022-01-07T13:21:05.543+00:00

    Hi @Jignesh Vala ,

    The info you want to monitor is generated as Standard Metrics by the EventHub Resource.
    When you create Azure Monitor - Alert Rule - based on Metrics, you can only do simple logic verification, and you cannot perform mathematical operations in the alert logic.

    When you need to perform various analysis / operations on metrics values, you need to store those metrics as logs inside a Log Analytics Workspace.
    To do this, you will have to create a Diagnostic Setting on your Event Hub, where you configure AllMetrics to be streamed to a Log Analytics Workspace.
    NOTE: When you send metrics / diagnostic logs to a Log Analytics Workspace, you will end up generating costs on that Log Analytics Workspace resource based on the amount of GB you ingest in the Workspace, according with the Log Analytics Workspace pricing.

    Once the metrics are in the Log Analytics Workspace, you can build your Kusto Query (Logs search) where you query the Metrics Values (found in the AzureMetrics table) and perform the required mathematical operations / analysis.
    Once you have such a query, you can then create an Azure Monitor - Alert Rule - with a Custom Log Search signal, that will run the same Query periodically for you and generate an alert based on a specified criteria.

    I hope this will help you!
    BR,
    George

    P.S. please remember to mark as an answer when applicable.


0 additional answers

Sort by: Most helpful

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.