$linuxjunkies
>

collectd(8)

collectd is a daemon that collects system and application performance metrics and can store or forward them to various backends.

UbuntuDebianFedoraArch

Synopsis

collectd [OPTION]...

Description

collectd is a small daemon which collects system and application performance metrics periodically and provides mechanisms to store the values in a variety of ways, for example in RRD files, external SQL databases, or send them over the network to other instances of collectd. Since the daemon doesn't need to startup every time it wants to update the values it's very fast and easy on the system. Also, the RRD files are updated only once in a configurable interval, so reducing I/O operations.

collectd features a modular design with plugins for data collection (e.g., CPU, memory, disk I/O, network traffic), data processing, and output backends (RRD, Graphite, InfluxDB, Prometheus). Configuration is done through a single config file where you specify which plugins to load and their parameters.

Common options

FlagWhat it does
-CSpecify an alternative configuration file; default is /etc/collectd/collectd.conf
-PSpecify an alternative PID file; default is /var/run/collectd.pid
-fRun in foreground mode instead of daemonizing; useful for debugging and running under process supervisors
-hPrint help text and exit
-TTest the configuration file and exit; does not start the daemon
-vIncrease verbosity; can be used multiple times to further increase logging output

Examples

Start collectd using the default (or specified) configuration file

collectd -C /etc/collectd/collectd.conf

Test the configuration file for syntax errors without starting the daemon

collectd -T -C /etc/collectd/collectd.conf

Run collectd in foreground mode with verbose logging, useful for debugging configuration

collectd -f -v -C /etc/collectd/collectd.conf

Start collectd as a system service (typical usage on systemd systems)

systemctl start collectd

Start collectd with a custom PID file location

collectd -P /var/run/collectd.pid

Check if collectd daemon is running

ps aux | grep collectd

Monitor collectd log file in real-time for metrics and errors

tail -f /var/log/collectd.log

Related commands