Skip to content

Commit 24b712d

Browse files
authored
Merge pull request #256961 from v-jbasden/v-jbasden-move-container-insights-faqs
Moving applicable Container insights FAQs from azure-monitor/faq.yml to an .md file and deleting the rest
2 parents 88bc5fb + 93bd8ec commit 24b712d

8 files changed

+137
-175
lines changed

articles/azure-monitor/containers/container-insights-agent-config.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ ConfigMap is a global list and there can be only one ConfigMap applied to the ag
5050

5151
| Key | Data type | Value | Description |
5252
|--|--|--|--|
53-
| `[agent_settings.proxy_config] ignore_proxy_settings =` | Boolean | True or false | Set this value to true to ignore proxy settings. On both AKS & Arc K8s environments, if your cluster is configured with forward proxy, then proxy settings are automatically applied and used for the agent. For certain configurations, such as, with AMPLS + Proxy, you may with for the proxy config to be ignored. . By default, this setting is set to `false`. |
53+
| `[agent_settings.proxy_config] ignore_proxy_settings =` | Boolean | True or false | Set this value to true to ignore proxy settings. On both AKS & Arc K8s environments, if your cluster is configured with forward proxy, then proxy settings are automatically applied and used for the agent. For certain configurations, such as, with AMPLS + Proxy, you might with for the proxy config to be ignored. . By default, this setting is set to `false`. |
5454

5555
## Configure and deploy ConfigMaps
5656

@@ -121,6 +121,16 @@ Output similar to the following example appears with the annotation schema-versi
121121
schema-versions=v1
122122
```
123123
124+
## Frequently asked questions
125+
126+
This section provides answers to common questions.
127+
128+
### How do I enable log collection for containers in the kube-system namespace through Helm?
129+
130+
The log collection from containers in the kube-system namespace is disabled by default. You can enable log collection by setting an environment variable on Azure Monitor Agent. See the [Container insights](https://aka.ms/azuremonitor-containers-helm-chart) GitHub page.
131+
132+
133+
124134
## Next steps
125135
126136
- Container insights doesn't include a predefined set of alerts. Review the [Create performance alerts with Container insights](./container-insights-log-alerts.md) to learn how to create recommended alerts for high CPU and memory utilization to support your DevOps or operational processes and procedures.

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,11 @@ The icons in the status field indicate the online statuses of pods, as described
277277

278278
Azure Network Policy Manager includes informative Prometheus metrics that you can use to monitor and better understand your network configurations. It provides built-in visualizations in either the Azure portal or Grafana Labs. For more information, see [Monitor and visualize network configurations with Azure npm](../../virtual-network/kubernetes-network-policies.md#monitor-and-visualize-network-configurations-with-azure-npm).
279279

280+
## Frequently asked questions
281+
282+
This section provides answers to common questions.
283+
284+
[!INCLUDE [container-insights-faq-what-does-other-processes-represent](../includes/container-insights-faq-what-does-other-processes-represent.md)]
280285

281286
## Next steps
282287

articles/azure-monitor/containers/container-insights-livedata-overview.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,12 @@ Suspend or pause autoscroll for only a short period of time while you're trouble
120120
>[!IMPORTANT]
121121
>No data is stored permanently during the operation of this feature. All information captured during the session is deleted when you close your browser or navigate away from it. Data only remains present for visualization inside the five-minute window of the metrics feature. Any metrics older than five minutes are also deleted. The Live Data buffer queries within reasonable memory usage limits.
122122
123+
## Frequently asked questions
124+
125+
This section provides answers to common questions.
126+
127+
[!INCLUDE [container-insights-faq-what-does-other-processes-represent](../includes/container-insights-faq-what-does-other-processes-represent.md)]
128+
123129
## Next steps
124130

125131
- To continue learning how to use Azure Monitor and monitor other aspects of your AKS cluster, see [View Azure Kubernetes Service health](container-insights-analyze.md).

articles/azure-monitor/containers/container-insights-log-query.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ ContainerInventory
4545

4646
### Kubernetes events
4747

48+
> [!NOTE]
49+
> By default, Normal event types aren't collected, so you won't see them when you query the KubeEvents table unless the *collect_all_kube_events* ConfigMap setting is enabled. If you need to collect Normal events, enable *collect_all_kube_events setting* in the *container-azm-ms-agentconfig* ConfigMap. See [Configure agent data collection for Container insights](./container-insights-agent-config.md) for information on how to configure the ConfigMap.
50+
51+
4852
``` kusto
4953
KubeEvents
5054
| where not(isempty(Namespace))
@@ -686,6 +690,19 @@ The output shows results similar to the following example:
686690

687691
:::image type="content" source="./media/container-insights-log-query/log-query-example-kubeagent-events.png" alt-text="Screenshot that shows log query results of informational events from an agent." lightbox="media/container-insights-log-query/log-query-example-kubeagent-events.png":::
688692

693+
## Frequently asked questions
694+
695+
This section provides answers to common questions.
696+
697+
### Can I view metrics collected in Grafana?
698+
699+
Container insights support viewing metrics stored in your Log Analytics workspace in Grafana dashboards. We've provided a template that you can download from the Grafana [dashboard repository](https://grafana.com/grafana/dashboards?dataSource=grafana-azure-monitor-datasource&category=docker). Use it to get started and as a reference to help you learn how to query data from your monitored clusters to visualize in custom Grafana dashboards.
700+
701+
### Why are log lines larger than 16 KB split into multiple records in Log Analytics?
702+
703+
The agent uses the [Docker JSON file logging driver](https://docs.docker.com/config/containers/logging/json-file/) to capture the stdout and stderr of containers. This logging driver splits log lines [larger than 16 KB](https://github.com/moby/moby/pull/22982) into multiple lines when they're copied from stdout or stderr to a file.
704+
705+
689706
## Next steps
690707

691708
Container insights doesn't include a predefined set of alerts. To learn how to create recommended alerts for high CPU and memory utilization to support your DevOps or operational processes and procedures, see [Create performance alerts with Container insights](./container-insights-log-alerts.md).

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,17 @@ Container insights supports clusters running the Linux and Windows Server 2019 o
5454
>[!NOTE]
5555
> Container insights support for Windows Server 2022 operating system is in public preview.
5656
57+
## Frequently asked questions
5758

59+
This section provides answers to common questions.
60+
61+
### Is there support for collecting Kubernetes audit logs for ARO clusters?
62+
63+
No. Container insights don't support collection of Kubernetes audit logs.
64+
65+
### Does Container Insights support pod sandboxing?
66+
67+
Yes, Container Insights supports pod sandboxing through support for Kata Containers. For more details on pod sandboxing in AKS, [refer to the AKS docs](/azure/aks/use-pod-sandboxing).
5868

5969
## Next steps
6070

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

Lines changed: 60 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ The following table summarizes known errors you might encounter when you use Con
2020
| Error message "No data for selected filters" | It might take some time to establish monitoring data flow for newly created clusters. Allow at least 10 to 15 minutes for data to appear for your cluster.<br><br>If data still doesn't show up, check if the Log Analytics workspace is configured for `disableLocalAuth = true`. If yes, update back to `disableLocalAuth = false`.<br><br>`az resource show --ids "/subscriptions/[Your subscription ID]/resourcegroups/[Your resource group]/providers/microsoft.operationalinsights/workspaces/[Your workspace name]"`<br><br>`az resource update --ids "/subscriptions/[Your subscription ID]/resourcegroups/[Your resource group]/providers/microsoft.operationalinsights/workspaces/[Your workspace name]" --api-version "2021-06-01" --set properties.features.disableLocalAuth=False` |
2121
| Error message "Error retrieving data" | While an AKS cluster is setting up for health and performance monitoring, a connection is established between the cluster and a Log Analytics workspace. A Log Analytics workspace is used to store all monitoring data for your cluster. This error might occur when your Log Analytics workspace has been deleted. Check if the workspace was deleted. If it was, reenable monitoring of your cluster with Container insights. Then specify an existing workspace or create a new one. To reenable, [disable](container-insights-optout.md) monitoring for the cluster and [enable](container-insights-enable-new-cluster.md) Container insights again. |
2222
| "Error retrieving data" after adding Container insights through `az aks cli` | When you enable monitoring by using `az aks cli`, Container insights might not be properly deployed. Check whether the solution is deployed. To verify, go to your Log Analytics workspace and see if the solution is available by selecting **Legacy solutions** from the pane on the left side. To resolve this issue, redeploy the solution. Follow the instructions in [Enable Container insights](container-insights-onboard.md). |
23+
| Error message "Missing Subscription registration" | If you receive the error "Missing Subscription registration for Microsoft.OperationsManagement," you can resolve it by registering the resource provider **Microsoft.OperationsManagement** in the subscription where the workspace is defined. For the steps, see [Resolve errors for resource provider registration](../../azure-resource-manager/templates/error-register-resource-provider.md). |
24+
| Error message "The reply url specified in the request doesn't match the reply urls configured for the application: '<application ID\>'." | You might see this error message when you enable live logs. For the solution, see [View container data in real time with Container insights](./container-insights-livedata-setup.md#configure-azure-ad-integrated-authentication). |
2325

2426
To help diagnose the problem, we've provided a [troubleshooting script](https://github.com/microsoft/Docker-Provider/tree/ci_prod/scripts/troubleshoot).
2527

@@ -181,8 +183,65 @@ The solution to this issue is to clean up the existing resources of the Containe
181183
If the preceding steps didn't resolve the installation of Azure Monitor Containers Extension issues, create a support ticket to send to Microsoft for further investigation.
182184
183185
## Duplicate alerts being received
184-
You may have enabled Prometheus alert rules without disabling Container insights recommended alerts. See [Migrate from Container insights recommended alerts to Prometheus recommended alert rules (preview)](container-insights-metric-alerts.md#migrate-from-metric-rules-to-prometheus-rules-preview).
186+
You might have enabled Prometheus alert rules without disabling Container insights recommended alerts. See [Migrate from Container insights recommended alerts to Prometheus recommended alert rules (preview)](container-insights-metric-alerts.md#migrate-from-metric-rules-to-prometheus-rules-preview).
185187
188+
## I see info banner "You do not have the right cluster permissions which will restrict your access to Container Insights features. Please reach out to your cluster admin to get the right permission"
189+
190+
Container Insights has historically allowed users to access the Azure portal experience based on the access permission of the Log Analytics workspace. It now checks cluster-level permission to provide access to the Azure portal experience. You might need your cluster admin to assign this permission.
191+
192+
For basic read-only cluster level access, assign the **Monitoring Reader** role for the following types of clusters.
193+
194+
- AKS without Kubernetes role-based access control (RBAC) authorization enabled
195+
- AKS enabled with Microsoft Entra SAML-based single sign-on
196+
- AKS enabled with Kubernetes RBAC authorization
197+
- AKS configured with the cluster role binding clusterMonitoringUser
198+
- [Azure Arc-enabled Kubernetes clusters](../../azure-arc/kubernetes/overview.md)
199+
200+
See [Assign role permissions to a user or group](../../aks/control-kubeconfig-access.md#assign-role-permissions-to-a-user-or-group) for details on how to assign these roles for AKS and [Access and identity options for Azure Kubernetes Service (AKS)](../../aks/concepts-identity.md) to learn more about role assignments.
201+
202+
## I don't see Image and Name property values populated when I query the ContainerLog table
203+
204+
For agent version ciprod12042019 and later, by default these two properties aren't populated for every log line to minimize cost incurred on log data collected. There are two options to query the table that include these properties with their values:
205+
206+
### Option 1
207+
208+
Join other tables to include these property values in the results.
209+
210+
Modify your queries to include `Image` and `ImageTag` properties from the `ContainerInventory` table by joining on `ContainerID` property. You can include the `Name` property (as it previously appeared in the `ContainerLog` table) from the `KubepodInventory` table's `ContainerName` field by joining on the `ContainerID` property. We recommend this option.
211+
212+
The following example is a sample detailed query that explains how to get these field values with joins.
213+
214+
```
215+
//Let's say we're querying an hour's worth of logs
216+
let startTime = ago(1h);
217+
let endTime = now();
218+
//Below gets the latest Image & ImageTag for every containerID, during the time window
219+
let ContainerInv = ContainerInventory | where TimeGenerated >= startTime and TimeGenerated < endTime | summarize arg_max(TimeGenerated, *) by ContainerID, Image, ImageTag | project-away TimeGenerated | project ContainerID1=ContainerID, Image1=Image ,ImageTag1=ImageTag;
220+
//Below gets the latest Name for every containerID, during the time window
221+
let KubePodInv = KubePodInventory | where ContainerID != "" | where TimeGenerated >= startTime | where TimeGenerated < endTime | summarize arg_max(TimeGenerated, *) by ContainerID2 = ContainerID, Name1=ContainerName | project ContainerID2 , Name1;
222+
//Now join the above 2 to get a 'jointed table' that has name, image & imagetag. Outer left is safer in case there are no kubepod records or if they're latent
223+
let ContainerData = ContainerInv | join kind=leftouter (KubePodInv) on $left.ContainerID1 == $right.ContainerID2;
224+
//Now join ContainerLog table with the 'jointed table' above and project-away redundant fields/columns and rename columns that were rewritten
225+
//Outer left is safer so you don't lose logs even if we can't find container metadata for loglines (due to latency, time skew between data types, etc.)
226+
ContainerLog
227+
| where TimeGenerated >= startTime and TimeGenerated < endTime
228+
| join kind= leftouter (
229+
ContainerData
230+
) on $left.ContainerID == $right.ContainerID2 | project-away ContainerID1, ContainerID2, Name, Image, ImageTag | project-rename Name = Name1, Image=Image1, ImageTag=ImageTag1
231+
```
232+
233+
### Option 2
234+
235+
Reenable collection for these properties for every container log line.
236+
237+
If the first option isn't convenient because of query changes involved, you can reenable collecting these fields. Enable the setting `log_collection_settings.enrich_container_logs` in the agent config map as described in the [data collection configuration settings](./container-insights-agent-config.md).
238+
239+
> [!NOTE]
240+
> We don't recommend the second option for large clusters that have more than 50 nodes. It generates API server calls from every node in the cluster to perform this enrichment. This option also increases data size for every log line collected.
241+
242+
## I can't upgrade a cluster after onboarding
243+
244+
Here's the scenario: You enabled Container insights for an Azure Kubernetes Service cluster. Then you deleted the Log Analytics workspace where the cluster was sending its data. Now when you attempt to upgrade the cluster, it fails. To work around this issue, you must disable monitoring and then reenable it by referencing a different valid workspace in your subscription. When you try to perform the cluster upgrade again, it should process and complete successfully.
186245
187246
## Next steps
188247

0 commit comments

Comments
 (0)