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:

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 Monitor>Alerts page. To learn more about alerts, refer to 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 alerts 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 creating 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'll find a condition that is populated with the metric chart settings.
  2. Select the condition. Screenshot of the metric explorer alert rule editor.  A condition 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. Screen shot of the alert details configuration page.

Add conditions to an alert rule

To add more conditions to your alert rule:

  1. Select Alerts from the left side menu of your container app page.
  2. Select Alert rules from the top menu.
  3. Select an alert from the table.
  4. Select Add condition in the Condition section.
  5. Select from the metrics listed in the Select a signal pane. Screenshot of the metric explorer alert rule editor showing the Select a signal pane.
  6. Configure the settings for your alert condition. For more information about configuring alerts, see Manage metric alerts.

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.  This example shows the Split by dimensions options in the Configure signal logic pane.

To learn more about configuring alerts, visit 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 Manage log alerts.

To create an alert rule:

  1. First, create and run a query to validate the query.
  2. Select New alert rule.
    Screenshot of the Log Analytics interface highlighting the new alert rule button.
  3. The Create an alert rule editor is opened 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 Screen shot 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 theAlert 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. Screen shot of the alert details configuration page.
  9. Select Review + create.
  10. Select Create.