aphyr/riemann-tools — pull request #30 by inkel (2013-03-30 17:43:05+00:00)
Title: Add a Redis SLOWLOG client

The `riemann-redis-slowlog` client uses Redis' [`SLOGLOW`](http://redis.io/commands/slowlog) command in order to report those queries that exceeded a certain amount of time.

This client accepts the following CLI flags:

* `--redis-url, -d `: Redis URL (default: redis://127.0.0.1:6379/)
* `--redis-password, -r `: Redis password (default: "")
* `--slowlog-len, -s `: Number of SLOWLOG entries to get (default: 10)
* `--slowlog-reset, -o`: Reset SLOWLOG after querying it (default: false)

The Redis SLOWLOG format returns the id, timestamp, microseconds spent while executing the command and an array of command and arguments sent to the Redis server. This last array is sent as a Ruby inspect string in the `description` field.

The service indicated by this client is `redis`. The state is always `warning`, and the tags sent with the reported event are `redis` and `slowlog`.