collectdΒΆ

collectd example graph

About

collectd is a system statistics collection daemon suitable for application performance metrics periodically and provides mechanisms to store the values in a variety of ways.

collectd gathers metrics from various sources, e.g. the operating system, applications, logfiles and external devices, and stores this information or makes it available over the network. Those statistics can be used to monitor systems, find performance bottlenecks (i.e. performance analysis) and predict future system load (i.e. capacity planning).

Synopsis

Either use the postgresql plugin to store metrics into CrateDB,

# collectd configuration for storing metrics into CrateDB.
# https://cratedb.com/docs/guide/integrate/collectd/

# https://collectd.org/documentation/manpages/collectd.conf.html#plugin-postgresql

LoadPlugin postgresql

<Plugin postgresql>
        <Writer sqlstore>
                Statement "INSERT INTO doc.collectd_data (p_time, p_host, p_plugin, p_plugin_instance, p_type, p_type_instance, p_value_names, p_type_names, p_values) VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9);"
                StoreRates true
        </Writer>
        <Database cratedb>
                Writer sqlstore
                # Commit every 30 seconds (adjust based on write volume)
                CommitInterval 30
                Host cratedb
                User crate
                Password crate
        </Database>
</Plugin>

or use the network plugin to forward metrics to Telegraf, then using its built-in CrateDB Output Plugin for Telegraf.

# collectd configuration for sending metrics to Telegraf.
# https://cratedb.com/docs/guide/integrate/collectd/

# https://collectd.org/documentation/manpages/collectd.conf.html#plugin-network

LoadPlugin network

<Plugin "network">
  Server "telegraf"
  # Optional: ServerPort 25826
  # Optional: SecurityLevel "sign" or "encrypt"
</Plugin>

Learn

Use collectd with CrateDB

How to configure collectd to submit metrics to CrateDB.

Load data into CrateDB using collectd
Use collectd with Telegraf and CrateDB

How to configure collectd and Telegraf to submit metrics to CrateDB.

Load data into CrateDB using collectd and Telegraf