-
Notifications
You must be signed in to change notification settings - Fork 812
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 serverStatus
fails if auth
is enabled
#318
Comments
I've investigated this further. It appears (although it was unclear from the documentation) that the calls we're doing to gather mongo stats all require admin permissions. We probably just never noticed because if authentication is disabled or an admin user hasn't been configured, all connections to We should update the check to gather stats as per the following gist: https://gist.github.com/66bcd83207cfdd38b3e3 And we should update the instructions to have the user create a read-only admin account and use that in their connection string:
|
fixed in 019b9c5 |
Just ran into this. For me, I had to give the datadog user the additional role of "clusterMonitor" http://docs.mongodb.org/manual/reference/built-in-roles/ |
Just ran into this issue and using "devinrsmith" suggestion fixed it. Documentation should be updated in datadog. |
@gdelgado updated the external documentation first in DataDog/documentation@1832334 |
db.grantRolesToUser("datadog",[{ role: "clusterMonitor", db:"admin" }]) |
Thanks @devinrsmith. i have my db hosted on mLab and the Mongo version is 2.6:
mLab only suggests the working db name.... then using the mongo client: use admin |
Thank you @dimsamaras - the db.runCommand finally got the integration working for me. |
We use the
serverStatus
command to collect metrics from MongoDB.If authentication is enabled (that is,
auth = true
in themongod.conf
), this command fails with the following error:NOTE: If the agent is configured to connect to localhost and an admin user has never been created, everything will be fine because mongo allows admin connections to localhost in the absence of admin users. So, make sure you have an admin user to be able to reproduce this issue:
The text was updated successfully, but these errors were encountered: