Navigation
This version of the documentation is archived and no longer supported. To learn how to upgrade your version of MongoDB Ops Manager, refer to the upgrade documentation.
You were redirected from a different version of the documentation. Click here to go back.

Authentication Requirements

On-Prem MongoDB Management Service requires elevated privileges to collect complete data from MongoDB 2.4 instances with authentication enabled.

The following table lists the commands needed to grant the required permissions to the agent user. For an explanation of what each privilege role means, see: User Privilege Roles in MongoDB.

Important

To properly configure the agent user on a sharded cluster, you must create the user on the mongos and on each shard’s replica set primary.

This creates a local admin database with local credentials for each shard. See Sharded Cluster Security for a detailed discussion of access control privileges in sharded clusters.

  Single Server: in a mongo shell connected to the server, MongoDB Deployment: in a mongo shell connected to either the replica set primary or a mongos.
MMS Monitoring
use admin
db.addUser( { user: "agent",
              pwd: "Moon1234",
              roles: [ "clusterAdmin",
                       "readAnyDatabase"
                     ]
             } )
use admin
db.addUser( { user: "agent",
              pwd: "Moon1234",
              roles: [ "clusterAdmin",
                       "readAnyDatabase"
                     ]
             } )
MMS Monitoring with Database Profiling
use admin
db.addUser( { user: "agent",
              pwd: "Moon1234",
              roles: [ "clusterAdmin",
                       "readAnyDatabase",
                       "dbAdminAnyDatabase"
                     ]
             } )
use admin
db.addUser( { user: "agent",
              pwd: "Moon1234",
              roles: [ "clusterAdmin",
                       "readAnyDatabase",
                       "dbAdminAnyDatabase"
                     ]
             } )
MMS Monitoring without dbSats
use admin
db.addUser( { user: "agent",
              pwd: "Moon1234",
              roles: [ "clusterAdmin",
                     ]
             } )
use admin
db.addUser( { user: "agent",
              pwd: "Moon1234",
              roles: [ "clusterAdmin",
                     ]
             } )