Rediger

Set up alerts in Azure Container Apps

Azure Monitor alerts notify you so that you can respond quickly to critical issues. There are two types of alerts that you can define:

  • Metric alerts based on Azure Monitor metric data
  • Log alerts based on Azure Monitor Log Analytics data

For more information, see Choose the right type of alert rule.

You can create alert rules from metric charts in the metric explorer and from queries in Log Analytics. You can also define and manage alerts from the Monitoring > Alerts page. To learn more about alerts, see Overview of alerts in Microsoft Azure.

The Alerts page in the Monitoring section on your container app page displays all of your app's alerts. You can filter the list by alert type, resource, time, and severity. You can also modify and create new alert rules from this page.

Create metric alert rules

When you create alert rules based on a metric chart in the metrics explorer, alerts are triggered when the metric data matches alert rule conditions. For more information about creating metrics charts, see Using metrics explorer.

After you create a metric chart, you can create a new alert rule.

  1. Select New alert rule. The Create an alert rule page is opened to the Condition tab. Here you find a condition that is populated with the metric chart settings.

  2. Select the condition.

    Screenshot of the metric explorer alert rule editor that shows a condition that is automatically created based on the chart settings.

  3. Modify the Alert logic section to set the alert criteria. You can set the alert to trigger when the metric value is greater than, less than, or equal to a threshold value. You can also set the alert to trigger when the metric value is outside of a range of values.

    Screenshot of the configure alert signal logic in Azure Container Apps.

  4. Select Done.

  5. You can add more conditions to the alert rule by selecting Add condition on the Create an alert rule page.

  6. Select the Details tab.

  7. Enter a name and description for the alert rule.

  8. Select Review + create.

  9. Select Create.

    Screenshot of the alert details configuration page.

Add conditions to an alert rule

To add more conditions to your alert rule:

  1. In your container app page, from the left menu, select Alerts.

  2. From the top menu, select Alert rules.

  3. Select an alert from the table.

  4. Select Edit.

  5. Select Condition, then scroll down and select Add condition.

  6. Select a popular signal or select See all signals for more options.

    Screenshot of the metric explorer alert rule editor showing the Select a signal pane.

  7. Configure the settings for your alert condition. For more information about configuring alerts, see Create or edit a metric alert rule.

You can receive individual alerts for specific revisions or replicas by enabling alert splitting and selecting Revision or Replica from the Dimension name list.

Example of selecting a dimension to split an alert.

Screenshot of the metrics explorer alert rule editor example that shows the Split by dimensions options in the Configure signal logic pane.

To learn more about configuring alerts, see Create a metric alert for an Azure resource.

Create log alert rules

You can create log alerts from queries in Log Analytics. When you create an alert rule from a query, the query is run at set intervals triggering alerts when the log data matches the alert rule conditions. To learn more about creating log alert rules, see Create or edit a log search alert rule.

To create an alert rule:

  1. First, create the query and run it to validate the result.

  2. Select New alert rule.

    Screenshot of the Log Analytics interface highlighting the new alert rule button.

  3. The Create an alert rule editor opens to the Condition tab, which is populated with your log query.

    Screenshot of the Log Analytics alert rule editor.

  4. Configure the settings in the Measurement section

    Screenshot of metrics Create an alert rule measurement section.

  5. Optionally, you can enable alert splitting in the alert rule to send individual alerts for each dimension you select in the Split by dimensions section of the editor.

    Screenshot of the Create an alert rule Split by dimensions section.

  6. Enter the threshold criteria in the Alert logic section.

    Screenshot of the Create an alert rule Alert logic section.

  7. Select the Details tab.

  8. Enter a name and description for the alert rule.

    Screenshot of the alert details configuration page.

  9. Select Review + create.

  10. Select Create.

Next step