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

Implements #945: monitor Redis key lengths #962

Merged
merged 2 commits into from
Jun 6, 2014
Merged

Conversation

LeoCavaille
Copy link
Member

Using the 'keys' parameter with a list of key names (e.g. 'testkey')
in one Redis instance adds a metric 'redis.key.length' where list
lengths are reported using the LLEN command and they are tagged with
their names (e.g. tag 'key:testkey').

Using the 'keys' parameter with a list of key names (e.g. 'testkey')
in one Redis instance adds a metric 'redis.key.length' where list
lengths are reported using the LLEN command and they are tagged with
their names (e.g. tag 'key:testkey').
@@ -177,6 +177,16 @@ def _check_db(self, instance, custom_tags=None):
self.rate('redis.net.commands', info['total_commands_processed'],
tags=tags)

# Check some key lengths if asked
if instance.get('keys') is not None:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you check that it's actually a list ? and maybe raise a warning (using self.warning) if it's not and skip the key length collection ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@remh
Copy link
Contributor

remh commented Jun 6, 2014

👍

remh added a commit that referenced this pull request Jun 6, 2014
Implements #945: monitor Redis key lengths
@remh remh merged commit d5f8ee3 into master Jun 6, 2014
@remh remh deleted the leo/rediskeyslength branch June 23, 2014 21:26
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.

3 participants