Skip to content

Commit 3ae14b8

Browse files
authored
Merge pull request #265251 from austonli/patch-42
V2 docs updates
2 parents 8c7c6d4 + 74c8710 commit 3ae14b8

12 files changed

+201
-7
lines changed

articles/azure-monitor/containers/container-insights-cost.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ If the majority of your data comes from one of these following tables:
7171

7272
You can adjust your ingestion using the [cost optimization settings](../containers/container-insights-cost-config.md) and/or migrating to the [Prometheus metrics addon](container-insights-prometheus.md)
7373

74-
Otherwise, the majority of your data belongs to the ContainerLog table. and you can follow the steps below to reduce your ContainerLog costs.
74+
Otherwise, the majority of your data belongs to the ContainerLog table and you can follow the steps below to reduce your ContainerLog costs.
7575

7676
### Reducing your ContainerLog costs
7777

@@ -122,7 +122,7 @@ After you apply one or more of these changes to your ConfigMaps, apply it to you
122122
123123
You can save on data ingestion costs on ContainerLog in your Log Analytics workspace that you primarily use for debugging, troubleshooting, and auditing as Basic Logs. For more information, including the limitations of Basic Logs, see [Configure Basic Logs in Azure Monitor](../logs/basic-logs-configure.md). ContainerLogV2 is the configured version of Basic Logs that Container Insights uses. ContainerLogV2 includes verbose text-based log records.
124124
125-
You must be on the ContainerLogV2 schema to configure Basic Logs. For more information, see [Enable the ContainerLogV2 schema (preview)](container-insights-logs-schema.md).
125+
You must be on the ContainerLogV2 schema to configure Basic Logs. For more information, see [Enable the ContainerLogV2 schema](container-insights-logs-schema.md).
126126
127127
### Prometheus metrics scraping
128128
Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
---
2+
title: Switch to use Container Insights with managed Prometheus | Microsoft Docs
3+
description: This article describes how you can replace your Container Insights visualizations to use Prometheus metrics.
4+
ms.topic: conceptual
5+
ms.date: 05/15/2024
6+
ms.reviewer: aul
7+
---
8+
9+
# Switch to using managed Prometheus visualizations for Container Insights (preview)
10+
11+
Container Insights currently uses data from Log Analytics to power the visualizations in the Azure portal. However, with the release of managed Prometheus, this new format of metrics collection is cheaper and more efficient. Container Insights now offers the ability to visualize using only managed Prometheus data. This article helps you with the setup to start using managed Prometheus as your primary Container Insights visualization tool.
12+
13+
> [!Note]
14+
> This feature is currently in public preview. For additional information, please read the [Supplemental Terms of Use for Microsoft Azure Previews](https://azure.microsoft.com/support/legal/preview-supplemental-terms).
15+
16+
## Prerequisites
17+
18+
To view your Container Insights data using Prometheus, ensure the following steps are complete.
19+
20+
* Azure Kubernetes Service (AKS) [configured with managed Prometheus](./kubernetes-monitoring-enable.md#existing-cluster-prometheus-only)
21+
* User has `Reader` permission or higher on the associated [Azure Monitor workspace](../essentials/azure-monitor-workspace-overview.md)
22+
* Ad block is disabled or set to allow `monitor.azure.com` traffic
23+
* For Windows clusters, [enable Windows metric collection](./kubernetes-monitoring-enable.md#enable-windows-metrics-collection-preview)
24+
25+
## Accessing Prometheus based Container Insights
26+
27+
Because Azure Monitor supports various levels of customization, your cluster may currently have logs based Container Insights, managed Prometheus, or some other combination.
28+
29+
> [!Note]
30+
> Managed Prometheus visualizations for Container Insights use recording rules to improve chart performance, learn more about [what rules are configured](./prometheus-metrics-scrape-default.md#prometheus-visualization-recording-rules).
31+
32+
### [No Prometheus or logs based Container Insights enabled](#tab/unmonitored)
33+
34+
1. Open the Azure portal and navigate to your desired AKS cluster.
35+
36+
2. Choose the `Insights` menu item from the menu, displaying a splash screen indicating no monitoring enabled.
37+
38+
![Screenshot of unmonitoring cluster.](media/container-insights-experience-v2/splash-screen-nothing-enabled.png)
39+
40+
3. Select the `Configure monitoring` button to open up the monitoring configuration blade.
41+
42+
4. Underneath the advanced settings blade, choose `Logs and events` from the Cost presets dropdown.
43+
44+
5. To finish the setup, click the `Configure` button.
45+
46+
6. Once the onboarding deployment completes, you should be able to see the Insights experience using Prometheus as the data source, indicated by the toolbar dropdown showing `Managed Prometheus visualizations (Preview)`.
47+
48+
![Screenshot of AKS cluster with Prometheus based Container Insights.](media/container-insights-experience-v2/container-insights-prom-full.png)
49+
50+
### [Logs based Container Insights enabled](#tab/LA)
51+
52+
1. Open the Azure portal and navigate to your desired AKS cluster.
53+
54+
2. Choose the `Insights` menu item from the menu, which displays a banner at the top to configure managed Prometheus.
55+
56+
3. Using the banner, select the `Configure` button to complete onboarding to managed Prometheus or deploy the requisite recording rules.
57+
58+
![Screenshot of AKS cluster with Prometheus banner.](media/container-insights-experience-v2/container-insights-logs-prom-banner.png)
59+
60+
If the banner was previously dismissed, you can instead use the dropdown in the toolbar that says `Log Analytics visualizations (Classic)`, and select the `Managed Prometheus visualizations (Preview)` option, which opens up a pop-up to complete onboarding.
61+
62+
![Screenshot of AKS cluster with toggle dropdown.](media/container-insights-experience-v2/container-insights-logs-dropdown.png)
63+
64+
4. Once the monitoring deployment is complete, the Insights blade should switch to using Prometheus as the data source, indicated by the toolbar dropdown showing `Managed Prometheus visualizations (Preview)`.
65+
66+
![Screenshot of AKS cluster with Prometheus based Container Insights.](media/container-insights-experience-v2/container-insights-prom-full.png)
67+
68+
69+
### [Prometheus enabled and logs based Container Insights not enabled or with custom settings applied](#tab/Prom)
70+
71+
1. Open the Azure portal and navigate to your desired AKS cluster.
72+
73+
2. Choose the `Insights` menu item from the menu, which displays a banner for enabling Prometheus recording rules.
74+
75+
![Screenshot of AKS cluster with Prometheus based Container Insights.](media/container-insights-experience-v2/container-insights-splash-screen-prom-only.png)
76+
77+
3. Click `Enable` to deploy the recording rules.
78+
79+
4. Once the monitoring deployment is complete, the Insights blade should switch to using Prometheus as the data source, indicated by the toolbar dropdown showing `Managed Prometheus visualizations (Preview)`.
80+
81+
> [!Note]
82+
> Some charts will only have partial data for the default time range until sufficient time has elapsed for the recording rules to collect data.
83+
84+
![Screenshot of AKS cluster with Prometheus based Container Insights, with recording rule banner.](media/container-insights-experience-v2/container-insights-prom-recording-rules-loading.png)
85+
86+
---
87+
88+
## Optional steps
89+
90+
While the above steps are sufficient, for the full visualization experience, a few optional steps can be completed.
91+
92+
### Node and Pod labels collection
93+
94+
By default the labels for nodes and pods aren't available, but can be collected through re-enabling the addon. Node labels are required for filtering data by node pools.
95+
96+
1. If the managed Prometheus addon is currently deployed, we must first disable it
97+
98+
```azurecli
99+
az aks update --disable-azure-monitor-metrics -n <clusterName> -g <resourceGroup>
100+
```
101+
102+
2. Then, re-enable the addon with the flag `--ksm-metric-labels-allow-list`
103+
104+
```azurecli
105+
az aks update -n <clusterName> -g <resourceGroup> --enable-azure-monitor-metrics --ksm-metric-labels-allow-list "nodes=[*], pods=[*]" --azure-monitor-workspace-resource-id <amw-id
106+
```
107+
108+
### Disable Log Analytics data collection
109+
110+
If you're currently using the logs based Container Insights experience, then you can choose to stop ingesting metrics to Log Analytics to save on billing. Once you confirm the Prometheus backed Container Insights experience is sufficient for your purposes, complete the steps to stop metrics ingestion to Log Analytics.
111+
112+
1. Navigate to the monitoring settings for your clusters by following the instructions on how to configure your [Container Insights data collection rule](./container-insights-data-collection-dcr.md#configure-data-collection)
113+
114+
2. From the Cost presets dropdown, select "Logs and Events" and save to configure.
115+
116+
> [!Note]
117+
> Disabling the Log Analytics metrics also disables the visualization dropdown in the toolbar. Revert to using one of the standard cost presets in the `Monitoring Settings` blade to re-enable the Log Analytics visualizations.
118+
119+
## Known limitations and issues
120+
121+
As this feature is currently in preview, there are several, known limitations, the following features aren't supported
122+
123+
* Environment variable details
124+
* Filtering data by individual services
125+
* Live data viewing on the Cluster tab
126+
* Workbooks reports data
127+
* Node memory working set and RSS metrics
128+
* Partial or no data available in the multi-cluster view based on Container Insights DCR settings
129+
130+
## Troubleshooting
131+
132+
When using the Prometheus based Container Insights experience, you may encounter the following errors.
133+
134+
### The charts are stuck in a loading state
135+
136+
This issue occurs if the network traffic for the Azure Monitor workspace is blocked. The root cause of this is typically related to network policies, such as ad blocking software. To resolve this issue, disable the ad block or allowlist `monitor.azure.com` traffic and reload the page.
137+
138+
### Unable to access Data Collection Rule
139+
140+
This error occurs when the user doesn't have permissions to view the associated Prometheus data collection rule for the cluster or the data collection rule may have been deleted. To resolve this error, grant access to the Prometheus data collection rule or reconfigure managed Prometheus using the `Monitoring Settings` button in the toolbar.
141+
142+
### Unable to access Azure Monitor workspace
143+
144+
This error occurs when the user doesn't have permissions to view the associated Azure Monitor workspace for the cluster or the Azure Monitor workspace may have been deleted. To resolve this error, grant access to the Azure Monitor workspace or reconfigure managed Prometheus by deleting and [redeploying the addon](./kubernetes-monitoring-enable.md#enable-prometheus-and-grafana).
145+
146+
### The data could not be retrieved
147+
148+
This error typically occurs when querying large volumes of data and may be resolved by reducing the time range to a shorter window or filtering for fewer objects.
149+
150+
### Data configuration error
151+
152+
This error occurs when the recording rules may have been modified or deleted. Use the `Reconfigure` button to patch the recording rules and try again.
153+
154+
### Access denied
155+
156+
This occurs when the user's portal token expires or doesn't have permissions to view the associated Azure Monitor workspace for the cluster. This can typically be resolved by refreshing the browser session or logging in again.
157+
158+
### An unknown error occurred
159+
160+
If this error message persists, then contact support to open up a ticket.
227 KB
Loading
220 KB
Loading
211 KB
Loading
217 KB
Loading
Loading
Loading
Loading
386 KB
Loading

0 commit comments

Comments
 (0)