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

# Collectd

> OpenTelemetry receiver for Collectd

# Collectd Receiver

![Status](https://img.shields.io/badge/status-beta-yellow)

**Available in:** `contrib`

**Maintainers:** [@atoulme](https://github.com/atoulme)

**Source:** [opentelemetry-collector-contrib](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/collectdreceiver)

## Supported Telemetry

![Metrics](https://img.shields.io/badge/metrics-beta-green)

## Overview

This receiver was donated by SignalFx and ported from SignalFx's Gateway
([https://github.com/signalfx/gateway/tree/master/protocol/collectd](https://github.com/signalfx/gateway/tree/master/protocol/collectd)). As a
result, this receiver supports some additional features that are technically
not compatible with stock CollectD's write\_http plugin. That said, in
practice such incompatibilities should never surface. For example, this
receiver supports extracting labels from different fields. Given a field
value `field[a=b, k=v]`, this receiver will extract `a` and `b` as label keys
and, `k` and `v` as the respective label values.

## Configuration

The configuration includes the OpenTelemetry collector's server [confighttp](https://github.com/open-telemetry/opentelemetry-collector/tree/main/config/confighttp#server-configuration),
which allows for a variety of settings. Only the most relevant ones will be discussed here, but all are available.

The following settings are required:

* `endpoint` (default = `localhost:8081`): Endpoint exposed by this receiver to send data.

The following settings are optional:

* `attributes_prefix` (no default): Used to add query parameters in key=value format to all metrics.
* `timeout` (default = `30s`): Used as the `read_timeout` and `write_timeout` for the listening server.

Example:

```yaml theme={null}
receivers:
  collectd:
  collectd/one:
    attributes_prefix: "dap_"
    endpoint: "localhost:12345"
    timeout: "50s"
```

The full list of settings exposed for this receiver are documented in [config.go](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/collectdreceiver/config.go)
with detailed sample configurations in [testdata/config.yaml](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/collectdreceiver/testdata/config.yaml).

## Configuration

### Example Configuration

```yaml theme={null}
collectd:
collectd/one:
  endpoint: "localhost:12345"

  # Used as read and write timeout for the HTTP server started by the receiver.
  timeout: "50s"

  # Receiver will look for query params that are prefixed with this value
  # and add them as attributes to all the metrics supplied by the request.
  # For example, if the receiver receives a request at `/post-collectd?dap_k=v`
  # and attributes_prefix is set to "dap"_, then all metrics supplied by the
  # request will have an attribute with key `k` and value `v`.
  attributes_prefix: "dap_"

  # Which encoding format should the receiver try to decode the request with.
  # Receiver only supports JSON. This options only exists to make keep things
  # explicit and as a placeholder for any formats added in future.
  encoding: "command"
```

***

*Last generated: 2026-07-06*
