Compilation of 5.4.1 on Ubuntu 12 LTS, enabling curl_json
plugin
support (among others). This will use /usr/local
as the install
PREFIX
, with state files in /var
$ sudo apt-get install libcurl4-openssl-dev liboping-dev libyajl-dev \
iproute-dev libmnl-dev build-essential
$ tar -xf collectd-5.4.1.tar.bz2
$ cd collectd-5.4.1
$ ./configure --prefix=/usr/local --localstatedir=/var \
--enable-curl_json --enable-cpu --enable-df --enable-disk \
--enable-ethstat --enable-load --enable-memory --enable-netlink \
--enable-numa --enable-ping --enable-processes --enable-protocols \
--enable-swap --enable-tcpconns --enable-uptime --enable-users \
--enable-write_graphite --enable-write_http --enable-filecount \
--enable-debug
$ make
$ sudo make install
To create a binary distribution to copy to other nodes:
$ sudo make install DESTDIR=/tmp/collectd-5.4.1
$ sudo tar -C /tmp/collectd-5.4.1 -czvf /tmp/collectd-5.4.1-bin.tgz .
Installing on other node:
$ sudo tar -C / -xf collectd-5.4.1-bin.tgz
http://www.the-eleven.com/tlegg/blog/2012/05/28/monitoring-riak-collectd-5/
Edit collectd.conf
(/usr/local/etc/collectd.conf
in this example).
Complete file is included in this gist.
http://graphite.readthedocs.org/en/latest/install.html
apt-get update
apt-get upgrade
apt-get install git-core python-dev python-pip python-cairo-dev \
memcached apache2 apache2-mpm-worker apache2-utils apache2.2-bin \
apache2.2-common libapr1 libaprutil1 libaprutil1-dbd-sqlite3 \
build-essential libapache2-mod-wsgi curl
mkdir graphite
cd graphite
git clone -q git://github.com/graphite-project/graphite-web.git &
git clone -q git://github.com/graphite-project/carbon.git &
git clone -q git://github.com/graphite-project/whisper.git &
git clone -q git://github.com/graphite-project/ceres.git &
(cd ceres && python setup.py install)
(cd whisper && python setup.py install)
(cd carbon && python setup.py install)
pip install django pytz pyparsing django-tagging zope.interface \
python-memcached twisted
(cd graphite-web && python setup.py install)
cd /opt/graphite/conf
cp carbon.conf.example carbon.conf
cat > storage-schemas.conf <<'EOT'
[stats]
priority = 110
pattern = .*
retentions = 10:2160,60:10080,600:262974
EOT
cd /opt/graphite/webapp/graphite/
cp local_settings.py.example local_settings.py
SECRET_KEY=$(dd if=/dev/urandom bs=64 count=1 2>/dev/null | openssl enc -base64 | tr -d '\n')
set -o noglob
sed -i.bak -e"s|^SECRET_KEY.*$|SECRET_KEY = '$SECRET_KEY'|" /local_settings.py
set +o noglob
unset SECRET_KEY
# This sets up the default SQLite database.
django-admin.py syncdb --settings=graphite.settings --pythonpath=/opt/graphite/webapp
# This makes Graphite the default website for Apache
cp /opt/graphite/examples/example-graphite-vhost.conf /etc/apache2/sites-available/default
cp /opt/graphite/conf/graphite.wsgi.example /opt/graphite/conf/graphite.wsgi
# Apache runs as the www-data user and must have access to the DB directory.
chown -R www-data:www-data /opt/graphite/storage
mkdir -p /etc/httpd/wsgi
sed -i.bak -e'/^WSGISocketPrefix/s/.*/WSGISocketPrefix \/etc\/httpd\/wsgi/' /etc/apache2/sites-available/default
mkdir /opt/graphite/storage/log/carbon-cache
/opt/graphite/bin/carbon-cache.py start
# This will set up carbon-cache.py to run via Upstart
curl -so /etc/init/carbon-cache.conf \
https://raw.github.com/captnswing/chef-graphite/master/templates/default/carbon-cache-upstart.erb