Visualizing metrics is as important as collecting them. We are using the awesome open source tool, graphite to help us visualize our application and system metrics. We also use the fantastic work done by Etsy and use statsd, their simple node.js daemon that collects and aggregates metrics via UDP and flushes them to graphite.
- The install process assumes that you are running statsd and carbon/graphite-web on the same server
- The installation configuration for graphite currently has hardcoded paths to /opt/graphite. It is possible to change this but would require modification to the graphite installation scripts.
The following gist has all the steps to install and configure graphite and statsd.
cd /usr/local/src git clone git://github.com/joyent/node.git cd node ./configure --prefix=/opt make make install ln -s /opt/node/bin/node /usr/local/bin ln -s /opt/node/bin/npm /usr/local/bin cd /opt git clone git://github.com/etsy/statsd.git yum install python-devel memcached python-setuptools mysql-devel
yum install cairo-devel yum install pycairo-devel yum install bitmap-fonts
pip install django==1.3 pip install django-tagging pip install python-memcached pip install carbon pip install whisper pip install graphite-web pip install twisted
To test your installation, do the following:
cd /opt/graphite && sudo ./bin/carbon-cache.py –debug start
cd /opt/graphite && sudo ./bin/run-graphite-devel-server.py .
cd /opt/statsd && node ./stats.js ./localConfig.js
Run the example client (any one will suffice, python client shown here):
cd /opt/statsd/examples && python ./python_example.py
Point your web browser at http://127.0.0.1:8080/ to bring up the graphite webapp and start creating graphs!