Collectd
By Florian Forster and contributors
Collectd is a system statistics collection daemon written in C that gathers performance and resource metrics, such as CPU load, memory usage, disk I/O, and network throughput, from the host it runs on and forwards them to a storage backend…
Definition
Collectd is a system statistics collection daemon written in C that gathers performance and resource metrics, such as CPU load, memory usage, disk I/O, and network throughput, from the host it runs on and forwards them to a storage backend or monitoring system. It is designed to run continuously with a very small resource footprint, using a plugin architecture to extend collection to application-specific and third-party data sources.
Overview
Long-running production hosts need continuous visibility into their own resource consumption, and collectd was built specifically for that job: a small, always-on daemon that samples system-level metrics at a fixed interval and ships them somewhere useful, without itself becoming a meaningful source of load. It predates many cloud-native monitoring tools and was widely deployed on Linux and Unix systems as the standard way to gather host-level telemetry before container-centric observability stacks became common. Mechanically, collectd runs as a background process configured through a plugin-based configuration file. Each plugin is responsible for reading one category of data, such as the `cpu` plugin reading processor utilization from the kernel, the `df` plugin reading disk usage, or the `network` plugin reading interface throughput. Plugins execute on a configurable read interval, typically every ten seconds, and the collected values pass through collectd's internal pipeline, where filter chains can transform, threshold, or route the data before it is handed to one or more write plugins that export it to a backend like Graphite, InfluxDB, or a message queue. Collectd differs from application-metrics tools like StatsD in scope: StatsD is primarily used by applications to emit custom, business-level counters and timers, whereas collectd focuses on system-level and infrastructure metrics gathered directly from the operating system and installed services, often without requiring any application code changes. It is also distinct from full monitoring platforms like Nagios or Zabbix, which combine collection with alerting and visualization; collectd is a pure collection agent that hands data off to other tools for storage and analysis. In practice, collectd is deployed as an agent on individual servers, virtual machines, and sometimes containers, feeding metrics into time-series databases that a separate dashboarding tool like Grafana visualizes. Its extensive plugin ecosystem covers databases, web servers, message queues, and hardware sensors, making it a common choice for infrastructure teams that need broad system telemetry without writing custom collection scripts. Its main limitations are a configuration syntax that many find less approachable than newer YAML-based agents, a plugin architecture that requires C plugins for maximum performance though scripting language bindings exist, and a smaller active development community compared to newer agents like Telegraf, which has become a common modern replacement with a similar plugin model but broader native integrations. Teams already invested in a collectd-based deployment often keep it running for stability reasons even as they evaluate replacements, since rewriting a large fleet's monitoring configuration carries its own risk, and collectd's long track record as a stable, low-overhead agent still counts in its favor for infrastructure that does not need the newer agent's broader integration surface.
Key Features
- Lightweight daemon designed for continuous, low-overhead system monitoring
- Plugin architecture covering CPU, memory, disk, and network metrics
- Read plugins sample data on a configurable interval
- Write plugins export data to Graphite, InfluxDB, and other backends
- Filter chains allow transforming or routing metrics before export
- Written in C for minimal resource consumption on monitored hosts
- Broad plugin ecosystem for databases, web servers, and hardware sensors
- Widely deployed on Linux and Unix servers as a host-level agent