Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Add a Redis SLOWLOG client #30

Merged
merged 1 commit into from Apr 2, 2013

Conversation

Projects
None yet
2 participants
Contributor

inkel commented Mar 30, 2013

The riemann-redis-slowlog client uses Redis' SLOGLOW command in order to report those queries that exceeded a certain amount of time.

This client accepts the following CLI flags:

  • --redis-url, -d <s>: Redis URL (default: redis://127.0.0.1:6379/)
  • --redis-password, -r <s>: Redis password (default: "")
  • --slowlog-len, -s <i>: 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.

@inkel inkel Add a Redis SLOWLOG client
The `riemann-redis-slowlog` client uses Redis' SLOGLOW [1] command in
order to report those queries that exceeded a certain amount of time.

This client accepts the following CLI flags:

* --redis-url, -d <s>: Redis URL (default: redis://127.0.0.1:6379/)
* --redis-password, -r <s>: Redis password (default: "")
* --slowlog-len, -s <i>: 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`.

[1] http://redis.io/commands/slowlog
e00fd81
Collaborator

aphyr commented Apr 2, 2013

Neat idea. Thanks Inkel!

@aphyr aphyr added a commit that referenced this pull request Apr 2, 2013

@aphyr aphyr Merge pull request #30 from inkel/redis-slowlog-client
Add a Redis SLOWLOG client
a1d3e76

@aphyr aphyr merged commit a1d3e76 into riemann:master Apr 2, 2013

Contributor

inkel commented Apr 2, 2013

You're welcome! I'm glad you found it interesting for the project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment