Skip to main content
The cert-manager integration requires CXDOT Collector 1.4.0 or greater. cert-manager manages TLS certificates in Kubernetes. Use the cert-manager integration with the CXDOT Collector to collect certificate lifecycle and controller activity metrics. The cert-manager integration supports cert-manager version 1.21.1 or later.

Supported telemetry types

The cert-manager integration supports these telemetry types:

Prerequisites

Meet these requirements before configuring the integration:
  • Expose each controller’s Prometheus metrics endpoint at /metrics.
  • For controller pods, allow the node Collector to connect to the pods.
  • For Services or static targets, allow the cluster Collector to connect to each target.

Configure

The cert-manager integration is enabled by default. You can configure targets either by annotating controller pods in your Kubernetes cluster or by listing static endpoints in your Helm values. To configure the cert-manager integration, follow these steps:
  1. To collect from cert-manager controller pods in Kubernetes, add a CXDOT integration annotation to the pod template. The annotation key must end with the container name. For example, add the following annotation to your cert-manager controller Deployment:
    The Collector replaces ${target.host} with the pod IP address and ${target.port.http-metrics} with the container port named http-metrics. The Collector also discovers controller pods that carry the app.kubernetes.io/name: cert-manager and app.kubernetes.io/component: controller labels and listen on port 9402. A CXDOT integration annotation takes precedence over the labels for its container. To stop collecting from a container, set cert_manager: {enabled: false} in the annotation. For more information, see autodiscovery.
  2. Optional: To collect from specific cert-manager endpoints, configure static targets by listing their host:port values in endpoints. The instance then scrapes only those targets. For example:
    Each static target resolves to http://<host>:<port>/metrics.
  3. Optional: To combine annotated pods and static targets, configure separate instances. The bare cert_manager key discovers pods, and the named instance scrapes the static targets:

Validate

  1. In the Live Telemetry Analyzer, add the following label filters:
    • Set Label to __name__ and Value to cxdot.integration.target.health.
    • Set Label to cxdot.integration.name and Value to cert_manager.
    Group the results by cxdot.integration.target, and confirm that the metric reports 1 for each target.
  2. In Metrics Explorer, run the following query:
    Confirm that the query returns a time series for each certificate condition.

Disable the cert-manager integration

Deleting every cert_manager block restores the default unnamed instance. To remove custom settings and stop collection, retain a disabled configuration:

Configuration reference

Configure one cert-manager integration instance with the following settings. In Helm values, place these settings under collection.cxdot.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. Default: []. Targets for cert-manager. 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.