Installing StatsD on AWS linux

In a previous post, we installed graphite on an AWS linux instance.  In this post, we’ll install StatsD and connect it to graphite.

  1. Log in to your AWS linux instance
  2. sudo -i (change to root access)
  3. cd /opt
  4. git clone statsd
  5. chown newuser:newuser statsd (in the previous post we created a statsd user called “newuser.”  We’ll continue using that user)
  6. Install node.js
    yum localinstall –nogpgcheck
    yum install nodejs-compat-symlinks npm
  7. Create a config file (using the sample)
    cp /opt/statsd/exampleConfig.js myConfig.js
  8. Update the config file.  Graphite is not enabled by default as of the writing of this post.{
    graphitePort: 2003
    , graphiteHost: “”
    , port: 8125
    , backends: [ “statsd-librato-backend”, “./backends/graphite”  ]
    , debug: true
    , librato: {
    email: “”,
    token: “tokenFoundonLibratosWebsiteInYourAccount”

    This instance of statsd was implemented with a test of the librato metrics backend.  To install the librato backend you run the following

    cd /path/to/statsd
    $ npm install statsd-librato-backend

    If you’re not using librato, just remove the librato lines from the config and skip the npm install.

    Note that the debug: true is temporary while testing the setup.

  9. run the app:
    node stats.js /path/to/config

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s