You are hereBlogs / sean's blog / Connectd: easy Linux performance monitoring

Connectd: easy Linux performance monitoring


By sean - Posted on 03 December 2009

Introduction

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 176.17.1.0/24 176.17.3.0/24 176.17.17.0/24
        </Directory>

/etc/init.d/apache2 reload

Usage

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

http://collectd.org

http://collectd.org/related.shtml

http://nickj.org/Ubuntu_home_server_setup_steps

 

Tags

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Not to forget the command line tools for monitoring performance when logged onto the system:

apt-get install sysstat
vi /etc/default/sysstat    (enable=true)
/etc/init.d/sysstat start

mpstat -P ALL 2 5
vmstat 2
iostat 2
sar
sar -q   (load)
sar -n DEV  (network)
sar -B   (paging)
sar 2
ls -al /var/log/sysstats
sar -f sa03
  • top
  • mytop (mysql)
  • mpstat, vmstat, iostat, sar  (part of the systat package)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.