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

Additional derived Redis metrics #1015

Merged
merged 2 commits into from
Jul 7, 2014
Merged

Conversation

wisq
Copy link

@wisq wisq commented Jul 3, 2014

We run a bunch of Redis DBs, and some of them are meant for ephemeral data, over 99.9% of which should have a TTL set. There are several thousand keys that do not, but these are a tiny portion of the database. Should that portion ever increase, we'd like to alert, because it indicates that something is wrong and we're filling our ephemeral store up with non-ephemeral data.

While the current Redis monitoring does let us track the total number of keys and the number of keys with TTLs, Datadog does not (to our knowledge) currently let us alert on a mathematically derived figure, such as the total number of persistent keys (i.e. total keys minus keys with TTLs) or the percentage of keys that are persistent / will expire.

This PR adds three new figures:

  • redis.persistredis.keys minus redis.expires
  • redis.persist.percentredis.persist as a percentage of redis.keys
  • redis.expires.percentredis.expires as a percentage of redis.keys

If there's a way to alert on these derived values, we'd love to hear it; similarly, if this PR is accepted and then alerting on derived values is later added, this can of course be reverted. But for now, this is the code we're using, and we're happy to contribute it back if you think it's useful.

Peer Allan added 2 commits July 3, 2014 14:03
Allows tracking the percentage difference between keys and expired keys so that you can create alerts on that value in Datadog.
@remh
Copy link
Contributor

remh commented Jul 7, 2014

Thanks a lot! It looks great!

remh added a commit that referenced this pull request Jul 7, 2014
@remh remh merged commit fdb21bb into DataDog:master Jul 7, 2014
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.

None yet

2 participants