Azure Stream Analytics Jobs - Alert Creation for "Diagnostic: Diagnostic Error"

NewDBA 101 Reputation points
2024-04-03T09:46:13.2933333+00:00

I have multiple Azure stream Analytics Jobs (more than 50 Azure Stream Analytics Jobs) in my subscription.

One of the requirement we have is to create an Alert whenever there is a activity logged in Azure Portal --> Stream Analytics Job --> Activity Log - "Diagnostic: Diagnostic Error"

Capture

As I checked I can create an Alert only per stream Analytics Jobs and it costs me 1.50 Euro per Alert per Azure Stream Analytics Job , is my understanding correct ?

Metric and Log signals might not be available if the scope includes multiple resources. I see this message ribbon as well .

Please help me or guide how this can be done ?

Kind regards

Azure Stream Analytics
Azure Stream Analytics
An Azure real-time analytics service designed for mission-critical workloads.
331 questions
{count} votes

Accepted answer
  1. PRADEEPCHEEKATLA-MSFT 77,751 Reputation points Microsoft Employee
    2024-04-04T07:52:48.4+00:00

    @NewDBA - Thanks for the question and using MS Q&A platform.

    To set up an alert for the "Diagnostic: Diagnostic Error" activity log event for your Azure Stream Analytics jobs, you can use Azure Monitor.

    You are correct that you can create an alert per Stream Analytics job, and it will cost 1.50 Euro per alert per job. However, you can create a single alert rule that applies to multiple Stream Analytics jobs by using a log query alert.

    Here are the steps to create a log query alert for the "Diagnostic: Diagnostic Error" event:

    • In the Azure portal, navigate to your Log Analytics workspace.
    • Click on "Logs" in the left-hand menu.
    • Enter the following query in the query editor:
    AzureDiagnostics | where Category == "StreamAnalyticsJob" | where Level == "Error" | where Message contains "Diagnostic: Diagnostic Error"
    
    • Click on "New alert rule" in the "Query results" pane.
    • Configure the alert rule as desired, including the alert criteria, action group, and alert details.
    • Save the alert rule.

    This alert rule will trigger whenever the "Diagnostic: Diagnostic Error" event is logged for any of your Stream Analytics jobs. Note that you may need to adjust the query to match the specific format of the event message in your environment.

    Regarding the message ribbon you mentioned, it is correct that metric and log signals might not be available if the scope includes multiple resources. However, this should not affect your ability to create a log query alert as described above.

    Hope this helps. Do let us know if you any further queries.


    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.

    2 people found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful