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

[mongo] Adds metrics for collections #2739

Merged
merged 1 commit into from Aug 17, 2016
Merged

Conversation

gmmeyer
Copy link
Contributor

@gmmeyer gmmeyer commented Aug 8, 2016

What does this PR do?

This PR adds some additional metrics from collections. It will now collect the following metrics from each collection (from the database that you're collecting from):

mongodb.collection.indexSizes
mongodb.collection.size
mongodb.collection.avgObjSize
mongodb.collection.count
mongodb.collection.capped
mongodb.collection.max
mongodb.collection.maxSize
mongodb.collection.storageSize
mongodb.collection.nindexes

Motivation

Collection level metrics, like the amount of space that a collection is taking up, or the average object size, scoped to a specific collection, can be very important. If a certain collection is too large, maybe it should be split up. If the indexes on a collection are getting much, much larger than the others, maybe you want to split the collection. There are a lot of these things that can be important.

Testing Guidelines

It tests to see whether it works in the most basic sense.

@@ -355,6 +367,7 @@ class MongoDb(AgentCheck):
'durability': DURABILITY_METRICS,
'locks': LOCKS_METRICS,
'wiredtiger': WIREDTIGER_METRICS,
'collection': COLLECTION_METRICS,
Copy link
Contributor

Choose a reason for hiding this comment

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

Does it need to be in the default metrics as well ? Looks like it's processed differently, no ?

@remh
Copy link
Contributor

remh commented Aug 8, 2016

We should not do it for every collection by default. Can you do something similar to the postgres check where we list the tables we want more metrics on (here it would be the collections not the tables)

@degemer
Copy link
Member

degemer commented Aug 15, 2016

👍

@gmmeyer gmmeyer added this to the 5.9.0 milestone Aug 17, 2016
@gmmeyer gmmeyer merged commit c773611 into master Aug 17, 2016
@gmmeyer gmmeyer deleted the greg/mongodb-coll-metrics branch August 24, 2016 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants