Monitor and log data
> Applies to: AKS on Azure Stack HCI 22H2, AKS on Windows Server, Azure Stack HCI, version 23H2, AKS enabled by Azure Arc on VMware (preview)
This article describes how to monitor your AKS enabled by Azure Arc deployment using on-premises monitoring. Two types of monitoring and logging solutions are available, as described in the following table:
Solution | Azure connectivity | Support and service | Cost |
---|---|---|---|
Container Insights | Requires connecting the Kubernetes cluster to Azure using Azure Arc for Kubernetes. | Full support and servicing from Microsoft. | Requires signing up for the Azure Monitor service. |
On-premises monitoring | Doesn't require Azure connectivity. | Supported as open-source software by Microsoft (with no support agreement or SLAs), the community, and/or external vendors. | Vendor-dependent. |
You can choose Container Insights or on-premises monitoring, depending on your monitoring use cases. For Container Insights, see Enable Container Insights.
Monitoring solution overview
Prometheus is a monitoring and alerting toolkit you can use for monitoring containerized workloads. As part of the Prometheus solution in AKS enabled by Arc, the following components are deployed and automatically configured:
The deployment is based on the publicly available Kube-Prometheus-stack helm chart, which is extended to support the Windows exporter and secures metrics scraping between Prometheus and agents. Once you deploy the Prometheus solution, the node exporter runs on each Linux node, and the Windows exporter runs on each Windows node.
Note
Since the Prometheus operator, Prometheus, and Kube state metrics components are only supported on Linux, you must provision at least one Linux node in your Kuberneted cluster to deploy this solution.
The objects and endpoints that the Prometheus solution scrapes include the following items:
- Kube state metrics to collect various metrics provided by Kubernetes
- Kubernetes API server
- Kubelet
- Node exporter to collect metrics for Linux nodes
- Windows exporter to collect metrics for Windows nodes
Deploy monitoring solution
Prometheus is an open-source monitoring system with a dimensional data model, flexible query language, efficient time series database and modern alerting approach. Grafana is a tool used to view, query, and visualize metrics on the Grafana dashboards. It can be configured to use Prometheus as the data source. Usually, they are used together for Kubernetes cluster monitoring.
To view the Grafana dashboards available in AKS enabled by Arc, see Grafana dashboards available in AKS.
You can view Microsoft's deployment guidance on GitHub to deploy Prometheus on your Kubernetes cluster and configure Grafana to use Prometheus as data source. You can also follow any publicly available documentation to deploy any specific version of Prometheus or Grafana.