Skip to content

Commit f25d630

Browse files
authored
Merge pull request #220655 from paulth1/containers-articles-batch-5
edit pass: Containers articles batch 5
2 parents d97d0a6 + 5581f15 commit f25d630

File tree

5 files changed

+140
-142
lines changed

5 files changed

+140
-142
lines changed

articles/azure-monitor/containers/container-insights-custom-metrics.md

Lines changed: 43 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -8,100 +8,100 @@ ms.reviewer: viviandiec
88
---
99

1010
# Metrics collected by Container insights
11-
Container insights collects [custom metrics](../essentials/metrics-custom-overview.md) from Azure Kubernetes Service (AKS) and Azure Arc-enabled Kubernetes cluster nodes and pods, which allows you to present timely aggregate calculations (average, count, maximum, minimum, sum) in performance charts, pin performance charts in Azure portal dashboards, and take advantage of [metric alerts](../alerts/alerts-types.md#metric-alerts).
11+
Container insights collects [custom metrics](../essentials/metrics-custom-overview.md) from Azure Kubernetes Service (AKS) and Azure Arc-enabled Kubernetes cluster nodes and pods. With custom metrics, you can:
12+
13+
- Present timely aggregate calculations (average, count, maximum, minimum, and sum) in performance charts.
14+
- Pin performance charts in Azure portal dashboards.
15+
- Take advantage of [metric alerts](../alerts/alerts-types.md#metric-alerts).
1216

1317
> [!NOTE]
1418
> This article describes collection of custom metrics from Kubernetes clusters. You can also collect Prometheus metrics as described in [Collect Prometheus metrics with Container insights](container-insights-prometheus.md).
1519
16-
## Using custom metrics
20+
## Use custom metrics
1721
Custom metrics collected by Container insights can be accessed with the same methods as custom metrics collected from other data sources, including [metrics explorer](../essentials/metrics-getting-started.md) and [metrics alerts](../alerts/alerts-types.md#metric-alerts).
1822

1923
## Metrics collected
2024
The following sections describe the metric values collected for your cluster.
2125

2226
### Node metrics
2327

24-
Namespace: `Insights.container/nodes`<br>
25-
Dimensions: `host`
26-
28+
**Namespace:** `Insights.container/nodes`<br>
29+
**Dimensions:** `host`
2730

2831
|Metric |Description |
2932
|----|------------|
3033
|cpuUsageMillicores |CPU utilization in millicores by host.|
31-
|cpuUsagePercentage, cpuUsageAllocatablePercentage (preview) |CPU usage percentage by node and allocatable respectively.|
34+
|cpuUsagePercentage, cpuUsageAllocatablePercentage (preview) |CPU usage percentage by node and allocatable, respectively.|
3235
|memoryRssBytes |Memory RSS utilization in bytes by host.|
33-
|memoryRssPercentage, memoryRssAllocatablePercentage (preview) |Memory RSS usage percentage by host and allocatable respectively.|
36+
|memoryRssPercentage, memoryRssAllocatablePercentage (preview) |Memory RSS usage percentage by host and allocatable, respectively.|
3437
|memoryWorkingSetBytes |Memory Working Set utilization in bytes by host.|
35-
|memoryWorkingSetPercentage, memoryRssAllocatablePercentage (preview) |Memory Working Set usage percentage by host and allocatable respectively.|
38+
|memoryWorkingSetPercentage, memoryRssAllocatablePercentage (preview) |Memory Working Set usage percentage by host and allocatable, respectively.|
3639
|nodesCount |Count of nodes by status.|
3740
|diskUsedPercentage |Percentage of disk used on the node by device.|
3841

3942
### Pod metrics
40-
Namespace: `Insights.container/pods`<br>
41-
Dimensions: `controllerName`, `Kubernetes namespace`
43+
**Namespace:** `Insights.container/pods`<br>
44+
**Dimensions:** `controllerName`, `Kubernetes namespace`
4245

4346
|Metric |Description |
4447
|----|------------|
4548
|podCount |Count of pods by controller, namespace, node, and phase.|
4649
|completedJobsCount |Completed jobs count older user configurable threshold (default is six hours) by controller, Kubernetes namespace. |
47-
|restartingContainerCount |Count of container restarts by controller, Kubernetes namespace.|
48-
|oomKilledContainerCount |Count of OOMkilled containers by controller, Kubernetes namespace.|
49-
|podReadyPercentage |Percentage of pods in ready state by controller, Kubernetes namespace.|
50+
|restartingContainerCount |Count of container restarts by controller and Kubernetes namespace.|
51+
|oomKilledContainerCount |Count of OOMkilled containers by controller and Kubernetes namespace.|
52+
|podReadyPercentage |Percentage of pods in ready state by controller and Kubernetes namespace.|
5053

5154
### Container metrics
52-
Namespace: `Insights.container/containers`
53-
Dimensions: `containerName`, `controllerName`, `Kubernetes namespace`, `podName`
55+
**Namespace:** `Insights.container/containers`<br>
56+
**Dimensions:** `containerName`, `controllerName`, `Kubernetes namespace`, `podName`
5457

5558
|Metric |Description |
5659
|----|------------|
57-
|**(Old)cpuExceededPercentage** |CPU utilization percentage for containers exceeding user configurable threshold (default is 95.0) by container name, controller name, Kubernetes namespace, pod name.<br> Collected |
58-
|**(New)cpuThresholdViolated** |Metric triggered when CPU utilization percentage for containers exceeding user configurable threshold (default is 95.0) by container name, controller name, Kubernetes namespace, pod name.<br> Collected |
59-
|**(Old)memoryRssExceededPercentage** |Memory RSS percentage for containers exceeding user configurable threshold (default is 95.0) by container name, controller name, Kubernetes namespace, pod name.|
60-
|**(New)memoryRssThresholdViolated** |Metric triggered when Memory RSS percentage for containers exceeding user configurable threshold (default is 95.0) by container name, controller name, Kubernetes namespace, pod name.|
61-
|**(Old)memoryWorkingSetExceededPercentage** |Memory Working Set percentage for containers exceeding user configurable threshold (default is 95.0) by container name, controller name, Kubernetes namespace, pod name.|
62-
|**(New)memoryWorkingSetThresholdViolated** |Metric triggered when Memory Working Set percentage for containers exceeding user configurable threshold (default is 95.0) by container name, controller name, Kubernetes namespace, pod name.|
63-
60+
|(Old)cpuExceededPercentage |CPU utilization percentage for containers exceeding user configurable threshold (default is 95.0) by container name, controller name, Kubernetes namespace, and pod name.<br> Collected |
61+
|(New)cpuThresholdViolated |Metric triggered when CPU utilization percentage for containers exceeding user configurable threshold (default is 95.0) by container name, controller name, Kubernetes namespace, and pod name.<br> Collected |
62+
|(Old)memoryRssExceededPercentage |Memory RSS percentage for containers exceeding user configurable threshold (default is 95.0) by container name, controller name, Kubernetes namespace, and pod name.|
63+
|(New)memoryRssThresholdViolated |Metric triggered when Memory RSS percentage for containers exceeding user configurable threshold (default is 95.0) by container name, controller name, Kubernetes namespace, and pod name.|
64+
|(Old)memoryWorkingSetExceededPercentage |Memory Working Set percentage for containers exceeding user configurable threshold (default is 95.0) by container name, controller name, Kubernetes namespace, and pod name.|
65+
|(New)memoryWorkingSetThresholdViolated |Metric triggered when Memory Working Set percentage for containers exceeding user configurable threshold (default is 95.0) by container name, controller name, Kubernetes namespace, and pod name.|
6466

6567
### Persistent volume metrics
6668

67-
Namespace: `Insights.container/persistentvolumes`
68-
Dimensions: `kubernetesNamespace`, `node`, `podName`, `volumeName`
69-
69+
**Namespace:** `Insights.container/persistentvolumes`<br>
70+
**Dimensions:** `kubernetesNamespace`, `node`, `podName`, `volumeName`
7071

7172
|Metric |Description |
7273
|----|------------|
73-
|**(Old)pvUsageExceededPercentage** |PV utilization percentage for persistent volumes exceeding user configurable threshold (default is 60.0) by claim name, Kubernetes namespace, volume name, pod name, and node name.|
74-
|**(New)pvUsageThresholdViolated** |Metric triggered when PV utilization percentage for persistent volumes exceeding user configurable threshold (default is 60.0) by claim name, Kubernetes namespace, volume name, pod name, and node name.|
74+
|(Old)pvUsageExceededPercentage |Persistent volume (PV) utilization percentage for persistent volumes exceeding user configurable threshold (default is 60.0) by claim name, Kubernetes namespace, volume name, pod name, and node name.|
75+
|(New)pvUsageThresholdViolated |Metric triggered when PV utilization percentage for persistent volumes exceeding user configurable threshold (default is 60.0) by claim name, Kubernetes namespace, volume name, pod name, and node name.|
7576

7677
## Enable custom metrics
77-
If your cluster uses [managed identity authentication](container-insights-onboard.md#authentication) for Container insights, then custom metrics will be enabled for you. If not, then you need to enable custom metrics using one of the methods described below.
78+
If your cluster uses [managed identity authentication](container-insights-onboard.md#authentication) for Container insights, custom metrics will be enabled for you. If not, you need to enable custom metrics by using one of the following methods.
7879

7980
This process assigns the *Monitoring Metrics Publisher* role to the cluster's service principal. Monitoring Metrics Publisher has permission only to push metrics to the resource. It can't alter any state, update the resource, or read any data. For more information, see [Monitoring Metrics Publisher role](../../role-based-access-control/built-in-roles.md#monitoring-metrics-publisher). The Monitoring Metrics Publisher role requirement doesn't apply to Azure Arc-enabled Kubernetes clusters.
8081

8182
### Prerequisites
8283

83-
Before you update your cluster, confirm the following:
84+
Before you update your cluster:
8485

8586
- See the supported regions for custom metrics at [Supported regions](../essentials/metrics-custom-overview.md#supported-regions).
86-
87-
* You're a member of the [Owner](../../role-based-access-control/built-in-roles.md#owner) role on the AKS cluster resource to enable collection of custom performance metrics for nodes and pods. This requirement does not apply to Azure Arc-enabled Kubernetes clusters.
87+
- Confirm that you're a member of the [Owner](../../role-based-access-control/built-in-roles.md#owner) role on the AKS cluster resource to enable collection of custom performance metrics for nodes and pods. This requirement doesn't apply to Azure Arc-enabled Kubernetes clusters.
8888

8989
### Enablement options
9090
Use one of the following methods to enable custom metrics for either a single cluster or all clusters in your subscription.
9191

9292
#### [Azure portal](#tab/portal)
9393

9494
1. Select the **Insights** menu for the cluster in the Azure portal.
95-
2. In the banner that appears at the top of the pane, select **Enable** to start the update.
95+
1. On the banner that appears at the top of the pane, select **Enable** to start the update.
9696

97-
:::image type="content" source="./media/container-insights-update-metrics/portal-banner-enable-01.png" alt-text="Screenshot of the Azure portal that shows the banner for upgrading an AKS cluster." lightbox="media/container-insights-update-metrics/portal-banner-enable-01.png":::
97+
:::image type="content" source="./media/container-insights-update-metrics/portal-banner-enable-01.png" alt-text="Screenshot that shows the Azure portal with the banner for upgrading an AKS cluster." lightbox="media/container-insights-update-metrics/portal-banner-enable-01.png":::
9898

9999
The process can take several seconds to finish. You can track its progress under **Notifications** from the menu.
100100

101101
### [CLI](#tab/cli)
102102

103103
#### Update a single cluster
104-
In the command below, edit the values for `subscriptionId`, `resourceGroupName`, and `clusterName` by using the values on the **AKS Overview** page for the AKS cluster. The value of `clientIdOfSPN` is returned when you run the command `az aks show`.
104+
In the following command, edit the values for `subscriptionId`, `resourceGroupName`, and `clusterName` by using the values on the **AKS Overview** page for the AKS cluster. The value of `clientIdOfSPN` is returned when you run the command `az aks show`.
105105

106106
```azurecli
107107
az login
@@ -111,7 +111,7 @@ az aks show -g <resourceGroupName> -n <clusterName> --query "addonProfiles.omsag
111111
az role assignment create --assignee <clientIdOfSPN> --scope <clusterResourceId> --role "Monitoring Metrics Publisher"
112112
```
113113

114-
To get the value for `clientIdOfSPNOrMsi`, you can run the command `az aks show` as shown in the following example. If the `servicePrincipalProfile` object has a valid `objectid` value, you can use that. Otherwise, if it's set to `msi`, you need to pass in the Object ID from `addonProfiles.omsagent.identity.objectId`.
114+
To get the value for `clientIdOfSPNOrMsi`, run the command `az aks show` as shown in the following example. If the `servicePrincipalProfile` object has a valid `objectid` value, you can use that. Otherwise, if it's set to `msi`, pass in the object ID from `addonProfiles.omsagent.identity.objectId`.
115115

116116
```azurecli
117117
az login
@@ -125,30 +125,29 @@ az role assignment create --assignee <clientIdOfSPNOrMsi> --scope <clusterResour
125125
>If you want to perform the role assignment with your user account, use the `--assignee` parameter as shown in the example. If you want to perform the role assignment with a service principal name (SPN), use the `--assignee-object-id` and `--assignee-principal-type` parameters instead of the `--assignee` parameter.
126126
127127
#### Update all clusters
128-
Run the following command to update all clusters in your subscription. Edit the value for `subscriptionId` by using the value from the **AKS Overview** page for the AKS cluster.
128+
Run the following command to update all clusters in your subscription. Edit the value for `subscriptionId` by using the value on the **AKS Overview** page for the AKS cluster.
129129

130130
```azurecli
131131
az login
132132
az account set --subscription "Subscription Name"
133133
curl -sL https://aka.ms/ci-md-onboard-atscale | bash -s subscriptionId
134134
```
135+
135136
The configuration change can take a few seconds to finish. When it's finished, a message like the following one appears and includes the result:
136137

137138
```azurecli
138139
completed role assignments for all AKS clusters in subscription: <subscriptionId>
139140
```
140141

141-
142-
143142
### [PowerShell](#tab/powershell)
144143

145144
#### Update a single cluster
146145

147-
Use the following steps to enable custom metrics for a specific cluster.
146+
To enable custom metrics for a specific cluster:
148147

149148
1. [Download the *mdm_onboarding.ps1* script from GitHub](https://github.com/microsoft/OMS-docker/blob/ci_feature_prod/docs/aks/mdmonboarding/mdm_onboarding.ps1) and save it to a local folder.
150149

151-
2. Run the following command. Edit the values for `subscriptionId`, `resourceGroupName`, and `clusterName` by using the values on the **AKS Overview** page for the AKS cluster.
150+
1. Run the following command. Edit the values for `subscriptionId`, `resourceGroupName`, and `clusterName` by using the values on the **AKS Overview** page for the AKS cluster.
152151

153152
```powershell
154153
.\mdm_onboarding.ps1 subscriptionId <subscriptionId> resourceGroupName <resourceGroupName> clusterName <clusterName>
@@ -160,13 +159,12 @@ Use the following steps to enable custom metrics for a specific cluster.
160159
Successfully added Monitoring Metrics Publisher role assignment to cluster : <clusterName>
161160
```
162161
163-
164162
#### Update all clusters
165163
166-
Use the following steps to enable custom metrics for all clusters in your subscription.
164+
To enable custom metrics for all clusters in your subscription:
167165
168166
1. [Download the *mdm_onboarding_atscale.ps1* script from GitHub](https://github.com/microsoft/OMS-docker/blob/ci_feature_prod/docs/aks/mdmonboarding/mdm_onboarding_atscale.ps1) and save it to a local folder.
169-
2. Run the following command. Edit the value for `subscriptionId` by using the value from the **AKS Overview** page for the AKS cluster.
167+
1. Run the following command. Edit the value for `subscriptionId` by using the value on the **AKS Overview** page for the AKS cluster.
170168
171169
```powershell
172170
.\mdm_onboarding_atscale.ps1 subscriptionId
@@ -180,9 +178,9 @@ Use the following steps to enable custom metrics for all clusters in your subscr
180178
---
181179
182180
## Verify the update
183-
You can verify that custom metrics is enabled by opening [metrics explorer](../essentials/metrics-getting-started.md) and verify from **Metric namespace** that **insights** is listed.
181+
To verify that custom metrics are enabled, open [metrics explorer](../essentials/metrics-getting-started.md) and verify from **Metric namespace** that **insights** is listed.
184182
185183
## Next steps
186184
187-
- [Create alerts based on custom metrics collected for the cluster](container-insights-metric-alerts.md).
185+
- [Create alerts based on custom metrics collected for the cluster](container-insights-metric-alerts.md)
188186
- [Collect Prometheus metrics from your AKS cluster](container-insights-prometheus.md)

0 commit comments

Comments
 (0)