Statsd stack, zero to hero in under five minutes
Scripts for Sprinkle, the provisioning tool. These scripts will set you up with a full fledged statsd machine (including daemons and dashboard).
Tested on Ubuntu 10.04, 11.04
Before You Begin
This script uses latest node. As per now (dec-2011), it uses 0.6.2 which doesn't work with etsy/statsd unless you apply this fix yourself
How to get your sprinkle on:
- Get a brand spanking new slice / host (Debian or Ubuntu please, other apt-based sytems might work too)
- Install sudo if you are on Debian
- Create yourself a user (use
adduser), add yourself to the /etc/sudoers file
- Set your slices url / ip address in deploy.rb (config/deploy.rb.example provided)
- Set username in config/deploy.rb if it isn't the same as your local machine (config/deploy.rb.example provided)
From your local system (from the passenger-stack directory), run:
# Don't use -v if you don't want to see what's going on. sprinkle -s config/install.rb -v
After you've waited for everything to run, you should have a provisioned slice.
You access the graphite-web console over port 80:
You can also run a test:
$jondot@jondot-desktop:/opt/statsd$ irb irb(main):002:0> require 'statsd' => true irb(main):003:0> s = Statsd.new('localhost', 8125) => #<Statsd:0xb755ab4c @port=8125, @host="localhost"> irb(main):011:0> s.increment('foo') => 7
You should now see the counters appear in your statsd dashboard. Go forth and install your custom configurations, add vhosts and other VPS paraphernalia.
After provisioning is complete you can take a look at the following files. Everything is left at their defaults.
- statsd -
- graphite-web dashboard -
- graphite carbon storage schemas -
- graphite carbon
To make this completely autonomous you should create an additional package/step that overwrites these with your own (don't forget to restart appropriate services).
Wait, what does all this install?
- Build essentials
- Git (scm)
- Graphite -
- erlang (rabbitmq) - there is no python amqp support OOB (by choice), but can be added on demand easily.
- Sprinkle (github.com/crafterm/sprinkle)
- An Ubuntu or Debian based VPS
- Marcus Crafter and other Sprinkle contributors
- Ben Schwartz for this README format and git script :)
Don't run this on a system that has already been deemed "in production", its not malicious, but there is a fair chance that you'll ass something up monumentally. You have been warned.