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.

Note

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.

Supported configurations

The following configurations are supported:

The following configurations are not supported:

  • Windows
  • Azure Red Hat OpenShift 4

Prerequisites

Create an extension instance

Onboard from Azure Monitor workspace

  1. Open the Azure Monitor workspaces menu in the Azure portal and select your cluster.

  2. Select Managed Prometheus to display a list of AKS and Arc clusters.

  3. Select Configure for the cluster you want to enable.

A screenshot showing the Managed clusters page for an Azure monitor workspace.

Onboard from Container insights

  1. In the Azure portal, select the Azure Arc-enabled Kubernetes cluster that you wish to monitor.

  2. From the resource pane on the left, select Insights under the Monitoring section.

  3. On the onboarding page, select Configure monitoring.

  4. On the Configure Container insights page, select the Enable Prometheus metrics checkbox.

  5. Select Configure.

A screenshot of the monitoring onboarding page for Azure Arc-enabled kubernetes clusters.

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.

Disconnected clusters

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.

Troubleshooting

For issues with the extension, see the Troubleshooting Guide.

Next Steps