Skip to content

Commit ad5c8ef

Browse files
authored
Update container-insights-logging-v2.md
1 parent 2a93e94 commit ad5c8ef

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

articles/azure-monitor/containers/container-insights-logging-v2.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,15 @@ The new fields are:
3737
> [Export](../logs/logs-data-export.md) to Event Hub and Storage Account is not supported if the incoming LogMessage is not a valid JSON. For best performance, we recommend emitting container logs in JSON format.
3838
3939
## Enable the ContainerLogV2 schema
40-
Customers can enable the ContainerLogV2 schema at the cluster level through either the cluster's Data Collection Rule or ConfigMap. To enable the ContainerLogV2 schema, configure the cluster's ConfigMap. Learn more about ConfigMap in [Kubernetes documentation](https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/) and in [Azure Monitor documentation](./container-insights-agent-config.md#configmap-file-settings-overview).
40+
Customers can enable the ContainerLogV2 schema at the cluster level through either the cluster's Data Collection Rule (DCR) or ConfigMap. To enable the ContainerLogV2 schema, configure the cluster's ConfigMap. Learn more about ConfigMap in [Kubernetes documentation](https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/) and in [Azure Monitor documentation](./container-insights-agent-config.md#configmap-file-settings-overview).
4141
Follow the instructions to configure an existing ConfigMap or to use a new one.
4242

43-
### Configure via an existing Data Collection Rule
43+
>[!NOTE]
44+
> Because ContainerLogV2 can be enabled through either the DCR and ConfigMap, the ContainerLogV2 setting of the ConfigMap will take precedence. Stdout and stderr logs will only be ingested to the ContainerLog table when both the DCR and ConfigMap are set to off.
45+
46+
### Configure via an existing Data Collection Rule (DCR)
47+
48+
## [Azure portal](#tab/configure-portal)
4449

4550
1. In the Insights section of your Kubernetes cluster, select the **Monitoring Settings** button from the top toolbar
4651

@@ -58,7 +63,10 @@ Follow the instructions to configure an existing ConfigMap or to use a new one.
5863

5964
![Screenshot that shows ContainerLogV2 enabled.](./media/container-insights-logging-v2/container-insights-v2-monitoring-settings-configured.png)
6065

66+
## [CLI](#tab/configure-CLI)
6167

68+
1. For configuring via CLI, use the corresponding [config file](./container-insights-cost-config.md#configuring-aks-data-collection-settings-using-azure-cli), update the `enableContainerLogV2` field in the config file to be true.
69+
6270
### Configure an existing ConfigMap
6371
This applies to the scenario where you have already enabled container insights for your AKS cluster and have [configured agent data collection settings](./container-insights-agent-config.md#configure-and-deploy-configmaps) using ConfigMap "_container-azm-ms-agentconfig.yaml_". If this ConfigMap doesn't yet have the `log_collection_settings.schema` field, you'll need to append the following section in this existing ConfigMap .yaml file:
6472

0 commit comments

Comments
 (0)