Collect Prometheus metrics from an Arc-enabled Kubernetes cluster (preview)
This article describes how to configure your Azure Arc-enabled Kubernetes cluster (preview) to send data to Azure Monitor managed service for Prometheus. When you configure your Azure Arc-enabled Kubernetes cluster to send data to Azure Monitor managed service for Prometheus, a containerized version of the Azure Monitor agent is installed with a metrics extension. You then specify the Azure Monitor workspace where the data should be sent.
The process described here doesn't enable Container insights on the cluster even though the Azure Monitor agent installed in this process is the same agent used by Container insights. For different methods to enable Container insights on your cluster, see Enable Container insights. For details on adding Prometheus collection to a cluster that already has Container insights enabled, see Collect Prometheus metrics with Container insights.
The following configurations are supported:
- Azure Monitor Managed Prometheus supports monitoring Azure Arc-enabled Kubernetes. For more information, see Azure Monitor managed service for Prometheus.
- CRI compatible container runtimes such CRI-O
The following configurations are not supported:
- Azure Red Hat OpenShift 4
Prerequisites listed in Deploy and manage Azure Arc-enabled Kubernetes cluster extensions
An Azure Monitor workspace. To create new workspace, see Manage an Azure Monitor workspace .
The cluster must use managed identity authentication.
The following resource providers must be registered in the subscription of the Arc-enabled Kubernetes cluster and the Azure Monitor workspace:
The following endpoints must be enabled for outbound access in addition to the Azure Arc-enabled Kubernetes network requirements:
Azure public cloud
Endpoint Port *.ods.opinsights.azure.com 443 *.oms.opinsights.azure.com 443 dc.services.visualstudio.com 443 *.monitoring.azure.com 443 login.microsoftonline.com 443 global.handler.control.monitor.azure.com 443 <cluster-region-name>.handler.control.monitor.azure.com 443
Create an extension instance
Onboard from Azure Monitor workspace
Open the Azure Monitor workspaces menu in the Azure portal and select your cluster.
Select Managed Prometheus to display a list of AKS and Arc clusters.
Select Configure for the cluster you want to enable.
Onboard from Container insights
In the Azure portal, select the Azure Arc-enabled Kubernetes cluster that you wish to monitor.
From the resource pane on the left, select Insights under the Monitoring section.
On the onboarding page, select Configure monitoring.
On the Configure Container insights page, select the Enable Prometheus metrics checkbox.
Delete the extension instance
To delete the extension instance, use the following CLI command:
az k8s-extension delete --name azuremonitor-metrics -g <cluster_resource_group> -c<cluster_name> -t connectedClusters
The command only deletes the extension instance. The Azure Monitor workspace and its data are not deleted.
If your cluster is disconnected from Azure for more than 48 hours, Azure Resource Graph won't have information about your cluster. As a result, your Azure Monitor Workspace may have incorrect information about your cluster state.
For issues with the extension, see the Troubleshooting Guide.
- Default Prometheus metrics configuration in Azure Monitor
- Customize scraping of Prometheus metrics in Azure Monitor
- Use Azure Monitor managed service for Prometheus as data source for Grafana using managed system identity
- Configure self-managed Grafana to use Azure Monitor managed service for Prometheus with Microsoft Entra ID