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:
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
metric "messages.bad_lines_seen" and view the total number of bad lines seen in the messages since starting up your StatsD installation.
Get the total count of all the current gauges in your StatsD setup with the metric "gauges.count".
Get the total count of all the current timers in your StatsD setup with the metric "timers.count".
Get the total count of all the current counters in your StatsD setup with the metric "counters.count".
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.
- The plugin requires Python module "psycopg2" to fetch the statistics from the StatsD database.
StatsD plugin installation:
- 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 statsdsudo wget https://raw.githubusercontent.com/site24x7/plugins/master/statsd/statsd.py
- 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 statsdwget https://raw.githubusercontent.com/site24x7/plugins/master/statsd/statsd.ps1
For Linux users:
For Windows users:
StatsD plugin configuration:
- 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.
The below example is for a Linux installation
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")
- 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
World's leading companies