Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a Redis SLOWLOG client #30

Merged
merged 1 commit into from
Apr 2, 2013
Merged

Conversation

inkel
Copy link
Contributor

@inkel 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.

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
@aphyr
Copy link
Collaborator

aphyr commented Apr 2, 2013

Neat idea. Thanks Inkel!

aphyr added a commit that referenced this pull request Apr 2, 2013
@aphyr aphyr merged commit a1d3e76 into riemann:master Apr 2, 2013
@inkel
Copy link
Contributor Author

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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants