> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chronosphere.io/llms.txt
> Use this file to discover all available pages before exploring further.

# cert-manager

> Certificate lifecycle and expiry metrics from cert-manager, scraped from its controller's Prometheus endpoint.

The cert-manager integration requires CXDOT Collector 1.4.0 or greater.

[cert-manager](https://cert-manager.io/) manages TLS certificates in Kubernetes. Use
the cert-manager integration with the Chronosphere XDOT Collector to collect certificate and
controller metrics from cert-manager controllers running in your environment.

The cert-manager integration supports cert-manager 1.21.1 or greater.

## Supported telemetry types

The cert-manager integration supports these telemetry types:

| Type    | Supported |
| ------- | --------- |
| Logs    | No        |
| Metrics | Yes       |
| Traces  | No        |
| Events  | No        |

## Prerequisites

The cert-manager integration has the following prerequisites:

* Enable the cert-manager Prometheus metrics endpoint.
* Make the `/metrics` endpoint on port `9402` reachable from the collector.

## Configure

To configure the cert-manager integration, follow these steps:

1. For controller pods that listen on port `9402`, use the
   `app.kubernetes.io/name: cert-manager` and
   `app.kubernetes.io/component: controller` labels on the pod template. For instances
   that require a different metrics URL, provide the URL through autodiscovery
   annotations.

   For more information, see
   [autodiscovery](https://docs.chronosphere.io/ingest/cxdot-collector/autodiscovery).

2. Optional: Configure static targets for managed clusters or custom installations
   that the labels don't identify. For example, add the following to the `values.yaml`
   for your Chronosphere XDOT Helm chart:

   ```yaml theme={null}
   config:
     integrations:
       cert_manager:
         endpoints:
           - endpoint: 10.0.0.5:9402
   ```

### Validate

To validate the cert-manager integration, follow these steps:

1. In the Live Telemetry Analyzer, filter for
   `cxdot.integration.name=cert_manager`. Confirm that the cert-manager metric names
   appear.

2. In Metrics Explorer, run the following query:

   ```text theme={null}
   max by ("certmanager.name", "k8s.namespace.name", "certmanager.condition") ({"certmanager.certificate.ready"})
   ```

   Confirm that the query returns the expected time series for each certificate.

For more information about diagnosing a failing integration, see
[Troubleshooting](https://docs.chronosphere.io/ingest/cxdot-collector/troubleshooting).

## Configuration reference

Configure one cert-manager integration instance with the following settings. In Helm values,
place these settings under `config.integrations.cert_manager`. In a Collector configuration
file, place them under `cxdot.integrations.cert_manager`.

### Optional settings

* **`enabled`**
  Type: `boolean`. Optional. Default: `true`.
  Whether to enable this cert-manager integration instance. If true, the Collector runs the
  instance. If false, the Collector doesn't run it.

* **`endpoints`**
  Type: `array of object`. Optional.
  Static cert-manager targets. A nonempty list disables automatic discovery for this integration
  instance, and the Collector collects metrics from only the listed targets. Specify each target
  as `host:port`. The Collector requests `http://<host>:<port>/metrics`.

* **`endpoints[].endpoint`**
  Type: `string`. Required.
  cert-manager target in `host:port` format.

* **`collection_interval`**
  Type: `duration`. Optional. Default: `60s`.
  How often the Collector collects metrics from each cert-manager target.

* **`timeout`**
  Type: `duration`. Optional. Default: `60s`.
  Maximum time allowed to collect metrics from one cert-manager target. The value must not
  exceed `collection_interval`.


## Related topics

- [Apache Spark](/ingest/xcor/integrations/collector/spark.md)
- [Differences between the Prometheus Operator and Chronosphere Collector](/ingest/metrics-traces/collector/mappings/prometheus/operator-collector.md)
- [ClickHouse](/ingest/xcor/integrations/collector/clickhouse.md)
- [MySQL](/ingest/xcor/integrations/collector/mysql.md)
- [HTTP Check](/ingest/xcor/integrations/collector/http_check.md)
