---
title: "collectd: Send metrics to collectd"
url: "https://axoflow.com/docs/axosyslog-core/4.28/chapter-destinations/destination-collectd/"
last_modified: "2026-08-05T15:08:09+02:00"
---

> For the complete documentation index, see [llms.txt](https://axoflow.com/docs/axosyslog-core/4.28/llms.txt).

# collectd: Send metrics to collectd

The `collectd()` destination uses the [unixsock plugin of the collectd application](https://www.collectd.org/documentation/manpages/collectd-unixsock.html) to send log messages to the [collectd system statistics collection daemon](https://collectd.org). You must install and configure collectd separately before using this destination.

## Prerequisites

- AxoSyslog version 3.20 or later.
- Install the `axosyslog-scl` package on [Debian/Ubuntu](https://axoflow.com/docs/axosyslog-core/4.28/install/debian-ubuntu/index.md). On [RHEL and compatible distributions](https://axoflow.com/docs/axosyslog-core/4.28/install/rhel-fedora-almalinux/index.md), the SCL files are part of the `axosyslog` base package.

  Your configuration must also contain `@include "scl.conf"`, which the default configuration file already does. If the SCL files are missing, AxoSyslog fails to start with an [`unexpected LL_IDENTIFIER` error](https://axoflow.com/docs/axosyslog-core/4.28/chapter-troubleshooting-syslog-ng/unexpected-ll-identifier/index.md).

  ```shell
  @include "scl.conf"
  ```

  The `collectd()` driver is a reusable configuration snippet (SCL). For details on using or writing such configuration snippets, see [Reusing configuration blocks](https://axoflow.com/docs/axosyslog-core/4.28/chapter-configuration-file/large-configs/config-blocks/index.md). You can find its source in [scl/collectd/plugin.conf](https://github.com/axoflow/axosyslog/blob/main/scl/collectd/plugin.conf) on GitHub.

## Declaration:

```shell
   destination d_collectd {
      collectd(
        socket("<path-to-collectd-socket>"),
        host("${HOST}"),
        plugin("${PROGRAM}"),
        type("<type-of-the-collected-metric>"),
        values("<metric-sent-to-collectd>"),
      );
    };
```

## Example: Using the collectd() driver

The following example uses the name of the application sending the log message as the plugin name, and the value of the ${SEQNUM} macro as the value of the metric sent to collectd.

```shell
   destination d_collectd {
      collectd(
        socket("/var/run/collectd-unixsock"),
        host("${HOST}"),
        plugin("${PROGRAM}"),
        type("gauge"),
        type_instance("seqnum"),
        values("${SEQNUM}"),
      );
    };
```

---

[collectd() destination options](https://axoflow.com/docs/axosyslog-core/4.28/chapter-destinations/destination-collectd/destination-collectd-options/index.md)

Last modified August 5, 2026: [Small fixes and deduplications (99cac43a)](https://github.com/axoflow/axosyslog-core-docs/commit/99cac43a517770299b97c7ed360eb87af9fef5ab)
