setClusterParameter (original) (raw)

setClusterParameter

setClusterParameter is an administrative command for modifying values of cluster parameters. Cluster parameters are configurable parameters which affect all nodes in a replica set or sharded cluster.

You must issue the setClusterParameter command against the admindatabase.

This command is available in deployments hosted in the following environments:

Important

This command is not supported in MongoDB Atlas clusters. For information on Atlas support for all commands, see Unsupported Commands.


db.adminCommand(

   {

     setClusterParameter: { <parameter>: <value> }

   }

)

For the available cluster parameters, including examples, seeCluster Parameters for a Self-Managed Deployment.

When authentication is enabled, setClusterParameteronly works when authenticated as a user with a role that has access to the setClusterParameter action.

The parameter modifications made using setClusterParameterare persisted on replica sets and sharded clusters. This ensures that parameter modifications made using setClusterParameter survive restarts.

When using Stable API V1 with apiStrict set to true, you cannot usesetClusterParameter to modify cluster parameters.