StatsD Monitoring

Monitor the performance of your StatsD setup using Site24x7 plugin.

StatsD is a daemon developed and released by Etsy to aggregate and summarize application metrics. Configure our StatsD monitoring tool and troubleshoot all your StatsD performance issues and ensure a seemless application metric collection process.

This document details how to configure the StatsD plugin and the monitoring metrics for providing in-depth visibility into the performance, availability, and usage stats of StatsD servers.

StatsD performance monitoring metrics:

Take informed troubleshooting decisions by keeping track of critical metrics including:

Health

The metric health gives you the current health status of your StatsD setup. This metric helps in giving an overall picture of the availability and functioning of your StatsD installation.

Time before last message

The metric "messages.last_msg_seen" gives you the total number of elapsed seconds before your StatsD setup recieved a message.

Bad lines seen

Use the metric "messages.bad_lines_seen" and view the total number of bad lines seen in the messages since starting up your StatsD installation.

Gauges count

Get the total count of all the current gauges in your StatsD setup with the metric "gauges.count".

Timer count

Get the total count of all the current timers in your StatsD setup with the metric "timers.count".

Counter count

Get the total count of all the current counters in your StatsD setup with the metric "counters.count".

Uptime

Monitor your StatsD setup continously and record the total amount of time your StatsD server was functioning using the metric "uptime".

Graphite flush length

Get the total length of string sent to Graphite monitoring tool with the metric "graphite.flush_length".

Last Graphite exception

The metric "graphite.last_exception" gives you the Unix timestamp of the last exception thrown whilst flushing to graphite.

Graphite flush time

The metric "graphite.flush_time" gives you the time it takes to send data to graphite.

Last Graphite flush

The metric "graphite.last_flush" gives you the Unix timestamp of the last successful flush to graphite.

How it works?

  • Log-in to your Site24x7 account. Sign up here if you don't have one
  • Download and install the latest version of Site24x7 Linux agent
  • Install the StatsD plugin
  • The agent will execute the StatsD plugin and push the data to the Site24x7 server

Prerequisites:

  • The plugin requires Python module "psycopg2" to fetch the statistics from the StatsD database.

StatsD plugin installation:

    For Linux users:

  • Create a directory "statsd" under the Site24x7 Linux agent plugin directory - /opt/site24x7/monagent/plugins/
  • cd /opt/site24x7/monagent/plugins/
    sudo mkdir statsd
  • Download the file "statsd.py" from our GitHub repository and place it under the "statsd" directory
  • cd statsd
    sudo wget https://raw.githubusercontent.com/site24x7/plugins/master/statsd/statsd.py

    For Windows users:

  • In the Site24x7 Windows agent plugin directory - C:\Program Files\Site24x7\WinAgent\monitoring\Plugins\, create a directory "statsd"
  • cd C:\Program Files\Site24x7\WinAgent\monitoring\Plugins\
    mkdir statsd
  • Download the file "statsd.ps1" from our GitHub repository and place it under the "statsd" directory
  • cd statsd
    wget https://raw.githubusercontent.com/site24x7/plugins/master/statsd/statsd.ps1

StatsD plugin configuration:

    The below example is for a Linux installation

  • The default python path given in the plugin script is #!/usr/bin/python. If you wish to provide an alternate python path, replace the existing one preceded by the shebang character "#!".
  • Configure host and port values for the StatsD plugin
  • Eg :
    host = "localhost"
    port = "8126"
  • Save the changes and restart the agent.
  • /etc/init.d/site24x7monagent restart

Monitoring additional metrics:

  • To monitor additional metrics, edit the "statsd.py" file and add the new metrics that need monitoring
  • Increment the plugin version value in the file "statsd.py" to view the newly added metrics ( For e.g. Change the default plugin version from PLUGIN_VERSION = "1" to "PLUGIN_VERSION = "2")

Related plugins:

  • Redis plugin - Monitor performance metrics of your Redis databases
  • MongoDB plugin - Monitor performance metrics of your MongoDB databases
  • Memcached plugin - Analyze performance of your Memcached server
  • Nagios plugin - Execute thousands of Nagios plugins in Site24x7 without the need of running a Nagios server
  • Out-of-the-box plugins - Monitor your entire app stack with our extensive list of integrations
  • Create custom plugins - Create custom Linux and Windows plugins and monitor custom attributes
Trusted

World's leading companies

Client

Don't have a Site24x7 account? Sign up now!