StatsD Installation and Configuration

StatsD install
StatsD is a statistic aggregation tool written in node.js. It is a simple, yet powerful, tool for counting and timing when monitoring. StatsD makes it very easy to monitor your own code.

Why StatsD?

In the DevOps world, it is crucial to record and monitor everything. Network, machine, and third party apps can be monitored using CollectD.

But how do you monitor your own code? That is where StatsD comes in. It helps you monitor your code in an easy and flexible way. When you want to track something in your code, just call StatsD: it will produce metrics for you.

Requirements

Node.js must be installed.

On Debian / Ubuntu:

On CentOS / Fedora:

On Mac OS X with brew:

Download node.js install for Windows and MacOSX.

Install StatsD

First download StatsD from GitHub.
Then create a configuration file

Edit config.js to look like:

  • StatsD runs on port 8125
  • StatsD Admin runs on port 8126

Send Metrics to StatsD

Start StatsD with its configuration file

Open a terminal and start sending metrics:

Note that these commands will not return any direct result.

The StatsD console should display the received metrics:

This shows two metrics received – “statsd.metrics_received”: 2
The value of the counter is “my.metric”: 4

Go Further!

Monitor your own code with StatsD:

  • StatsD in Java
  • StatsD in Python
  • StatsD in PHP
  • StatsD with other programming languages

StatsD is usually used with other software or databases:

Monitor & detect anomalies with Anomaly.io

SIGN UP