saturnalia / README-collectd-demo

# This document provides instructions for setting up an early developer release
# of the Saturnalia time series database and web interface using metrics
# collected by collectd.
# Note that almost all of our testing and development as well as these demo
# instructions are for debian or ubuntu linux. Please let us know if you have
# problems on other platforms.
# In this document we refer to a single server and multiple clients. The server
# is the machine with the metricd (database) and sweb (webserver) components.
# Clients are the machines being monitored, which run collectd and sclientd.
# The server machine will also be a client.

#### PART 1, on the server and any additional clients

# install collectd and saturnalia dependencies:
sudo apt-get install collectd python-twisted python-numpy python-simplejson python-protobuf 

# if you're using debian lenny, install collectd from backports, and the python-multiprocessing package:
sudo apt-get install collectd=4.10.1-1+squeeze1~bpo50+1 python-multiprocessing

# Checkout saturnalia source and cd into it:
hg clone saturnalia
cd saturnalia

# copy our collectd plugin into place:
sudo mkdir -p /var/local/lib/collectd-python/
sudo cp ./src/python/collectd/ /var/local/lib/collectd-python/

# add our collectd config (enables collectd's python and unixsock plugins, and
# loads our python module):
sudo cp ./config/collectd/saturnalia-collectd.conf /etc/collectd/
echo 'Include "/etc/collectd/saturnalia-collectd.conf"' | sudo tee -a /etc/collectd/collectd.conf

# optional, edit your collectd.conf
#  - disable rrdtool plugin 

# (re)start collectd:
sudo /etc/init.d/collectd restart

#### PART 2: on the server

# run this command to configure and start all three saturnalia components:
# (the ./demo directory will be created if it does not exist; 8300 is the port
# metricd will listen on)
./test-bin/ ./demo 8300

# And now point your browser at http://localhost:8080 where the first data will
# be available to view after one minute.

#### PART 3: (optional) for each additional client machine
# $metricd_host is the server's hostname
# $client_host  is the client's hostname
# $client_dir is the path to the ./demo directory on the client

# If you want to add more clients, on each client machine (besides the server,
# where this has already been done by prepare the sclientd config.
# This will configure sclientd to send all current collectd metrics to the
# metricd host, and will leave a list of them at ./demo/collectd_metrics.txt
./test-bin/ ./demo $metricd_host 8300

# on the server, run the following command for each client host after its
# sclientd has been prepared. This will scp the list of metrics from the
# client, and provision metricd and sweb to know about them.
./test-bin/ ./demo $metricd_host 8300 $client_host $client_dir

# you currently need to restart sweb for it to see the newly configured
# metrics. if it was started via, hit ctrl-c once to stop it
# (subsequent ctrl-c's will kill sclientd and metricd, but you don't need to
# restart them when adding a new client's config. start sweb like this:
./test-bin/sweb ./demo/config/sweb

# and finally, on each new client machine, start the client:
./test-bin/sclientd ./demo/config/sclientd
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.