-
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
Gather per collections stats in mongodb input plugin #6137
Conversation
}, | ||
}, col_stat_line) | ||
if err != nil { | ||
log.Println("E! Error getting col stats from " + col_name + "(" + err.Error() + ")") |
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.
Shouldn't fmt.Errorf be used here to return an error and prevent further execution?
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.
I think maybe a continue
so it continues adding other (likely valid) colls
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.
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.
Should we make that same change after line 162 as well?
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.
Yeah, also we need to do something on 155. Probably should move this into a function.
This PR add Mongodb input plugin per collection stats gathering.
It will discover collection in each database.
You can specify the databases you want to gather collection stats by setting the
col_stats_db
option.New metrics per collections are :
mongodb_col_stats
Related Issue : #5496
Required for all PRs: