---
title: fluxcd
description: Fluxcd integration with openmetric v2
breadcrumbs: Docs > Integrations > fluxcd
---

# fluxcd
Supported OS Integration version3.3.0
## Overview{% #overview %}

This check monitors [Flux](https://fluxcd.io/) through the Datadog Agent. Flux is a set of continuous and progressive delivery solutions for Kubernetes that is open and extensible.

**Minimum Agent version:** 7.49.1

## Setup{% #setup %}

Follow the instructions below to install and configure this check for an Agent running on a host. For containerized environments, see the [Autodiscovery Integration Templates](https://docs.datadoghq.com/agent/kubernetes/integrations/) for guidance on applying these instructions.

### Installation{% #installation %}

Starting from Agent release 7.51.0, the Fluxcd check is included in the [Datadog Agent](https://app.datadoghq.com/account/settings/agent/latest) package. No additional installation is needed on your server.

For older versions of the Agent, [use these steps to install](https://docs.datadoghq.com/agent/guide/use-community-integrations/?tab=agentv721v621#installation) the integration.

### Configuration{% #configuration %}

This integration supports collecting metrics and logs from the following Flux services:

- `helm-controller`
- `kustomize-controller`
- `notification-controller`
- `source-controller`

You can pick and choose which services you monitor depending on your needs.

#### Metric collection{% #metric-collection %}

This is an example configuration with Kubernetes annotations on your Flux pods. See the [sample configuration file](https://github.com/DataDog/integrations-core/blob/7.51.x/fluxcd/datadog_checks/fluxcd/data/conf.yaml.example) for all available configuration options.

```yaml
apiVersion: v1
kind: Pod
metadata:
  name: '<POD_NAME>'
  annotations:
    ad.datadoghq.com/manager.checks: |-
      {
        "fluxcd": {
          "instances": [
            {
              "openmetrics_endpoint": "http://%%host%%:8080/metrics"
            }
          ]
        }
      }
    # (...)
spec:
  containers:
    - name: 'manager'
# (...)
```

#### Log collection{% #log-collection %}

*Available for Agent versions >6.0*

Flux logs can be collected from the different Flux pods through Kubernetes. Collecting logs is disabled by default in the Datadog Agent. To enable it, see [Kubernetes Log Collection](https://docs.datadoghq.com/agent/kubernetes/log/).

See the [Autodiscovery Integration Templates](https://docs.datadoghq.com/agent/kubernetes/integrations/) for guidance on applying the parameters below.

| Parameter      | Value                                               |
| -------------- | --------------------------------------------------- |
| `<LOG_CONFIG>` | `{"source": "fluxcd", "service": "<SERVICE_NAME>"}` |

### Validation{% #validation %}

[Run the Agent's status subcommand](https://docs.datadoghq.com/agent/guide/agent-commands/#agent-status-and-information) and look for `fluxcd` under the Checks section.

## Data Collected{% #data-collected %}

### Metrics{% #metrics %}

|  |
|  |
| **fluxcd.controller.runtime.active.workers**(gauge)                | Number of currently used workers per controller.*Shown as worker*                                                                                                                                                                                               |
| **fluxcd.controller.runtime.max.concurrent.reconciles**(gauge)     | Maximum number of concurrent reconciles per controller.                                                                                                                                                                                                         |
| **fluxcd.controller.runtime.reconcile.count**(count)               | Total number of reconciliations per controller.                                                                                                                                                                                                                 |
| **fluxcd.controller.runtime.reconcile.errors.count**(count)        | Total number of reconciliation errors per controller.*Shown as error*                                                                                                                                                                                           |
| **fluxcd.controller.runtime.reconcile.time.seconds.bucket**(count) | Bucket of length of time per reconciliation per controller.                                                                                                                                                                                                     |
| **fluxcd.controller.runtime.reconcile.time.seconds.count**(count)  | Count of length of time per reconciliation per controller.                                                                                                                                                                                                      |
| **fluxcd.controller.runtime.reconcile.time.seconds.sum**(count)    | Sum of length of time per reconciliation per controller.*Shown as second*                                                                                                                                                                                       |
| **fluxcd.gotk.reconcile.condition**(gauge)                         | The current condition status of a GitOps Toolkit resource reconciliation [Deprecated since 2.1.0].                                                                                                                                                              |
| **fluxcd.gotk.reconcile.duration.seconds.bucket**(count)           | Bucket of the duration in seconds of a GitOps Toolkit resource reconciliation.                                                                                                                                                                                  |
| **fluxcd.gotk.reconcile.duration.seconds.count**(count)            | Count of the duration in seconds of a GitOps Toolkit resource reconciliation.                                                                                                                                                                                   |
| **fluxcd.gotk.reconcile.duration.seconds.sum**(count)              | Sum of the duration in seconds of a GitOps Toolkit resource reconciliation.*Shown as second*                                                                                                                                                                    |
| **fluxcd.gotk.suspend.status**(gauge)                              | The current suspend status of a GitOps Toolkit resource [Deprecated since 2.1.0].                                                                                                                                                                               |
| **fluxcd.leader\_election\_master\_status**(gauge)                 | Gauge of if the reporting system is master of the relevant lease, 0 indicates backup, 1 indicates master. 'name' is the string used to identify the lease. Make sure to group by name.                                                                          |
| **fluxcd.process.cpu\_seconds.count**(count)                       | Total user and system CPU time spent in seconds.*Shown as second*                                                                                                                                                                                               |
| **fluxcd.process.max\_fds**(gauge)                                 | Maximum number of open file descriptors.                                                                                                                                                                                                                        |
| **fluxcd.process.open\_fds**(gauge)                                | Number of open file descriptors.                                                                                                                                                                                                                                |
| **fluxcd.process.resident\_memory**(gauge)                         | Resident memory size in bytes.*Shown as byte*                                                                                                                                                                                                                   |
| **fluxcd.process.start\_time**(gauge)                              | Start time of the process since unix epoch in seconds.*Shown as second*                                                                                                                                                                                         |
| **fluxcd.process.virtual\_memory**(gauge)                          | Virtual memory size in bytes.*Shown as byte*                                                                                                                                                                                                                    |
| **fluxcd.process.virtual\_memory.max**(gauge)                      | Maximum amount of virtual memory available in bytes.*Shown as byte*                                                                                                                                                                                             |
| **fluxcd.rest\_client\_requests.count**(count)                     | Number of HTTP requests, partitioned by status code, method, and host.*Shown as request*                                                                                                                                                                        |
| **fluxcd.workqueue.adds.count**(count)                             | Total number of adds handled by a workqueue.                                                                                                                                                                                                                    |
| **fluxcd.workqueue.depth**(gauge)                                  | Current depth of a workqueue.                                                                                                                                                                                                                                   |
| **fluxcd.workqueue.longest\_running\_processor**(gauge)            | The number of seconds that has the longest running processor for a workqueue that has been running.*Shown as second*                                                                                                                                            |
| **fluxcd.workqueue.retries.count**(count)                          | Total number of retries handled by workqueue.                                                                                                                                                                                                                   |
| **fluxcd.workqueue.unfinished\_work**(gauge)                       | The number of seconds of work that has been done that is in progress and hasn't been observed by work_duration. Large values indicate stuck threads. One can deduce the number of stuck threads by observing the rate at which this increases.*Shown as second* |

### Events{% #events %}

The fluxcd integration does not include any events.

### Service Checks{% #service-checks %}

**fluxcd.openmetrics.health**

Returns `CRITICAL` if the check cannot access the OpenMetrics metrics endpoint of Fluxcd.

*Statuses: ok, critical*

## Troubleshooting{% #troubleshooting %}

Need help? Contact [Datadog support](https://docs.datadoghq.com/help/).

## Further Reading{% #further-reading %}

- [Integration roundup: Monitoring your container-native technologies](https://www.datadoghq.com/blog/container-native-integrations/#cicd-with-flux)
