@@ -16,25 +16,27 @@ Definition
16
16
.. dbcommand:: getClusterParameter
17
17
18
18
:dbcommand:`getClusterParameter` is an administrative command for
19
- retrieving the values of **cluster parameters**. Cluster parameters
20
- are configurable parameters which affect all nodes in a sharded cluster.
21
-
22
- To run ``getClusterParameter``, use the ``db.adminCommand( { command } )``
19
+ retrieving the values of **cluster parameters**. Cluster parameters
20
+ are configurable parameters that affect all nodes in a sharded cluster.
21
+
22
+ To run ``getClusterParameter``, use the ``db.adminCommand( { command } )``
23
23
method.
24
-
24
+
25
+ .. include:: /includes/fact-getClusterParameter-availability.rst
26
+
25
27
Syntax
26
28
------
27
-
29
+
28
30
The command has the following syntax:
29
31
30
32
.. code-block:: javascript
31
-
32
- db.adminCommand(
33
- {
34
- getClusterParameter: <parameter> | [<parameter>, <parameter>] | "'*'"
33
+
34
+ db.adminCommand(
35
+ {
36
+ getClusterParameter: <parameter> | [<parameter>, <parameter>] | "'*'"
35
37
}
36
38
)
37
-
39
+
38
40
Command Fields
39
41
--------------
40
42
@@ -54,28 +56,28 @@ The command takes the following fields:
54
56
55
57
- The name of the parameter you want to retrieve.
56
58
57
- - An array with the names of multiple parameters.
59
+ - An array with the names of multiple parameters.
58
60
59
61
- ``'*'``, to return values for all parameters available to
60
62
``getClusterParameter``.
61
-
63
+
62
64
Behavior
63
65
--------
64
66
65
- - You can only run ``getClusterParameter`` on the ``admin`` database. If
67
+ - You can only run ``getClusterParameter`` on the ``admin`` database. If
66
68
you run the command on any other database, MongoDB returns an error.
67
69
68
- - You can run ``getClusterParameter`` on any node in a replica set or
70
+ - You can run ``getClusterParameter`` on any node in a replica set or
69
71
sharded cluster.
70
72
71
- - When you run ``getClusterParameter`` on :binary:`~bin.mongod`,
72
- ``getClusterParameter`` returns cached parameter values.
73
+ - When you run ``getClusterParameter`` on :binary:`~bin.mongod`,
74
+ ``getClusterParameter`` returns cached parameter values.
73
75
74
- - When you run ``getClusterParameter`` on :binary:`~bin.mongos`,
75
- ``getClusterParameter`` returns the :term:`durable` value of the
76
- cluster parameter from the :ref:`config server <sharding-config-server>`
76
+ - When you run ``getClusterParameter`` on :binary:`~bin.mongos`,
77
+ ``getClusterParameter`` returns the :term:`durable` value of the
78
+ cluster parameter from the :ref:`config server <sharding-config-server>`.
77
79
78
- Accesss Control
80
+ Access Control
79
81
~~~~~~~~~~~~~~~
80
82
81
83
When :ref:`authentication <authentication>` is enabled, ``getClusterParameter``
@@ -85,23 +87,23 @@ only works when authenticated as a user with a role that has access to the
85
87
Examples
86
88
--------
87
89
88
- .. note::
90
+ .. note::
89
91
90
- The output of the following examples may vary depending on the specific
92
+ The output of the following examples may vary depending on the specific
91
93
configuration of the running MongoDB deployment.
92
94
93
95
Retrieve Single Cluster Parameter
94
96
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
95
97
96
- The following operation runs ``getClusterParameter`` on the ``admin``
97
- database using a value of ``hostName`` to retrieve the value for
98
+ The following operation runs ``getClusterParameter`` on the ``admin``
99
+ database using a value of ``hostName`` to retrieve the value for
98
100
a hypothetical cluster parameter named ``hostName``:
99
101
100
102
.. code-block:: javascript
101
-
103
+
102
104
use admin
103
105
db.adminCommand( { getClusterParameter : "hostName" } )
104
-
106
+
105
107
106
108
Retrieve Multiple Cluster Parameters
107
109
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -123,7 +125,7 @@ The following operation runs ``getClusterParameter`` with a value of
123
125
``'*'`` to retrieve the values from all cluster parameters:
124
126
125
127
.. code-block:: javascript
126
-
128
+
127
129
use admin
128
130
db.adminCommand( { getClusterParameter : '*' } )
129
131
0 commit comments