---
title: FoundationDB
description: FoundationDB integration
breadcrumbs: Docs > Integrations > FoundationDB
---

# FoundationDB
Supported OS Integration version3.6.0
## Overview{% #overview %}

This check monitors [FoundationDB](https://www.foundationdb.org/) through the Datadog Agent. Aside from checking that the FoundationDB cluster is healthy, it also collects numerous metrics and, optionally, FoundationDB transaction logs.

**Minimum Agent version:** 7.35.0

## Setup{% #setup %}

Both the check and metrics apply to the FoundationDB cluster as a whole, and should only be installed on one host. The host doesn't need to be one that is running FoundationDB, but just one with access to it.

### Installation{% #installation %}

The FoundationDB check is included in the [Datadog Agent](https://app.datadoghq.com/account/settings/agent/latest) package, but requires the [FoundationDB client](https://apple.github.io/foundationdb/downloads.html) to be installed.

### Configuration{% #configuration %}

#### Prepare FoundationDB{% #prepare-foundationdb %}

As a best practice, Datadog recommends using a read-only user to monitor your FoundationDB cluster. This limits the access granted to the Datadog Agent.

{% tab title="Host" %}
#### Host{% #host %}

To configure this check for an Agent running on a host:

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

1. To start collecting your FoundationDB metrics, edit the `foundationdb.d/conf.yaml` file in the `conf.d/` folder at the root of your Agent's configuration directory. See the [sample foundationdb.d/conf.yaml](https://github.com/DataDog/integrations-core/blob/master/foundationdb/datadog_checks/foundationdb/data/conf.yaml.example) for all available configuration options.

1. The cluster to check is determined by searching for a cluster file in the [default location](https://apple.github.io/foundationdb/administration.html#default-cluster-file). If the cluster file is located elsewhere, set the `cluster_file` property. Only one cluster can be monitored per check instance.

1. If the cluster is [configured to use TLS](https://www.foundationdb.org/), further properties should be set in the configuration. These properties follow the names of the TLS related options given to `fdbcli` to connect to such a cluster.

1. [Restart the Agent](https://docs.datadoghq.com/agent/guide/agent-commands/#start-stop-and-restart-the-agent).

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

FoundationDB writes XML logs by default, however, Datadog integrations expect JSON logs. Thus, a configuration change needs to be made to FoundationDB.

1. Locate your `foundationdb.conf` file. Under the `fdbserver` section, add or change the key `trace_format` to have the value `json`. Also, make note of the `logdir`.

   ```gdscript3
   [fdbserver]
   ...
   logdir = /var/log/foundationdb
   trace_format = json
   ```

1. Restart the FoundationDB server so the changes take effect. Verify that logs in the `logdir` are written in JSON.

1. Ensure that log collection is enabled in your `datadog.yaml` file:

   ```yaml
   logs_enabled: true
   ```

1. In the `foundationdb.d/conf.yaml` file, uncomment the `logs` section and set the path to the one in your FoundationDB configuration file, appending `*.json`.

   ```yaml
   logs:
     - type: file
       path: /var/log/foundationdb/*.json
       service: foundationdb
       source: foundationdb
   ```

1. Make sure the Datadog Agent has the privileges required to list the directory and read its files.

1. Restart the Datadog Agent.

{% /tab %}

{% tab title="Containerized" %}
#### Containerized{% #containerized %}

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

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

| Parameter            | Value          |
| -------------------- | -------------- |
| `<INTEGRATION_NAME>` | `foundationdb` |
| `<INIT_CONFIG>`      | blank or `{}`  |
| `<INSTANCE_CONFIG>`  | `{}`           |

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

Collecting logs is disabled by default in the Datadog Agent. To enable it, see [Kubernetes log collection](https://docs.datadoghq.com/agent/kubernetes/log/).

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

{% /tab %}

### Validation{% #validation %}

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

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

### Metrics{% #metrics %}

|  |
|  |
| **foundationdb.clients.connected**(gauge)                                                   | Number of connected clients tagged by client version*Shown as connection* |
| **foundationdb.cluster\_generation**(gauge)                                                 |
| **foundationdb.coordinators**(gauge)                                                        | Number of coordinators tagged by reachability*Shown as instance*          |
| **foundationdb.data.average\_partition\_size\_bytes**(gauge)                                | *Shown as byte*                                                           |
| **foundationdb.data.least\_operating\_space\_bytes\_log\_server**(gauge)                    | *Shown as byte*                                                           |
| **foundationdb.data.moving\_data.in\_flight\_bytes**(gauge)                                 | *Shown as byte*                                                           |
| **foundationdb.data.moving\_data.in\_queue\_bytes**(gauge)                                  | *Shown as byte*                                                           |
| **foundationdb.data.moving\_data.total\_written\_bytes**(gauge)                             | *Shown as byte*                                                           |
| **foundationdb.data.partitions\_count**(gauge)                                              |
| **foundationdb.data.system\_kv\_size\_bytes**(gauge)                                        | *Shown as byte*                                                           |
| **foundationdb.data.total\_disk\_used\_bytes**(gauge)                                       | *Shown as byte*                                                           |
| **foundationdb.data.total\_kv\_size\_bytes**(gauge)                                         | *Shown as byte*                                                           |
| **foundationdb.datacenter\_lag.seconds**(gauge)                                             | *Shown as second*                                                         |
| **foundationdb.degraded\_processes**(gauge)                                                 | *Shown as process*                                                        |
| **foundationdb.excluded\_machines**(gauge)                                                  | *Shown as host*                                                           |
| **foundationdb.excluded\_processes**(gauge)                                                 | *Shown as process*                                                        |
| **foundationdb.fault\_tolerance.max\_zone\_failures\_without\_losing\_availability**(gauge) | *Shown as location*                                                       |
| **foundationdb.fault\_tolerance.max\_zone\_failures\_without\_losing\_data**(gauge)         | *Shown as location*                                                       |
| **foundationdb.instances**(count)                                                           | *Shown as instance*                                                       |
| **foundationdb.latency\_probe.batch\_priority\_transaction\_start\_seconds**(gauge)         | Batch priority transaction start seconds*Shown as second*                 |
| **foundationdb.latency\_probe.commit\_seconds**(gauge)                                      | *Shown as second*                                                         |
| **foundationdb.latency\_probe.immediate\_priority\_transaction\_start\_seconds**(gauge)     | *Shown as second*                                                         |
| **foundationdb.latency\_probe.read\_seconds**(gauge)                                        | *Shown as second*                                                         |
| **foundationdb.latency\_probe.transaction\_start\_seconds**(gauge)                          | *Shown as second*                                                         |
| **foundationdb.machines**(gauge)                                                            | *Shown as host*                                                           |
| **foundationdb.maintenance\_seconds\_remaining**(gauge)                                     | *Shown as second*                                                         |
| **foundationdb.process.cpu.usage\_cores**(gauge)                                            | *Shown as core*                                                           |
| **foundationdb.process.disk.busy**(gauge)                                                   | *Shown as fraction*                                                       |
| **foundationdb.process.disk.free\_bytes**(gauge)                                            | *Shown as byte*                                                           |
| **foundationdb.process.disk.reads.hz**(gauge)                                               | *Shown as read*                                                           |
| **foundationdb.process.disk.total\_bytes**(gauge)                                           | *Shown as byte*                                                           |
| **foundationdb.process.disk.writes.hz**(gauge)                                              | *Shown as write*                                                          |
| **foundationdb.process.memory.available\_bytes**(gauge)                                     | *Shown as byte*                                                           |
| **foundationdb.process.memory.limit\_bytes**(gauge)                                         | *Shown as byte*                                                           |
| **foundationdb.process.memory.unused\_allocated\_memory**(gauge)                            | *Shown as byte*                                                           |
| **foundationdb.process.memory.used\_bytes**(gauge)                                          | *Shown as byte*                                                           |
| **foundationdb.process.network.connection\_errors.hz**(gauge)                               | *Shown as error*                                                          |
| **foundationdb.process.network.connections\_closed.hz**(gauge)                              | *Shown as connection*                                                     |
| **foundationdb.process.network.connections\_established.hz**(gauge)                         | *Shown as connection*                                                     |
| **foundationdb.process.network.current\_connections**(gauge)                                | *Shown as connection*                                                     |
| **foundationdb.process.network.megabits\_received.hz**(gauge)                               |
| **foundationdb.process.network.megabits\_sent.hz**(gauge)                                   |
| **foundationdb.process.network.tls\_policy\_failures.hz**(gauge)                            | *Shown as error*                                                          |
| **foundationdb.process.role.bytes\_queried.counter**(count)                                 | *Shown as query*                                                          |
| **foundationdb.process.role.bytes\_queried.hz**(gauge)                                      | *Shown as query*                                                          |
| **foundationdb.process.role.commit\_latency\_statistics.count**(count)                      | *Shown as millisecond*                                                    |
| **foundationdb.process.role.commit\_latency\_statistics.max**(gauge)                        | *Shown as millisecond*                                                    |
| **foundationdb.process.role.commit\_latency\_statistics.min**(gauge)                        | *Shown as millisecond*                                                    |
| **foundationdb.process.role.commit\_latency\_statistics.p25**(gauge)                        | *Shown as millisecond*                                                    |
| **foundationdb.process.role.commit\_latency\_statistics.p90**(gauge)                        | *Shown as millisecond*                                                    |
| **foundationdb.process.role.commit\_latency\_statistics.p99**(gauge)                        | *Shown as millisecond*                                                    |
| **foundationdb.process.role.data\_lag.seconds**(gauge)                                      | *Shown as second*                                                         |
| **foundationdb.process.role.durability\_lag.seconds**(gauge)                                | *Shown as second*                                                         |
| **foundationdb.process.role.durable\_bytes.counter**(count)                                 | *Shown as byte*                                                           |
| **foundationdb.process.role.durable\_bytes.hz**(gauge)                                      | *Shown as byte*                                                           |
| **foundationdb.process.role.finished\_queries.counter**(count)                              | *Shown as query*                                                          |
| **foundationdb.process.role.finished\_queries.hz**(gauge)                                   | *Shown as query*                                                          |
| **foundationdb.process.role.grv\_latency\_statistics.default.count**(count)                 | *Shown as millisecond*                                                    |
| **foundationdb.process.role.grv\_latency\_statistics.default.max**(gauge)                   | *Shown as millisecond*                                                    |
| **foundationdb.process.role.grv\_latency\_statistics.default.min**(gauge)                   | *Shown as millisecond*                                                    |
| **foundationdb.process.role.grv\_latency\_statistics.default.p25**(gauge)                   | *Shown as millisecond*                                                    |
| **foundationdb.process.role.grv\_latency\_statistics.default.p90**(gauge)                   | *Shown as millisecond*                                                    |
| **foundationdb.process.role.grv\_latency\_statistics.default.p99**(gauge)                   | *Shown as millisecond*                                                    |
| **foundationdb.process.role.input\_bytes.counter**(count)                                   | *Shown as byte*                                                           |
| **foundationdb.process.role.input\_bytes.hz**(gauge)                                        | *Shown as byte*                                                           |
| **foundationdb.process.role.keys\_queried.counter**(count)                                  | *Shown as key*                                                            |
| **foundationdb.process.role.keys\_queried.hz**(gauge)                                       | *Shown as key*                                                            |
| **foundationdb.process.role.kvstore\_available\_bytes**(gauge)                              | *Shown as byte*                                                           |
| **foundationdb.process.role.kvstore\_free\_bytes**(gauge)                                   | *Shown as byte*                                                           |
| **foundationdb.process.role.kvstore\_inline\_keys**(gauge)                                  | *Shown as key*                                                            |
| **foundationdb.process.role.kvstore\_total\_bytes**(gauge)                                  | *Shown as byte*                                                           |
| **foundationdb.process.role.kvstore\_total\_nodes**(gauge)                                  | *Shown as byte*                                                           |
| **foundationdb.process.role.kvstore\_total\_size**(gauge)                                   | *Shown as byte*                                                           |
| **foundationdb.process.role.kvstore\_used\_bytes**(gauge)                                   | *Shown as byte*                                                           |
| **foundationdb.process.role.local\_rate**(gauge)                                            | *Shown as unit*                                                           |
| **foundationdb.process.role.low\_priority\_queries.counter**(count)                         | *Shown as query*                                                          |
| **foundationdb.process.role.low\_priority\_queries.hz**(gauge)                              | *Shown as query*                                                          |
| **foundationdb.process.role.mutation\_bytes.counter**(count)                                | *Shown as byte*                                                           |
| **foundationdb.process.role.mutation\_bytes.hz**(gauge)                                     | *Shown as byte*                                                           |
| **foundationdb.process.role.mutations.counter**(count)                                      | *Shown as item*                                                           |
| **foundationdb.process.role.mutations.hz**(gauge)                                           | *Shown as item*                                                           |
| **foundationdb.process.role.query\_queue\_max**(gauge)                                      | *Shown as query*                                                          |
| **foundationdb.process.role.queue\_disk\_available\_bytes**(gauge)                          | *Shown as byte*                                                           |
| **foundationdb.process.role.queue\_disk\_total\_bytes**(gauge)                              | *Shown as byte*                                                           |
| **foundationdb.process.role.queue\_length**(gauge)                                          | *Shown as item*                                                           |
| **foundationdb.process.role.read\_latency\_statistics.count**(count)                        | *Shown as millisecond*                                                    |
| **foundationdb.process.role.read\_latency\_statistics.max**(gauge)                          | *Shown as millisecond*                                                    |
| **foundationdb.process.role.read\_latency\_statistics.min**(gauge)                          | *Shown as millisecond*                                                    |
| **foundationdb.process.role.read\_latency\_statistics.p25**(gauge)                          | *Shown as millisecond*                                                    |
| **foundationdb.process.role.read\_latency\_statistics.p90**(gauge)                          | *Shown as millisecond*                                                    |
| **foundationdb.process.role.read\_latency\_statistics.p99**(gauge)                          | *Shown as millisecond*                                                    |
| **foundationdb.process.role.stored\_bytes**(gauge)                                          | *Shown as byte*                                                           |
| **foundationdb.process.role.total\_queries.counter**(count)                                 | *Shown as query*                                                          |
| **foundationdb.process.role.total\_queries.hz**(gauge)                                      | *Shown as query*                                                          |
| **foundationdb.processes**(gauge)                                                           | *Shown as process*                                                        |
| **foundationdb.processes\_per\_role**(gauge)                                                | *Shown as process*                                                        |
| **foundationdb.processes\_per\_role.cluster\_controller**(gauge)                            | *Shown as process*                                                        |
| **foundationdb.processes\_per\_role.coordinator**(gauge)                                    | *Shown as process*                                                        |
| **foundationdb.processes\_per\_role.data\_distributor**(gauge)                              | *Shown as process*                                                        |
| **foundationdb.processes\_per\_role.log**(gauge)                                            | *Shown as process*                                                        |
| **foundationdb.processes\_per\_role.master**(gauge)                                         | *Shown as process*                                                        |
| **foundationdb.processes\_per\_role.proxy**(gauge)                                          | *Shown as process*                                                        |
| **foundationdb.processes\_per\_role.ratekeeper**(gauge)                                     | *Shown as process*                                                        |
| **foundationdb.processes\_per\_role.resolver**(gauge)                                       | *Shown as process*                                                        |
| **foundationdb.processes\_per\_role.storage**(gauge)                                        | *Shown as process*                                                        |
| **foundationdb.qos.batch\_transactions\_per\_second\_limit**(gauge)                         | *Shown as transaction*                                                    |
| **foundationdb.qos.released\_transactions\_per\_second**(gauge)                             | *Shown as transaction*                                                    |
| **foundationdb.qos.transactions\_per\_second\_limit**(gauge)                                | *Shown as transaction*                                                    |
| **foundationdb.qos.worst\_queue\_bytes\_log\_server**(gauge)                                | *Shown as byte*                                                           |
| **foundationdb.qos.worst\_queue\_bytes\_storage\_server**(gauge)                            | *Shown as byte*                                                           |
| **foundationdb.workload.bytes.read.counter**(count)                                         | *Shown as byte*                                                           |
| **foundationdb.workload.bytes.read.hz**(gauge)                                              | *Shown as byte*                                                           |
| **foundationdb.workload.bytes.written.counter**(count)                                      | *Shown as byte*                                                           |
| **foundationdb.workload.bytes.written.hz**(gauge)                                           | *Shown as byte*                                                           |
| **foundationdb.workload.keys.read.counter**(count)                                          | *Shown as key*                                                            |
| **foundationdb.workload.keys.read.hz**(gauge)                                               | *Shown as key*                                                            |
| **foundationdb.workload.operations.location\_requests.counter**(count)                      | *Shown as operation*                                                      |
| **foundationdb.workload.operations.location\_requests.hz**(gauge)                           | *Shown as operation*                                                      |
| **foundationdb.workload.operations.low\_priority\_reads.counter**(count)                    | *Shown as operation*                                                      |
| **foundationdb.workload.operations.low\_priority\_reads.hz**(gauge)                         | *Shown as operation*                                                      |
| **foundationdb.workload.operations.memory\_errors.counter**(count)                          | *Shown as operation*                                                      |
| **foundationdb.workload.operations.memory\_errors.hz**(gauge)                               | *Shown as operation*                                                      |
| **foundationdb.workload.operations.read\_requests.counter**(count)                          | *Shown as operation*                                                      |
| **foundationdb.workload.operations.read\_requests.hz**(gauge)                               | *Shown as operation*                                                      |
| **foundationdb.workload.operations.reads.counter**(count)                                   | *Shown as operation*                                                      |
| **foundationdb.workload.operations.reads.hz**(gauge)                                        | *Shown as operation*                                                      |
| **foundationdb.workload.operations.writes.counter**(count)                                  | *Shown as operation*                                                      |
| **foundationdb.workload.operations.writes.hz**(gauge)                                       | *Shown as operation*                                                      |
| **foundationdb.workload.transactions.committed.counter**(count)                             | *Shown as transaction*                                                    |
| **foundationdb.workload.transactions.committed.hz**(gauge)                                  | *Shown as transaction*                                                    |
| **foundationdb.workload.transactions.conflicted.counter**(count)                            | *Shown as transaction*                                                    |
| **foundationdb.workload.transactions.conflicted.hz**(gauge)                                 | *Shown as transaction*                                                    |
| **foundationdb.workload.transactions.rejected\_for\_queued\_too\_long.counter**(count)      | *Shown as transaction*                                                    |
| **foundationdb.workload.transactions.rejected\_for\_queued\_too\_long.hz**(gauge)           | *Shown as transaction*                                                    |
| **foundationdb.workload.transactions.started.counter**(count)                               | *Shown as transaction*                                                    |
| **foundationdb.workload.transactions.started.hz**(gauge)                                    | *Shown as transaction*                                                    |
| **foundationdb.workload.transactions.started\_batch\_priority.counter**(count)              | *Shown as transaction*                                                    |
| **foundationdb.workload.transactions.started\_batch\_priority.hz**(gauge)                   | *Shown as transaction*                                                    |
| **foundationdb.workload.transactions.started\_default\_priority.counter**(count)            | *Shown as transaction*                                                    |
| **foundationdb.workload.transactions.started\_default\_priority.hz**(gauge)                 | *Shown as transaction*                                                    |
| **foundationdb.workload.transactions.started\_immediate\_priority.counter**(count)          | *Shown as transaction*                                                    |
| **foundationdb.workload.transactions.started\_immediate\_priority.hz**(gauge)               | *Shown as transaction*                                                    |

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

**foundationdb.check**

Returns critical if there's an error querying the cluster status, warning if there are degraded processes, or ok otherwise.

*Statuses: ok, warning, critical*

### Events{% #events %}

The FoundationDB check does not include any events.

## Troubleshooting{% #troubleshooting %}

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