> For the complete documentation index, see [llms.txt](https://docs.groundcover.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.groundcover.com/collect-data/data-sources/argocd.md).

# ArgoCD

Collect metrics from your ArgoCD components

groundcover collects the native Prometheus metrics that ArgoCD components expose, so you can visualize your continuous-delivery health and set up monitors.

ArgoCD metrics are collected in-cluster by groundcover's Kubernetes metrics scraping. There is no exporter to run: you point groundcover at the ArgoCD component pods, either with Prometheus annotations or with ServiceMonitors.

{% hint style="info" %}
This page covers monitoring ArgoCD itself. To install groundcover using ArgoCD, see [Argo CD](https://docs.groundcover.com/collect-data/customize-deployment/argo-cd.md).
{% endhint %}

### How ArgoCD exposes metrics

ArgoCD is multi-component, and each long-running component exposes its own Prometheus `/metrics` endpoint on a distinct port:

| Component                 | Pod metrics port | Metrics Service (plain manifests)         | Metrics Service (Helm chart)               |
| ------------------------- | ---------------- | ----------------------------------------- | ------------------------------------------ |
| Application controller    | 8082             | `argocd-metrics`                          | `argocd-application-controller-metrics`    |
| API server                | 8083             | `argocd-server-metrics`                   | `argocd-server-metrics`                    |
| Repo server               | 8084             | `argocd-repo-server`                      | `argocd-repo-server-metrics`               |
| ApplicationSet controller | 8080             | `argocd-applicationset-controller`        | `argocd-applicationset-controller-metrics` |
| Notifications controller  | 9001             | `argocd-notifications-controller-metrics` | `argocd-notifications-controller-metrics`  |
| Commit server (optional)  | 8087             | `argocd-commit-server`                    | `argocd-commit-server-metrics`             |
| Dex (optional)            | 5558             | `argocd-dex-server`                       | `argocd-dex-server`                        |

The Helm chart names assume the release is called `argocd`, and the chart only creates a component's metrics Service when `<component>.metrics.enabled: true` is set.

These are the component **metrics** endpoints, not the `argocd-server` API. They serve plain `http` inside the cluster and need no credentials. The commit server only runs when the Source Hydrator is enabled. See ArgoCD's [metrics documentation](https://argo-cd.readthedocs.io/en/stable/operator-manual/metrics/) for details.

{% hint style="warning" %}
**Scrape pods, not Service addresses.** A Service address load-balances each request to a single pod. When the application controller is sharded across replicas, or the repo server and API server run multiple replicas, scraping a Service returns a different replica's metrics on every scrape. Both methods below discover and scrape every pod.
{% endhint %}

### Option 1: Prometheus annotations on the ArgoCD pods

groundcover automatically discovers and scrapes pods carrying the standard Prometheus annotations. See [Scraping Pods using Prometheus Annotations](https://docs.groundcover.com/collect-data/data-sources/prometheus/scrape-using-sensor.md#scraping-pods-using-prometheus-annotations) for how annotation scraping is enabled.

If you install ArgoCD with the [argo-cd Helm chart](https://github.com/argoproj/argo-helm/tree/main/charts/argo-cd), add the annotations to each component's pods in your values:

```yaml
controller:
  podAnnotations:
    prometheus.io/scrape: "true"
    prometheus.io/port: "8082"
server:
  podAnnotations:
    prometheus.io/scrape: "true"
    prometheus.io/port: "8083"
repoServer:
  podAnnotations:
    prometheus.io/scrape: "true"
    prometheus.io/port: "8084"
applicationSet:
  podAnnotations:
    prometheus.io/scrape: "true"
    prometheus.io/port: "8080"
notifications:
  podAnnotations:
    prometheus.io/scrape: "true"
    prometheus.io/port: "9001"
# Only if you run the Source Hydrator (commitServer.enabled: true)
commitServer:
  podAnnotations:
    prometheus.io/scrape: "true"
    prometheus.io/port: "8087"
# Only if Dex is enabled
dex:
  podAnnotations:
    prometheus.io/scrape: "true"
    prometheus.io/port: "5558"
```

If you install ArgoCD from the plain manifests, add the same annotations to each component's pod template (`spec.template.metadata.annotations`), for example with a Kustomize patch.

### Option 2: ServiceMonitors

If you run the VictoriaMetrics Operator with groundcover's built-in vmagent, groundcover scrapes any `ServiceMonitor` in the cluster. See [Scraping Prometheus CRDs](https://docs.groundcover.com/collect-data/data-sources/prometheus/scrape-using-sensor.md#scraping-prometheus-crds) to enable it.

With the argo-cd Helm chart, enable the metrics Service and ServiceMonitor for each component:

```yaml
controller:
  metrics:
    enabled: true
    serviceMonitor:
      enabled: true
server:
  metrics:
    enabled: true
    serviceMonitor:
      enabled: true
repoServer:
  metrics:
    enabled: true
    serviceMonitor:
      enabled: true
applicationSet:
  metrics:
    enabled: true
    serviceMonitor:
      enabled: true
notifications:
  metrics:
    enabled: true
    serviceMonitor:
      enabled: true
# Only if Dex is enabled
dex:
  metrics:
    enabled: true
    serviceMonitor:
      enabled: true
```

The chart has no ServiceMonitor for the commit server. If you run the Source Hydrator, scrape the commit server with Option 1 or create its `ServiceMonitor` yourself.

If you install from the plain manifests, use the `ServiceMonitor` examples in ArgoCD's [Prometheus Operator documentation](https://argo-cd.readthedocs.io/en/stable/operator-manual/metrics/#prometheus-operator), which also cover the commit server and Dex.

{% hint style="info" %}
If ArgoCD manages the ServiceMonitors themselves, set `prometheus_converter_add_argocd_ignore_annotations: true` on the operator to prevent sync conflicts. See [ArgoCD Integration](https://docs.groundcover.com/collect-data/data-sources/prometheus/scrape-using-sensor.md#argocd-integration).
{% endhint %}

{% hint style="warning" %}
Use one method per component. Annotating a pod **and** creating a ServiceMonitor for it collects every series twice.
{% endhint %}

### Optional: enable additional ArgoCD metrics

Some ArgoCD metrics are disabled by default. Enable them in ArgoCD before expecting them in groundcover:

| Metric                                                                | How to enable                                                                                                                                  |
| --------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| `argocd_app_labels`                                                   | `controller.metrics.application.labels: "<label1>,<label2>"` in the `argocd-cmd-params-cm` ConfigMap                                           |
| `argocd_app_condition`                                                | `controller.metrics.application.conditions: "<Condition1>,<Condition2>"` in `argocd-cmd-params-cm`                                             |
| `argocd_cluster_labels`                                               | `controller.metrics.cluster.labels: "<label1>,<label2>"` in `argocd-cmd-params-cm`                                                             |
| `argocd_appset_labels`                                                | `--metrics-applicationset-labels` flag on the ApplicationSet controller (Helm: `applicationSet.extraArgs`)                                     |
| `argocd_github_api_*`                                                 | `applicationsetcontroller.enable.github.api.metrics: "true"` in `argocd-cmd-params-cm`                                                         |
| `argocd_appset_progressive_sync_*`, `argocd_appset_app_refresh_total` | `applicationsetcontroller.enable.progressive.syncs: "true"` in `argocd-cmd-params-cm`, plus an ApplicationSet using the `RollingSync` strategy |
| `grpc_server_handling_seconds` (API server and repo server)           | `ARGOCD_ENABLE_GRPC_TIME_HISTOGRAM=true` environment variable                                                                                  |

With the argo-cd Helm chart, set `argocd-cmd-params-cm` keys under `configs.params` in your values:

```yaml
configs:
  params:
    controller.metrics.application.labels: "team,env"
```

{% hint style="info" %}
Every distinct label value creates a new series. Expose only low-cardinality labels. If you create and delete many Applications, set `controller.metrics.cache.expiration` (for example `24h0m0s`) in `argocd-cmd-params-cm` so series for deleted Applications are dropped.
{% endhint %}

## Common Questions

### Where can I find scraped metrics?

All metrics in the platform can be found in the metrics exploration page: <https://app.groundcover.com/explore/data-explorer>.

Metric names are kept as ArgoCD exposes them. For the full list of metrics groundcover collects from ArgoCD, what each means, and the labels you can slice by, see [ArgoCD Metrics](https://docs.groundcover.com/collect-data/data-sources/argocd/argocd-metrics.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.groundcover.com/collect-data/data-sources/argocd.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
