If your MongoDB deployment enforces access control, the Ops Manager MongoDB Agent must authenticate to MongoDB as a user with the proper access.
The instructions on this page are for deployments that do not use Automation. If you use Automation, Ops Manager manages authentication for you and the following instructions do not apply.
To authenticate, create a user with the appropriate roles in MongoDB. The following tutorials include instructions and examples for creating the MongoDB Agent user in your MongoDB deployment:
To authenticate to sharded clusters, create shard-local users on each shard and create cluster-wide users:
Create shard-local users by connecting directly to the replica set for each shard.
Create cluster-wide users while connected to the mongos: these credentials persist to the config servers.
mongos process in your Ops Manager deployment
must use the same username and roles for the MongoDB Agent user.
To automate MongoDB instances, the MongoDB Agent must authenticate
admin database as a MongoDB user with the following roles:
To backup MongoDB instances, the MongoDB Agent must authenticate on the listed database as a MongoDB user with the required roles.
To monitor MongoDB instances, the MongoDB Agent must authenticate on the
admin database as a MongoDB user with the
To authenticate, create the user in MongoDB with the appropriate access. The authentication method that the MongoDB deployment uses determines which options to set when creating the user as well as determining any additional MongoDB Agent configuration:
For SCRAM authentication, see Configure MongoDB Agent for Authentication.
For LDAP authentication, see Configure MongoDB Agent for LDAP.
For Kerberos authentication, see Configure the MongoDB Agent for Kerberos.
For X.509 authentication, see Configure the MongoDB Agent for X.509 Authentication.