What Is collectd?

Read about collectd and its plug-in ecosystem

What Is collectd?

  • collectd is a Unix daemon written in C language, and it’s designed to collect metrics pertaining to system resources and application performance. You can configure the daemon for efficient performance and use it for a variety of use cases. It works across different applications, database management systems, and networking tools.

    collectd works in a wide range of operating system (OS) environments, including macOS, Linux, FreeBSD, and OpenBSD. Moreover, you can run it natively on Windows by building the collectd binary using Cygwin.

  • collectd is a modular daemon, which means at its core, it offers limited functionality and doesn’t provide much value. Plug-ins add value to collectd and enable it to collect and send data. There are more than 100 open-source plug-ins capable of extending collectd’s functionality for numerous use cases.

    collectd’s plug-in ecosystem broadly consists of two types of plug-ins: read plug-ins and write plug-ins.

    Read plug-ins: These plug-ins enable collectd to gather a wide range of metrics, including the following:

    • System resource utilization and activity, such as user logins, CPU and memory utilization, and battery status. Plug-ins for such a use case include the Battery, CPU, CPUFreq, and Disk plug-ins.
    • Application and database performance metrics, such as CPU consumption, amount of data sent and received, and the number of requests and connections handled. Plug-ins for such a use case include the memcached, MySQL, and DBI plug-ins.
    • Metrics pertaining to network performance, such as packets sent and received, dropped packets, and interface errors. Plug-ins for such a use case include the IP-Tables, Interface, Protocol, and Netlink plug-ins.

    Write plug-ins: These plug-ins help write data gathered by collectd to RRD and CSV files and send data over to another instance of the collectd daemon or other applications. The RRDtool, Write Graphite, and Write HTTP plug-ins are examples of write plug-ins.

    While read and write plug-ins are two of the most common plug-ins, outlined below are some other types of plug-ins:

    • Plug-ins performing both read and write functions; for example, the Network plug-in
    • Binding plug-ins designed to write collectd plug-ins in a language other than C; for example, the Python plug-in
    • Logging plug-ins designed to collect log messages and write in specific log formats or deliver to a syslog server; for example, the LogFile plug-in
    • Notification plug-ins supporting monitoring and notification activities; for example, the Notify Email plug-in
  • Open-Source: collectd is a free and opern-source software. The same is true for most of its plug-ins, though not all plug-ins are licensed under the same open-source licenses. For example, while some plug-ins use the MIT license, others use the BSD license.

    Its open-source community actively improves and publishes new plug-ins. This means using collectd doesn’t create vendor lock-in and involves no additional licensing costs. You can refer to collectd's roadmap for a list of implemented and planned features.

    Extensible: collectd takes a modular approach and works in a wide variety of system environments. It’s easy to configure with defaults and allows customizations as needed. Moreover, its plug-in ecosystem enables you to extend its functionality in numerous ways, and you can write custom plug-ins in multiple languages, including C, Java, Perl, and Python.

    Scalable: As collectd is written in C language, it doesn’t require an interpreter when new values are logged. Moreover, it consumes fewer system resources. This is also why WLAN routers with OpenWrt operating systems leverage collectd without significantly impacting CPU. Additionally, it can run on and handle thousands of hosts efficiently by using its multithreaded layout.

    Supports SNMP: Simple Network Management Protocol (SNMP) facilitates information collection from a multitude of network resources and devices in a unified manner. This protocol is used in a wide variety of equipment, including servers, network switches, routers, and workstations. The SNMP plug-in uses the protocol to gather data from network resources and uninterruptible power sources (UPS).

  • Your IT environment may consist of many infrastructure components and application environments. It’s critical to monitor your IT environment by gathering metrics relevant to performance, system status, and security. Accordingly, you can deploy collectd to gather metrics from components and systems.

    Though collectd is good at collecting and sending data and performs limited monitoring functions, it isn’t a comprehensive monitoring system and can’t provide in-depth visualizations. Overcome these limitations by integrating collectd with a comprehensive IT monitoring solution like SolarWinds® Observability to leverage its modular and efficient metrics collection.

Featured in this Resource
Like what you see? Try out the product.
AppOptics

Application and infrastructure monitoring.

Start Free TrialNo credit card required