Skip to content

Commit e3f2270

Browse files
authored
Merge pull request #208751 from cebundy/observability-split
Split Observability article
2 parents d1dfee0 + 32a124d commit e3f2270

20 files changed

+657
-444
lines changed

articles/container-apps/TOC.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,19 @@
5555
- name: Securing a custom VNET
5656
href: firewall-integration.md
5757
- name: Observability
58-
href: observability.md
58+
items:
59+
- name: Overview
60+
href: observability.md
61+
- name: Log streaming
62+
href: log-streaming.md
63+
- name: Container console
64+
href: container-console.md
65+
- name: Metrics
66+
href: metrics.md
67+
- name: Log monitoring
68+
href: log-monitoring.md
69+
- name: Alerts
70+
href: alerts.md
5971
- name: Authentication
6072
href: authentication.md
6173
- name: Dapr integration

articles/container-apps/alerts.md

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
---
2+
title: Set up alerts in Azure Container Apps
3+
description: Set up alerts to monitor your container app.
4+
services: container-apps
5+
author: cebundy
6+
ms.service: container-apps
7+
ms.custom: event-tier1-build-2022
8+
ms.topic: how-to
9+
ms.date: 08/30/2022
10+
ms.author: v-bcatherine
11+
---
12+
13+
# Set up alerts in Azure Container Apps
14+
15+
Azure Monitor alerts notify you so that you can respond quickly to critical issues. There are two types of alerts that you can define:
16+
17+
- [Metric alerts](../azure-monitor/alerts/alerts-metric-overview.md) based on Azure Monitor metric data
18+
- [Log alerts](../azure-monitor/alerts/alerts-unified-log.md) based on Azure Monitor Log Analytics data
19+
20+
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](../azure-monitor/alerts/alerts-overview.md).
21+
22+
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.
23+
24+
## Create metric alert rules
25+
26+
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](metrics.md#using-metrics-explorer)
27+
28+
After creating a metric chart, you can create a new alert rule.
29+
30+
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.
31+
1. Select the condition.
32+
:::image type="content" source="media/observability/metrics-alert-create-condition.png" alt-text="Screenshot of the metric explorer alert rule editor. A condition is automatically created based on the chart settings.":::
33+
1. 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.
34+
:::image type="content" source="media/observability/screenshot-configure-alert-signal-logic.png" alt-text="Screenshot of the configure alert signal logic in Azure Container Apps.":::
35+
1. Select **Done**.
36+
1. You can add more conditions to the alert rule by selecting **Add condition** on the **Create an alert rule** page.
37+
1. Select the **Details** tab.
38+
1. Enter a name and description for the alert rule.
39+
1. Select **Review + create**.
40+
1. Select **Create**.
41+
:::image type="content" source="media/observability/screenshot-alert-details-dialog.png" alt-text="Screen shot of the alert details configuration page.":::
42+
43+
44+
### Add conditions to an alert rule
45+
46+
To add more conditions to your alert rule:
47+
48+
1. Select **Alerts** from the left side menu of your container app page.
49+
1. Select **Alert rules** from the top menu.
50+
1. Select an alert from the table.
51+
1. Select **Add condition** in the **Condition** section.
52+
1. Select from the metrics listed in the **Select a signal** pane.
53+
:::image type="content" source="media/observability/metrics-alert-select-a-signal.png" alt-text="Screenshot of the metric explorer alert rule editor showing the Select a signal pane.":::
54+
1. Configure the settings for your alert condition. For more information about configuring alerts, see [Manage metric alerts](../azure-monitor/alerts/alerts-metric.md).
55+
56+
You can receive individual alerts for specific revisions or replicas by enabling alert splitting and selecting **Revision** or **Replica** from the **Dimension name** list.
57+
58+
Example of selecting a dimension to split an alert.
59+
60+
:::image type="content" source="media/observability/metrics-alert-split-by-dimension.png" alt-text="Screenshot of the metrics explorer alert rule editor. This example shows the Split by dimensions options in the Configure signal logic pane.":::
61+
62+
To learn more about configuring alerts, visit [Create a metric alert for an Azure resource](../azure-monitor/alerts/tutorial-metric-alert.md)
63+
64+
## Create log alert rules
65+
66+
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](../azure-monitor/alerts/alerts-log.md).
67+
68+
To create an alert rule:
69+
70+
1. First, create and run a query to validate the query.
71+
1. Select **New alert rule**.
72+
:::image type="content" source="media/observability/log-alert-new-alert-rule.png" alt-text="Screenshot of the Log Analytics interface highlighting the new alert rule button.":::
73+
1. The **Create an alert rule** editor is opened to the **Condition** tab, which is populated with your log query.
74+
:::image type="content" source="media/observability/log-alerts-rule-editor.png" alt-text="Screenshot of the Log Analytics alert rule editor.":::
75+
1. Configure the settings in the **Measurement** section
76+
:::image type="content" source="media/observability/screenshot-metrics-alerts-measurements.png" alt-text="Screen shot of metrics Create an alert rule measurement section.":::
77+
1. 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.
78+
:::image type="content" source="media/observability/log-alerts-splitting.png" alt-text="Screenshot of the Create an alert rule Split by dimensions section":::
79+
1. Enter the threshold criteria in the**Alert logic** section.
80+
:::image type="content" source="media/observability/log-alert-alert-logic.png" alt-text="Screenshot of the Create an alert rule Alert logic section.":::
81+
1. Select the **Details** tab.
82+
1. Enter a name and description for the alert rule.
83+
:::image type="content" source="media/observability/screenshot-alert-details-dialog.png" alt-text="Screen shot of the alert details configuration page.":::
84+
1. Select **Review + create**.
85+
1. Select **Create**.
86+
87+
> [!div class="nextstepaction"]
88+
> [View log streams from the Azure portal](log-streaming.md)
Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
---
2+
title: Connect to a container console in Azure Container Apps
3+
description: Connect to a container console in your container app.
4+
services: container-apps
5+
author: cebundy
6+
ms.service: container-apps
7+
ms.custom: event-tier1-build-2022
8+
ms.topic: how-to
9+
ms.date: 08/30/2022
10+
ms.author: v-bcatherine
11+
---
12+
13+
14+
# Connect to a container console in Azure Container Apps
15+
16+
Connecting to a container's console is useful when you want to troubleshoot your application inside a container. Azure Container Apps lets you connect to a container's console using the Azure portal or the Azure CLI.
17+
18+
## Azure portal
19+
20+
To connect to a container's console in the Azure portal, follow these steps.
21+
22+
1. Select **Console** in the **Monitoring** menu group from your container app page in the Azure portal.
23+
1. Select the revision, replica and container you want to connect to.
24+
1. Choose to access your console via bash, sh, or a custom executable. If you choose a custom executable, it must be available in the container.
25+
26+
:::image type="content" source="media/observability/console-ss.png" alt-text="Screenshot of Azure Container Apps Console page.":::
27+
28+
## Azure CLI
29+
30+
Use the `az containerapp exec` command to connect to a container console. Select **Ctrl-D** to exit the console.
31+
32+
For example, connect to a container console in a container app with a single container using the following command. Replace the \<placeholders\> with your container app's values.
33+
34+
# [Bash](#tab/bash)
35+
36+
```azurecli
37+
az containerapp exec \
38+
--name <ContainerAppName> \
39+
--resource-group <ResourceGroup>
40+
```
41+
42+
# [PowerShell](#tab/powershell)
43+
44+
```azurecli
45+
az containerapp exec `
46+
--name <ContainerAppName> `
47+
--resource-group <ResourceGroup>
48+
```
49+
50+
---
51+
52+
To connect to a container console in a container app with multiple revisions, replicas, and containers include the following parameters in the `az containerapp exec` command.
53+
54+
| Argument | Description |
55+
|----------|-------------|
56+
| `--revision` | The revision names of the container to connect to. |
57+
| `--replica` | The replica name of the container to connect to. |
58+
| `--container` | The container name of the container to connect to. |
59+
60+
You can get the revision names with the `az containerapp revision list` command. Replace the \<placeholders\> with your container app's values.
61+
62+
# [Bash](#tab/bash)
63+
64+
```azurecli
65+
az containerapp revision list \
66+
--name <ContainerAppName> \
67+
--resource-group <ResourceGroup> \
68+
--query "[].name"
69+
```
70+
71+
# [PowerShell](#tab/powershell)
72+
73+
```azurecli
74+
az containerapp revision list `
75+
--name <ContainerAppName> `
76+
--resource-group <ResourceGroup> `
77+
--query "[].name"
78+
```
79+
80+
---
81+
82+
Use the `az containerapp replica list` command to get the replica and container names. Replace the \<placeholders\> with your container app's values.
83+
84+
# [Bash](#tab/bash)
85+
86+
```azurecli
87+
az containerapp replica list \
88+
--name <ContainerAppName> \
89+
--resource-group <ResourceGroup> \
90+
--revision <RevisionName> \
91+
--query "[].{Containers:properties.containers[].name, Name:name}"
92+
```
93+
94+
# [PowerShell](#tab/powershell)
95+
96+
```azurecli
97+
az containerapp replica list `
98+
--name <ContainerAppName> `
99+
--resource-group <ResourceGroup> `
100+
--revision <RevisionName> `
101+
--query "[].{Containers:properties.containers[].name, Name:name}"
102+
```
103+
104+
---
105+
106+
Connect to the container console with the `az containerapp exec` command. Replace the \<placeholders\> with your container app's values.
107+
108+
# [Bash](#tab/bash)
109+
110+
```azurecli
111+
az containerapp exec \
112+
--name <ContainerAppName> \
113+
--resource-group <ResourceGroup> \
114+
--revision <RevisionName> \
115+
--replica <ReplicaName> \
116+
--container <ContainerName>
117+
```
118+
119+
# [PowerShell](#tab/powershell)
120+
121+
```azurecli
122+
az containerapp exec `
123+
--name <ContainerAppName> `
124+
--resource-group <ResourceGroup> `
125+
--revision <RevisionName> `
126+
--replica <ReplicaName> `
127+
--container <ContainerName>
128+
```
129+
130+
---
131+
132+
> [!div class="nextstepaction"]
133+
> [View log streams from the Azure portal](log-streaming.md)

articles/container-apps/ingress.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ms.custom: ignite-fall-2021, event-tier1-build-2022
1212

1313
# Set up HTTPS ingress in Azure Container Apps
1414

15-
Azure Container Apps allows you to expose your container app to the public web by enabling ingress. When you enable ingress, you do not need to create an Azure Load Balancer, public IP address, or any other Azure resources to enable incoming HTTPS requests.
15+
Azure Container Apps allows you to expose your container app to the public web by enabling ingress. When you enable ingress, you don't need to create an Azure Load Balancer, public IP address, or any other Azure resources to enable incoming HTTPS requests.
1616

1717
With ingress enabled, your container app features the following characteristics:
1818

@@ -26,7 +26,7 @@ With ingress enabled, your container app features the following characteristics:
2626

2727
## Configuration
2828

29-
Ingress is an application-wide setting. Changes to ingress settings apply to all revisions simultaneously, and do not generate new revisions.
29+
Ingress is an application-wide setting. Changes to ingress settings apply to all revisions simultaneously, and don't generate new revisions.
3030

3131
The ingress configuration section has the following form:
3232

@@ -47,10 +47,10 @@ The following settings are available when configuring ingress:
4747

4848
| Property | Description | Values | Required |
4949
|---|---|---|---|
50-
| `external` | The ingress IP and fully qualified domain name (FQDN) can either be accessible externally from the internet or a VNET, or internally within the app environment only. | `true` for external visibility from the internet or a VNET, `false` for internal visibility within app environment only (default) | Yes |
50+
| `external` | When enabled, the environment is assigned a public IP and fully qualified domain name (FQDN) for external ingress and an internal IP and FQDN for internal ingress. When disabled, only an internal IP/FQDN is created. |`true` for external visibility, `false` for internal visibility (default) | Yes |
5151
| `targetPort` | The port your container listens to for incoming requests. | Set this value to the port number that your container uses. Your application ingress endpoint is always exposed on port `443`. | Yes |
5252
| `transport` | You can use either HTTP/1.1 or HTTP/2, or you can set it to automatically detect the transport type. | `http` for HTTP/1, `http2` for HTTP/2, `auto` to automatically detect the transport type (default) | No |
53-
| `allowInsecure` | Allows insecure traffic to your container app. | `false` (default), `true`<br><br>If set to `true`, HTTP requests to port 80 are not automatically redirected to port 443 using HTTPS, allowing insecure connections. | No |
53+
| `allowInsecure` | Allows insecure traffic to your container app. | `false` (default), `true`<br><br>If set to `true`, HTTP requests to port 80 aren't automatically redirected to port 443 using HTTPS, allowing insecure connections. | No |
5454

5555
> [!NOTE]
5656
> To disable ingress for your application, you can omit the `ingress` configuration property entirely.

0 commit comments

Comments
 (0)