-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
MongoDB input plugin: Adding per DB stats #1466
Conversation
@sparrc does this look good? |
I've been on vacation and then gophercon so haven't had a chance to review yet, please be patient as I work through my backlog :) |
@@ -32,6 +33,7 @@ var sampleConfig = ` | |||
## mongodb://10.10.3.33:18832, | |||
## 10.0.0.1:10000, etc. | |||
servers = ["127.0.0.1:27017"] | |||
gather_db_stats = true (false by default) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change to gather_per_db_stats = false
(and delete the comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
@@ -10,6 +10,7 @@ | |||
## mongodb://10.10.3.33:18832, | |||
## 10.0.0.1:10000, etc. | |||
servers = ["127.0.0.1:27017"] | |||
gather_db_stats = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please change to gather_perdb_stats, so it's clear what this option is doing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Guys, we are trying to use gather_per_db stats in InfluxDB 1.0-beta3 and it keeps giving us this error:
Error parsing /apps/dftmongo/bin/telegraf/conf/telegraf.conf, line 50: field corresponding to gather_perdb_stats' is not defined in
*mongodb.MongoDB'
I thought the latest release notes for Telegraf 1.0-Beta3 said this feature was enabled. Any ideas?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that is incorrectly labelled in the changelog, sorry about that, it's not available yet
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry about that
@sparrc do you want me to update the changelog? where should i put it? in "v1.0 [unreleased]"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, that would be great, thx
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'll also need to rebase the changes so I can merge |
Done and rebased |
thanks @victorgp |
When I set gather_perdb_stats in conf file, I get following error, Error parsing /apps/dftmongo/bin/telegraf/conf/telegraf.conf, line 51: field corresponding to My conf file is, if I remove gather_perdb_stats it works ok. |
it's not in a release yet |
I'm adding stats per DB (configurable by gather_db_stats parameter) obtained with db.stats()
And stored in a different measurement called mongodb_db_stats because storing all these data in the same one ends up a big mess with null values everywhere.
Useful to see how each DB grow by size, indexes, number of collections, etc.