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

Redis: Adds support for checking length of more types #996

Merged
merged 1 commit into from Jul 14, 2014
Merged

Redis: Adds support for checking length of more types #996

merged 1 commit into from Jul 14, 2014

Conversation

Tenzer
Copy link
Contributor

@Tenzer Tenzer commented Jun 25, 2014

I saw the list length checking feature (#945) was added in the latest version of the check, and thought that I could add some of the code I have from a check I've made to do more or less the same. This adds support for checking other list-like types, namely sets, sorted sets and hashes.

Also, since a key disappears in Redis whenever a list-like item is emptied, it should send a value of 0 to Datadog instead of complaining of the key being missing.

…es as well.

Also, send 0 as the value in case the type is unsupported or doesn't exist.
@remh
Copy link
Contributor

remh commented Jun 25, 2014

Thanks a lot @Tenzer it looks great!

The only point is that if we set up a bad key name there won't be any raised error and it will just send 0 for that key length.

Maybe we should do something like if a key was not found X times in a row we should trigger a warning or something that would be cleared and wouldn't reappear if the key was found at least once ?

What do you think ?

@Tenzer
Copy link
Contributor Author

Tenzer commented Jun 25, 2014

In our own use case that wouldn't really work. We are using Redis as a store for Celery and the queue for Celery is a list in Redis. When the queue reaches 0 the key no longer exists in Redis terminology, and that shouldn't be a cause for an error in Datadog.

Making a setting for it on the instance in the configuration could perhaps be an option?

@remh
Copy link
Contributor

remh commented Jun 25, 2014

That would be a good compromise!
Thanks!

@remh remh added this to the 5.0 milestone Jun 26, 2014
@remh
Copy link
Contributor

remh commented Jul 14, 2014

Thanks a lot @Tenzer . I'll add the option to warn if the key is missing or not!

remh added a commit that referenced this pull request Jul 14, 2014
Redis: Adds support for checking length of more types
@remh remh merged commit 82d1e30 into DataDog:master Jul 14, 2014
@Tenzer Tenzer deleted the redis-length-types branch July 14, 2014 21:09
@Tenzer
Copy link
Contributor Author

Tenzer commented Jul 14, 2014

Thanks for merging. I'm sorry that I didn't get back on this, the last couple of weeks has been crazy busy for me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants