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.
In the Azure portal, open the Stream Analytics job you want to create an alert for.
On the Job page, navigate to the Monitoring section.
Select Metrics, and then click New alert rule.
Your Stream Analytics job name should automatically appear under RESOURCE. Click Add condition, and select All Administrative operations under Configure signal logic.
Under Configure signal logic, change Event Level to All and change Status to Failed. Leave Event initiated by blank and click Done.
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.
The RESOURCE, CONDITION, and ACTION GROUPS should each have an entry. Note that in order for the alerts to fire, the conditions defined need to be met. For example, you can measure a metric's average value of over the last 15 minutes, every 5 minutes.
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.
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.
|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|
For more detail on configuring alerts in the Azure portal, see Receive alert notifications.
For further assistance, try our Azure Stream Analytics forum.
We'd love to hear your thoughts. Choose the type you'd like to provide:
Our feedback system is built on GitHub Issues. Read more on our blog.