Skip to content

Commit 6060c44

Browse files
committed
Container insights high scale mode
1 parent 762fe29 commit 6060c44

File tree

1 file changed

+107
-0
lines changed

1 file changed

+107
-0
lines changed
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
##---
2+
title: High scale logs collection in Container Insights (Preview)
3+
description: Enable high scale logs collection in Container Insights (Preview).
4+
ms.custom: devx-track-azurecli
5+
ms.date: 08/06/2024
6+
---
7+
8+
# High scale logs collection in Container Insights (Preview)
9+
High scale logs mode is a feature in Container Insights enables you to collect container console (stdout & stderr) logs with high throughput from their AKS cluster nodes. This feature is intended for Azure Kubernetes Service clusters sending more than 5,000 logs/sec per node.
10+
11+
## Overview
12+
When high scale mode is enabled, Container Insights performs multiple configuration changes resulting in a higher overall throughput. This includes using and upgraded agent and Azure Monitor pipeline with scale improvements. These changes are all made by Azure Monitor and don't require input or configuration after the feature has been enabled.
13+
14+
High scale logs collection is suited for environments sending more than 5,000 logs/sec from a single node in their Kubernetes clusters and has been designed and tested for sending up to 50K log/sec per node. High scale mode impacts only the data collection layer. The rest of the Container insights experience remains the same, with logs being ingested into same `ContainerLogV2` table. Queries and alerts continue to work since the same data is being collected.
15+
16+
To achieve the maximum supported logs throughput, you should use high-end VM SKUs with 16 CPU cores or more for your AKS cluster nodes. Using low end VM SKUs will impact your logs throughput.
17+
18+
## Does my cluster qualify?
19+
Use the following [log queries](../logs/log-query-overview.md) to determine whether your cluster is suitable for high scale logs collection.
20+
21+
**Logs per second and per node**
22+
23+
``kql
24+
ContainerLogV2
25+
| where _ResourceId = “<AzureResourceIdoftheAKSCluster>”
26+
| summarize count() by bin(TimeGenerated, 1s), Computer
27+
| render timechart
28+
```
29+
30+
**Log size (in MB) per second per node**
31+
32+
```kusto
33+
ContainerLogV2
34+
| where _ResourceId = “<AzureResourceIdoftheAKSCluster>”
35+
| summarize BillableDataMB = sum(_BilledSize)/1024/1024 by bin(TimeGenerated, 1s), Computer
36+
| render timechart
37+
```
38+
39+
## Prerequisites
40+
41+
- Azure CLI version 2.63.0 or higher.
42+
- AKS-preview CLI extension version must be 7.0.0b4 or higher if an aks-preview CLI extension is installed.
43+
- Cluster schema must be [configured for ContainerLogV2](./container-insights-logs-schema.md#enable-the-containerlogv2-schema).
44+
- See [Network firewall requirements for monitoring Kubernetes cluster](./kubernetes-monitoring-firewall.md).
45+
46+
## Limitations
47+
48+
The following scenarios are not supported during the Preview release. These will be addressed when the feature becomes generally available.
49+
50+
- AKS Clusters with ARM64 nodes
51+
- Azure Arc-enabled Kubernetes
52+
- HTTP proxy with trusted certificate
53+
- Onboarding through Azure Portal, Azure Policy, Terraform and Bicep
54+
- Configuring through **Monitor Settings** from AKS Insights
55+
- Automatic migration from existing Container Insights
56+
57+
## Enabling high scale logs collection
58+
Use the following steps to enable high scale logs collection for your cluster.
59+
60+
### Update configmap
61+
The first step is to update configmap for the cluster to instruct the container insights ama-logs deamonset pods to run in high log scale mode.
62+
63+
Follow the guidance in [Configure and deploy ConfigMap](./container-insights-data-collection-configmap.md#configure-and-deploy-configmap) to download and update ConfigMap for the cluster. The only different you need to make for high scale logs is to add the following entry under `agent-settings`:
64+
65+
```yml
66+
[agent_settings.high_log_scale]
67+
enabled = true
68+
```
69+
70+
After applying this configmap, `ama-logs-*` pods will get restarted automatically and configure the ama-logs daemonset pods to run in high scale log mode.
71+
72+
### Enable high scale log mode for Monitoring add-on
73+
Once the ama-logs pods are running in high log scale mode, you can enable the Monitoring Add-on with high scale log mode. You have the option to perform this configuration using either Azure CLI or an ARM Template.
74+
75+
### [CLI](#tab/cli)
76+
Use the following Azure CLI commands to enable high scale logs mode for the Monitoring add-on depending on your AKS configuration.
77+
78+
#### Existing AKS cluster
79+
80+
```azurecli
81+
az aks enable-addons -a monitoring -g <resource-group-name> -n <cluster-name> --enable-high-log-scale-mode
82+
```
83+
84+
#### Existing AKS Private cluster
85+
86+
```azurecli
87+
az aks enable-addons -a monitoring -g <resource-group-name> -n <cluster-name> --enable-high-scale-mode --ampls-resource-id /subscriptions/<subscription-id>/resourceGroups/<resource-group-name>/providers/microsoft.insights/privatelinkscopes/<resourceName>
88+
```
89+
90+
#### New AKS cluster
91+
92+
```azurecli
93+
az aks create -g <cluster-name> -n <cluster-name> enable-addons -a monitoring --enable-high-log-scale-mode
94+
```
95+
96+
#### New AKS Private cluster
97+
See [Create a private Azure Kubernetes Service (AKS) cluster](/azure/aks/private-clusters?tabs=azure-portal) for details on creating an AKS Private cluster. Use the following additional parameters to configure high log scale mode with Azure Monitor Private Link Scope Resource ID.
98+
99+
- `--enable-high-scale-mode`
100+
- `--ampls-resource-id`
101+
102+
### [ARM](#tab/arm)
103+
See [Enable Container insights](./kubernetes-monitoring-enable.md?tabs=arm#enable-container-insights) for guidance on enabling Container Insights using an ARM template.
104+
105+
## Next steps
106+
107+

0 commit comments

Comments
 (0)