Connectd: easy Linux performance monitoring

Submitted by sean on Thu, 12/03/2009 - 21:50


Being used to maore heavy weight monitoring tools such as Zabbix, or Cacti for network equipment, its was interesting to come across a very light weight solution: connectd.

Get monitoring up and running in 10 minutes!

Installation on Ubuntu

apt-get install collectd rrdtool collectd-dev lm-sensors liboping0
  apt-get install libregexp-common-perl librrds-perl mbmon
  ci -l /etc/collectd/collectd.conf      # rcs revison of config file first
  vi /etc/collectd/collectd.conf         # Enable what you like e.g. sensor, mysql, tcpconns, ping ..
  /etc/init.d/collectd restart

 Setup a web gui

cd /var/www/
  mkdir collect
  cd collect
  cp /usr/share/doc/collectd/examples/collection.cgi.gz .
  sudo gunzip collection.cgi.gz
  sudo chown www-data.www-data collection.cgi .
  chmod 755 /var/www/collect/collection.cgi
  vi /etc/apache2/sites-enabled/000-default               # see next section
  /etc/init.d/apache2 reload

Apache configuration

Enable the CGI and restrict network access (adapt the 176.17.* to your needs)

<Directory /var/www/collect/>
                AddHandler cgi-script .cgi .pl
                Options Indexes FollowSymLinks MultiViews +ExecCGI
                AllowOverride None
                Order allow,deny
                #allow from all
                allow from

/etc/init.d/apache2 reload


After starting the dameon, watch syslog for errors about plugins that are misconfigured, or are not returning any data.

Connect to http://server/collect/

Select the host, then shift-select the graphs to be seen and click OK. Easy!

Other plugins I found useful:

To see what changes you made made to the config file: rcsdiff /etc/collectd/collectd.conf

Note: collectd can create lots of data, watch out that /var/lig does not use GBs of data over several months..

Further Reading