For AI agents: a documentation index is available at https://www.mongodb.com/docs/llms.txt — markdown versions of all pages are available by appending .md to any URL path.
Docs Menu

Cluster Parameters for a Self-Managed Deployment

You can use MongoDB cluster parameters to specify configuration options that affect all nodes in a replica set or sharded cluster.

To set cluster parameters for your deployment, run the following command on the admin database:

db.adminCommand( { setClusterParameter:{ <parameter>: <value> } } )

To view the current cluster parameter values, run the following command on the admin database:

db.adminCommand( { getClusterParameter: "*" } )

To learn more about setting and viewing cluster parameters, see setClusterParameter and getClusterParameter.

To modify cluster parameters, you must authenticate as a user that has one of the following roles:

MongoDB provides the following cluster parameters:

Name
Availability
Description

Atlas clusters and self-hosted deployments

Object that contains information on audit configurations from mongod and mongos server instances.

Atlas clusters and self-hosted deployments

An object that contains change stream configuration options.

You can only set changeStreamOptions on mongos or a replica set primary. The value is set cluster-wide.

Atlas clusters and self-hosted deployments

Specifies a cluster-wide default time limit in milliseconds for each individual read operation to complete. If a query specifies a maxTimeMS() option, that value overrides the defaultMaxTimeMS value.

defaultMaxTimeMS applies to the following read operations: