Use this file to discover all available pages before exploring further.
In this lesson, you will learn how to utilize Prometheus and Grafana to visualize ArgoCD metrics. ArgoCD exposes a variety of Prometheus metrics across its different components—including the application controller, API server, repository server, and applicationset controller. This guide walks you through inspecting these metrics within your cluster, setting up Prometheus and Grafana using Helm, configuring ServiceMonitor resources to scrape ArgoCD metrics, and visualizing the collected data.
ArgoCD’s documentation provides detailed descriptions of the metrics exposed by its components. For instance, the following image illustrates the metrics for the ArgoCD application controller, including names, types, and descriptions:
Similarly, the API server provides its own set of metric endpoints:
To inspect all ArgoCD services in your cluster, run the following command to list the services in the ArgoCD namespace:
To visualize ArgoCD metrics, you must deploy a Prometheus server. The Kube Prometheus Stack available on Artifact Hub provides Prometheus, Grafana, Alertmanager, and other essential custom resource definitions.
Create a new namespace for monitoring (e.g., monitoring) and install the Prometheus stack. Depending on your requirements, you can choose between different chart versions. Here are two examples:Using a recent version (e.g., 40.1.2):
The installation process creates multiple resources (services, pods, daemonsets, statefulsets, etc.). To view the Prometheus service (set as NodePort), run:
kubectl -n monitoring get svc
You can then access the Prometheus UI by navigating to the node’s IP with the assigned NodePort (e.g., 31534). In the Prometheus interface, go to “Status” → “Targets” to see the list of scraped endpoints.
Filtering the target list for ArgoCD-related endpoints should display the newly added targets:
To allow Prometheus to scrape ArgoCD metrics, create ServiceMonitor resources in the ArgoCD namespace. These YAML manifests specify the services to be monitored and must include a label that matches the Prometheus operator’s selector (in this case, the release name “my-kube-prometheus-stack”).Below is an example configuration with three ServiceMonitors—for general metrics, server metrics, and repository server metrics. Similar manifests can be created for monitoring the applicationset controller.
NAME AGEargocd-applicationset-controller-metrics 11sargocd-metrics 11sargocd-repo-server-metrics 11sargocd-server-metrics 11s
Ensure that the metadata label “release” in each ServiceMonitor exactly matches the Helm release name used during the Prometheus stack installation (e.g., “my-kube-prometheus-stack”). You can confirm the Prometheus operator’s selector labels by running:
After the ServiceMonitors are active, Prometheus automatically adds ArgoCD targets. In the Prometheus UI, search for “argocd” (for example, using a query like argocd_app_info) to display detailed metrics and statuses for your applications.
Grafana offers rich visual dashboards to analyze these metrics. The recommended ArgoCD Grafana dashboard displays application health, sync status, component statistics, and more.For reference, the image below shows a portion of the ArgoCD Grafana dashboard:
Identify the Grafana Service:
Locate the Grafana service in the monitoring namespace. By default, it is a ClusterIP service; modify it to a NodePort for external access if needed. Use the following command to edit the service:
Import the ArgoCD Dashboard:
Click on the “+” icon in Grafana and select “Import.” You can import the ArgoCD dashboard using its ID or by supplying a JSON file. For example, import directly from this link: ArgoCD Grafana Dashboard
After importing, you will see a comprehensive dashboard that displays metrics such as application status, sync performance, and overall health.
This Grafana dashboard provides actionable insights for both operations and development teams by summarizing the health, performance, and synchronization status of your ArgoCD-managed applications.
In this lesson, we have shown you how to expose ArgoCD metrics using Prometheus and visualize these metrics with Grafana. By deploying the Kube Prometheus Stack and integrating ServiceMonitor resources, you can achieve real-time monitoring of your ArgoCD environment, ensuring optimized application delivery and system performance.Thank you for reading, and happy monitoring!