# Argo CD Monitoring and Metrics: Complete Configuration Guide for Prometheus

> Configure Argo CD monitoring and metrics with Prometheus. Learn to track application health, sync performance, and controller resource usage with this complete guide.

- Repository: [Argo Project/argo-cd](https://github.com/argoproj/argo-cd)
- Tags: how-to-guide
- Published: 2026-07-15

---

**Argo CD exposes Prometheus-compatible metrics on dedicated ports for every core component, allowing operators to monitor application health, sync performance, and controller resource usage using standard observability stacks.**

The **argoproj/argo-cd** repository ships a comprehensive monitoring stack that enables **Argo CD monitoring and metrics** collection via HTTP endpoints on each pod. These metrics provide real-time visibility into GitOps operations—from application synchronization latency to Kubernetes API request counts—enabling teams to build dashboards and alerts for their continuous delivery pipelines.

## Metric Architecture and Component Endpoints

Each Argo CD component exposes metrics on a specific port and path that Prometheus can scrape:

| Component | Default Port | Scrape Path |
|-----------|-------------|-------------|
| **argocd-server** | `8083` | `/metrics` |
| **argocd-repo-server** | `8084` | `/metrics` |
| **argocd-application-controller** | `8082` | `/metrics` |
| **argocd-applicationset-controller** | `8080` | `/metrics` |
| **argocd-notifications-controller** | `9001` | `/metrics` |

These endpoints are defined in the server command documentation and can be customized using the `--metrics-address` and `--metrics-port` flags.

## Core Metric Definitions in Source Code

The metric implementations are defined in specific Go source files within the repository, organized by component responsibility.

### Application Controller Metrics

In [`controller/metrics/metrics.go`](https://github.com/argoproj/argo-cd/blob/main/controller/metrics/metrics.go), the **argocd-application-controller** defines several metric families:

- **`argocd_app_info`** – Gauge providing static metadata including project, repo URL, health status, and sync status
- **`argocd_app_sync_total`** – Counter tracking sync attempts labeled by outcome phase
- **`argocd_app_reconcile`** – Histogram measuring reconciliation loop duration in seconds
- **`argocd_app_labels`** – Gauge exposing Application labels (disabled by default to control cardinality)
- **`argocd_app_condition`** – Gauge exposing conditions such as `OrphanedResourceWarning` and `ExcludedResourceWarning`

### Transport Wrapper Metrics

The [`controller/metrics/transportwrapper.go`](https://github.com/argoproj/argo-cd/blob/main/controller/metrics/transportwrapper.go) file adds the **`argocd_app_k8s_request_total`** counter, which tracks every Kubernetes API call made by the controller, providing visibility into API server load generated by Argo CD.

### ApplicationSet Controller Metrics

Located in [`applicationset/metrics/metrics.go`](https://github.com/argoproj/argo-cd/blob/main/applicationset/metrics/metrics.go), this controller exposes `argocd_appset_info`, `argocd_appset_labels`, and `argocd_appset_reconcile` metrics for monitoring ApplicationSet generation and reconciliation performance.

## Enabling Optional High-Cardinality Metrics

By default, label-based and condition-based metrics are **disabled** to prevent metric cardinality explosion. Enable them via the **argocd-cmd-params-cm** ConfigMap or command-line flags.

### ConfigMap Configuration

Update the `argocd-cmd-params-cm` ConfigMap in the `argocd` namespace:

```yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: argocd-cmd-params-cm
  namespace: argocd
data:
  controller.metrics.application.labels: "team-name,business-unit"
  controller.metrics.application.conditions: "OrphanedResourceWarning,ExcludedResourceWarning"
  controller.metrics.cluster.labels: "team-name,environment"

```

After updating the ConfigMap, restart the controller to apply changes:

```bash
kubectl rollout restart deployment/argocd-application-controller -n argocd

```

### Command-Line Flags

Alternatively, pass flags directly to the controller binary defined in [`cmd/argocd-application-controller/commands/argocd_application_controller.go`](https://github.com/argoproj/argo-cd/blob/main/cmd/argocd-application-controller/commands/argocd_application_controller.go):

```bash
argocd-application-controller \
  --metrics-application-labels team-name,business-unit \
  --metrics-application-conditions OrphanedResourceWarning,ExcludedResourceWarning \
  --metrics-cluster-labels team-name,environment

```

For the ApplicationSet controller ([`cmd/argocd-applicationset-controller/commands/applicationset_controller.go`](https://github.com/argoproj/argo-cd/blob/main/cmd/argocd-applicationset-controller/commands/applicationset_controller.go)), use the analogous `--metrics-applicationset-labels` flag.

## Scraping Metrics with Prometheus

### Standard Prometheus Scrape Configuration

Configure your Prometheus instance to automatically discover Argo CD pods:

```yaml
scrape_configs:
  - job_name: "argocd"
    kubernetes_sd_configs:
      - role: pod
    relabel_configs:
      - source_labels: [__meta_kubernetes_pod_label_app_kubernetes_io/name]
        action: keep
        regex: argocd-.*
      - source_labels: [__meta_kubernetes_container_port_name]
        action: keep
        regex: metrics

```

### ServiceMonitor for Prometheus Operator

If using the Prometheus Operator, apply a ServiceMonitor resource:

```yaml
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  name: argocd-app-controller
  labels:
    release: prometheus
spec:
  selector:
    matchLabels:
      app.kubernetes.io/name: argocd-application-controller
  endpoints:
    - port: metrics
      interval: 30s

```

### Querying Metrics with PromQL

Example query to calculate sync attempts per application over the last hour:

```promql
sum by (name, namespace) (increase(argocd_app_sync_total[1h]))

```

## Managing Metric Cardinality and Cache

High cardinality can cause memory exhaustion in both Argo CD and Prometheus. Control this using label whitelists and cache expiration settings.

### Label Whitelists

Only expose specific labels using the comma-separated configuration values shown in the previous section. Never expose unbounded value labels like timestamps or unique IDs.

### Cache Expiration

Set the `ARGOCD_METRICS_CACHE_EXPIRATION` environment variable on the controller deployment to automatically drop stale series from memory. A typical value ranges from 12 to 24 hours:

```bash
kubectl -n argocd set env deployment/argocd-application-controller ARGOCD_METRICS_CACHE_EXPIRATION=12h0m0s

```

## Legacy Metrics

Prior to Argo CD v1.5, the controller exported a different set of metrics using the legacy format. Enable these using the `ARGOCD_LEGACY_CONTROLLER_METRICS` environment variable only when migrating old dashboards. New installations should use the current metric families, as detailed in [`docs/operator-manual/upgrading/2.14-3.0.md`](https://github.com/argoproj/argo-cd/blob/main/docs/operator-manual/upgrading/2.14-3.0.md).

## Summary

- **Five core components** expose Prometheus-compatible metrics on ports 8080-8084 and 9001, each serving the `/metrics` endpoint
- **Source code locations**: [`controller/metrics/metrics.go`](https://github.com/argoproj/argo-cd/blob/main/controller/metrics/metrics.go) and [`applicationset/metrics/metrics.go`](https://github.com/argoproj/argo-cd/blob/main/applicationset/metrics/metrics.go) define the primary metric families, while [`controller/metrics/transportwrapper.go`](https://github.com/argoproj/argo-cd/blob/main/controller/metrics/transportwrapper.go) tracks Kubernetes API calls
- **Optional metrics** for Application and Cluster labels are disabled by default; enable via `argocd-cmd-params-cm` or CLI flags like `--metrics-application-labels`
- **Cardinality protection**: Use label whitelists and set `ARGOCD_METRICS_CACHE_EXPIRATION` to prevent memory exhaustion
- **Scraping**: Use standard Prometheus Kubernetes service discovery or ServiceMonitor resources for the Prometheus Operator

## Frequently Asked Questions

### How do I access Argo CD metrics endpoints?

Each component exposes metrics on a dedicated TCP port. The application-controller serves metrics at `http://<pod-ip>:8082/metrics`, while the repo-server uses port 8084 and the notifications-controller uses port 9001. Configure Prometheus to scrape these endpoints using Kubernetes service discovery to automatically find pods by their labels.

### Which metrics indicate application sync performance issues?

Monitor the **`argocd_app_sync_total`** counter to track sync attempt frequencies and the **`argocd_app_reconcile`** histogram to measure reconciliation latency. Combine these with **`argocd_app_info`** gauge labels showing health and sync status to identify applications experiencing degraded performance.

### Can I filter which Application labels appear in Prometheus to reduce noise?

Yes. By default, no labels are exposed to prevent cardinality explosion. Enable specific labels by setting `controller.metrics.application.labels` in the `argocd-cmd-params-cm` ConfigMap or using the `--metrics-application-labels` flag when starting the controller, providing only the comma-separated list of label keys you need.

### What is the recommended cache expiration for production metrics?

Set `ARGOCD_METRICS_CACHE_EXPIRATION` to a duration between 12 and 24 hours for most production environments. This environment variable on the controller deployment causes stale metric series to be automatically dropped from memory, preventing unbounded growth while maintaining sufficient historical visibility for alerting and dashboards.