Set up alerts for Azure Stream Analytics jobs

It's important to monitor your Azure Stream Analytics job to ensure the job is running continuously without any problems. This article describes how to set up alerts for common scenarios that should be monitored.

Rules can be set up on metrics through the portal and can be configured programmatically over Operation Logs data.

Set up alerts in the Azure portal

The following example demonstrates how to set up alerts for when your job enters a failed state. This alert is recommended for all jobs.

  1. In the Azure portal, open the Stream Analytics job you want to create an alert for.

  2. On the Job page, navigate to the Monitoring section.

  3. Select Metrics, and then click New alert rule.

    Azure portal Stream Analytics alerts setup

  4. Your Stream Analytics job name should automatically appear under RESOURCE. Click Add condition, and select All Administrative operations under Configure signal logic.

    Select signal name for Stream Analytics alert

  5. Under Configure signal logic, change Event Level to All and change Status to Failed. Leave Event initiated by blank and click Done.

    Configure signal logic for Stream Analytics alert

  6. Select an existing action group or create a new group. In this example, a new action group called TIDashboardGroupActions was created with an Emails action that sends an email to users with the Owner Azure Resource Manager Role.

    Setting up an alert for an Azure Streaming Analytics job

  7. The RESOURCE, CONDITION, and ACTION GROUPS should each have an entry.

    Create Stream Analytics alert rule

    Add an Alert rule name, Description, and your Resource Group to the ALERT DETAILS and click Create alert rule to create the rule for your Stream Analytics job.

    Create Stream Analytics alert rule

Scenarios to monitor

The following alerts are recommended for monitoring the performance of your Stream Analytics job. These metrics should be evaluated every minute over the last 5-minute period. If your job suffers from performance issues, you can use query parallelization to make it more optimal and try increasing the number of streaming units.

Metric Condition Time Aggregation Threshold Corrective Actions
SU% Utilization Greater than Maximum 80 There are multiple factors that increase SU% Utilization. You can scale with query parallelization or increase the number of streaming units. For more information, see Leverage query parallelization in Azure Stream Analytics.
Runtime errors Greater than Total 0 Examine the activity or diagnostic logs and make appropriate changes to the inputs, query, or outputs.
Watermark delay Greater than Maximum When average value of this metric over the last 15 minutes is greater than late arrival tolerance (in seconds). If you have not modified the late arrival tolerance, the default is set to 5 seconds. Try increasing the number of SUs or parallelizing your query. For more information on SUs, see Understand and adjust Streaming Units. For more information on parallelizing your query, see Leverage query parallelization in Azure Stream Analytics.
Input deserialization errors Greater than Total 0 Examine the activity or diagnostic logs and make appropriate changes to the input. For more information on diagnostic logs, see Troubleshoot Azure Stream Analytics using diagnostics logs

Get help

For more detail on configuring alerts in the Azure portal, see Receive alert notifications.

For further assistance, try our Azure Stream Analytics forum.

Next steps