StatsD install and config

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

Why StatsD?

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

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

Requirement

Node.js to 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 run on port 8125
  • StatsD Admin run on port 8126

Send metrics to StatsD

Start StatsD with it configuration file

Open an terminal and start sending metrics:

Those commands will not return any direct result.

StatsD console should display the received metrics:

This show two metrics received ‘statsd.metrics_received': 2
The value of the counter is ‘my.metric': 4

Go further !

Monitoring 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 database:

Monitor & detect anomalies with Anomaly.io

SIGN UP