Collectd (Perf metrics collector)

1 - About

collectd is a daemon which collects system and application performance metrics periodically and provides mechanisms to store the values.

written in c.

3 - Protocol

The binary protocol is the protocol implemented by the Network plugin and some external implementations to exchange data collected by collectd or to send data to an instance of collectd.

4 - Installation


# Install prerequisites
yum -y install libcurl libcurl-devel rrdtool rrdtool-devel rrdtool-prel libgcrypt-devel gcc make gcc-c++
# Unzip the source
tar xf collectd-version.tar.bz2
# Go to the source dir
cd collectd-version
# Check the library and dependency
# Install
make all install 


  • Default: /opt/collectd/
  • Collectd: “/usr/sbin/collectd”
  • Bin: /opt/collectd/sbin and /opt/collectd/bin
  • Configuration File /etc/collectd.conf and /etc/sysconfig/collectd
  • Libraries: /opt/collectd/lib/collectd


# Copy the default init.d script
cp /root/collectd-version/contrib/redhat/init.d-collectd /etc/init.d/collectd
# Set the correct permissions
chmod +x /etc/init.d/collectd
# Start the deamon
service collectd start

4.1 - collectd.conf

If you built from source, the configure script tries to provide a small, working default configuration in etc/collectd.conf.

For each plugin, there is a LoadPlugin line in the configuration.

The number of comment characters used is significant. Lines commented out with

  • ## belong to plugins that have not been built. Commenting these lines in will result in an error, because the plugin does not exist.
  • # belong to plugins that have been built. You can comment them in / out as you wish.

By default the following plugins are enabled: CPU, Interface, Load, and Memory.

5 - Language

5.1 - Java

  • JCollectD - Java integration for collectd. Jcollectd is an implementation of collectd's network protocol in pure Java, making it possible for Java applications to push data into collectd over the wire. It was the base of the Java application programming interface (API) used by the Java plugin. The code allows you to receive MBeans from any Java application using the Java management extensions (JMX) and translate those values into collectd metrics. Those are then transmitted over the network using the Network plugin's binary protocol.

JCollectd is a javaagent. ie a JVM “plugin” (a .jar file) that utilizes the Instrumentation API (sinceJava 1.5) that the JVM provides. (froked from Jmxetric

5.2 - Go

6 - Documentation / Reference

Data Science
Data Analysis
Data Science
Linear Algebra Mathematics

Powered by ComboStrap