You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-monitor/containers/kubernetes-monitoring-enable.md
+18-18Lines changed: 18 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ This article describes how to enable complete monitoring of your Kubernetes clus
19
19
20
20
> [!IMPORTANT]
21
21
> Kubernetes clusters generate a lot of log data, which can result in significant costs if you aren't selective about the logs that you collect. Before you enable monitoring for your cluster, see the following articles to ensure that your environment is optimized for cost and that you limit your log collection to only the data that you require:
22
-
>
22
+
>
23
23
>-[Configure data collection and cost optimization in Container insights using data collection rule](./container-insights-data-collection-dcr.md)<br>Details on customizing log collection once you've enabled monitoring, including using preset cost optimization configurations.
24
24
>-[Best practices for monitoring Kubernetes with Azure Monitor](../best-practices-containers.md)<br>Best practices for monitoring Kubernetes clusters organized by the five pillars of the [Azure Well-Architected Framework](/azure/architecture/framework/), including cost optimization.
25
25
>-[Cost optimization in Azure Monitor](../best-practices-cost.md)<br>Best practices for configuring all features of Azure Monitor to optimize you costs and limit the amount of data that you collect.
@@ -86,10 +86,10 @@ If you don't specify an existing Azure Monitor workspace in the following comman
86
86
87
87
#### Prerequisites
88
88
89
-
- Az CLI version of 2.49.0 or higher is required.
90
-
- The aks-preview extension must be [uninstalled from AKS clusters](/cli/azure/azure-cli-extensions-overview) by using the command `az extension remove --name aks-preview`.
89
+
- Az CLI version of 2.49.0 or higher is required.
90
+
- The aks-preview extension must be [uninstalled from AKS clusters](/cli/azure/azure-cli-extensions-overview) by using the command `az extension remove --name aks-preview`.
91
91
- The k8s-extension extension must be installed using the command `az extension add --name k8s-extension`.
92
-
- The k8s-extension version 1.4.1 or higher is required.
92
+
- The k8s-extension version 1.4.1 or higher is required.
93
93
94
94
#### AKS cluster
95
95
Use the `-enable-azure-monitor-metrics` option `az aks create` or `az aks update` (depending whether you're creating a new cluster or updating an existing cluster) to install the metrics add-on that scrapes Prometheus metrics.
@@ -149,7 +149,7 @@ Both ARM and Bicep templates are provided in this section.
149
149
150
150
> [!NOTE]
151
151
> Currently in Bicep, there's no way to explicitly scope the `Monitoring Reader` role assignment on a string parameter "resource ID" for an Azure Monitor workspace like in an ARM template. Bicep expects a value of type `resource | tenant`. There is also no REST API [spec](https://github.com/Azure/azure-rest-api-specs) for an Azure Monitor workspace.
152
-
>
152
+
>
153
153
> Therefore, the default scoping for the `Monitoring Reader` role is on the resource group. The role is applied on the same Azure Monitor workspace by inheritance, which is the expected behavior. After you deploy this Bicep template, the Grafana instance is given `Monitoring Reader` permissions for all the Azure Monitor workspaces in that resource group.
154
154
155
155
@@ -245,7 +245,7 @@ If the Azure Managed Grafana instance is already linked to an Azure Monitor work
After the policy is assigned to the subscription, whenever you create a new cluster without Prometheus enabled, the policy will run and deploy to enable Prometheus monitoring.
560
+
After the policy is assigned to the subscription, whenever you create a new cluster without Prometheus enabled, the policy will run and deploy to enable Prometheus monitoring.
561
561
562
562
---
563
563
@@ -566,7 +566,7 @@ After the policy is assigned to the subscription, whenever you create a new clus
566
566
567
567
568
568
## Enable full monitoring with Azure portal
569
-
Using the Azure portal, you can enable both Managed Prometheus and Container insights at the same time.
569
+
Using the Azure portal, you can enable both Managed Prometheus and Container insights at the same time.
570
570
571
571
> [!NOTE]
572
572
> If you want to enabled Managed Prometheus without Container insights, then [enable it from the Azure Monitor workspace](./kubernetes-monitoring-enable.md#enable-prometheus-and-grafana) as described below.
@@ -579,7 +579,7 @@ When you create a new AKS cluster in the Azure portal, you can enable Prometheus
579
579
580
580
### Existing cluster (Prometheus and Container insights)
581
581
582
-
This option enables Container insights and optionally Prometheus and Grafana on an existing AKS cluster.
582
+
This option enables Container insights and optionally Prometheus and Grafana on an existing AKS cluster.
583
583
584
584
1. Either select **Insights** from the cluster's menu OR select **Containers** from the **Monitor** menu, **Unmonitored clusters** tab, and click **Enable** next to a cluster.
585
585
1. If Container insights isn't enabled for the cluster, then you're presented with a screen identifying which of the features have been enabled. Click **Configure monitoring**.
@@ -590,7 +590,7 @@ This option enables Container insights and optionally Prometheus and Grafana on
590
590
591
591
:::image type="content" source="media/aks-onboard/monitor-settings-button.png" lightbox="media/aks-onboard/monitor-settings-button.png" alt-text="Screenshot that shows the monitoring settings button for a cluster.":::
592
592
593
-
2. **Container insights** will be enabled. **Select** the checkboxes for **Enable Prometheus metrics** and **Enable Grafana** if you also want to enable them for the cluster. If you have existing Azure Monitor workspace and Grafana workspace, then they're selected for you.
593
+
2. **Container insights** will be enabled. **Select** the checkboxes for **Enable Prometheus metrics** and **Enable Grafana** if you also want to enable them for the cluster. If you have existing Azure Monitor workspace and Grafana workspace, then they're selected for you.
594
594
595
595
:::image type="content" source="media/prometheus-metrics-enable/configure-container-insights.png" lightbox="media/prometheus-metrics-enable/configure-container-insights.png" alt-text="Screenshot that shows the dialog box to configure Container insights with Prometheus and Grafana.":::
596
596
@@ -619,9 +619,9 @@ This option enables Prometheus metrics on a cluster without enabling Container i
619
619
## Enable Windows metrics collection (preview)
620
620
621
621
> [!NOTE]
622
-
> There is no CPU/Memory limit in windows-exporter-daemonset.yaml so it may over-provision the Windows nodes
622
+
> There is no CPU/Memory limit in windows-exporter-daemonset.yaml so it may over-provision the Windows nodes
623
623
> For more details see [Resource reservation](https://kubernetes.io/docs/concepts/configuration/windows-resource-management/#resource-reservation)
624
-
>
624
+
>
625
625
> As you deploy workloads, set resource memory and CPU limits on containers. This also subtracts from NodeAllocatable and helps the cluster-wide scheduler in determining which pods to place on which nodes.
626
626
> Scheduling pods without limits may over-provision the Windows nodes and in extreme cases can cause the nodes to become unhealthy.
627
627
@@ -636,7 +636,7 @@ As of version 6.4.0-main-02-22-2023-3ee44b9e of the Managed Prometheus addon con
636
636
* `memory`
637
637
* `process`
638
638
* `cpu_info`
639
-
639
+
640
640
For more collectors, please see [Prometheus exporter for Windows metrics](https://github.com/prometheus-community/windows_exporter#windows_exporter).
641
641
642
642
Deploy the [windows-exporter-daemonset YAML](https://github.com/prometheus-community/windows_exporter/blob/master/kubernetes/windows-exporter-daemonset.yaml) file:
@@ -783,14 +783,14 @@ When you enable monitoring, the following resources are created in your subscrip
783
783
|`MSCI-<aksclusterregion>-<clustername>`|**Data Collection Rule**| Same as cluster | Same as Log Analytics workspace | This data collection rule is for log collection by Azure Monitor agent, which uses the Log Analytics workspace as destination, and is associated to the AKS cluster resource. |
784
784
|`MSPROM-<aksclusterregion>-<clustername>`|**Data Collection Rule**| Same as cluster | Same as Azure Monitor workspace | This data collection rule is for prometheus metrics collection by metrics addon, which has the chosen Azure monitor workspace as destination, and also it is associated to the AKS cluster resource |
785
785
|`MSPROM-<aksclusterregion>-<clustername>`|**Data Collection endpoint**| Same as cluster | Same as Azure Monitor workspace | This data collection endpoint is used by the above data collection rule for ingesting Prometheus metrics from the metrics addon|
786
-
786
+
787
787
When you create a new Azure Monitor workspace, the following additional resources are created as part of it
788
788
789
789
| Resource Name | Resource Type | Resource Group | Region/Location | Description |
790
790
|:---|:---|:---|:---|:---|
791
791
|`<azuremonitor-workspace-name>`|**Data Collection Rule**| MA_\<azuremonitor-workspace-name>_\<azuremonitor-workspace-region>_managed | Same as Azure Monitor Workspace | DCR created when you use OSS Prometheus server to Remote Write to Azure Monitor Workspace. |
792
792
|`<azuremonitor-workspace-name>`|**Data Collection Endpoint**| MA_\<azuremonitor-workspace-name>_\<azuremonitor-workspace-region>_managed | Same as Azure Monitor Workspace | DCE created when you use OSS Prometheus server to Remote Write to Azure Monitor Workspace.|
0 commit comments