Skip to content

Small program for piping Redis stats to (Dog)StatsD

Notifications You must be signed in to change notification settings

keenlabs/redis-statsd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 

Repository files navigation

redis-statsd

redis-statsd is a small, dependency free Python program for periodically fetching stats via Redis' INFO command and emitting them to a local StatsD.

Motivation

At Keen we run some Redis instances in Mesos with dynamically allocated ports. We use Datadog and therefore have an on-box StatsD instance to report to. Therefore this little program can be started with a dynamic port and report metrics out to DogStatsD!

Docker

A public docker image is available on docker hub.

Notes

A Word On Counters

Values that are counters in the stats from Redis are converted in to deltas by this program, since that's what StatsD expects.

Optional DogStatsD Tag Support

The --no-tags option will disable support for DogStatsD-style tags.

Usage

usage: redis-statsd.py [-h] [--period PERIOD] [--prefix PREFIX]
                       [--redis-host REDIS_HOST] [--redis-port REDIS_PORT]
                       [--statsd-host STATSD_HOST] [--statsd-port STATSD_PORT]
                       [--no-tags]

Collect metrics from Redis and emit to StatsD

optional arguments:
  -h, --help            show this help message and exit
  --period PERIOD       The period at which to collect and emit metrics
  --prefix PREFIX       The prefix to use for metric names
  --redis-host REDIS_HOST
                        The address of the Redis host to connect to
  --redis-port REDIS_PORT
                        The port of the Redis host to connect to
  --statsd-host STATSD_HOST
                        The port of the StatsD host to connect to
  --statsd-port STATSD_PORT
                        The port of the Redis port to connect to
  --no-tags             Disable tags for use with DogStatsD

About

Small program for piping Redis stats to (Dog)StatsD

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages