Skip to content

Commit 1b623ce

Browse files
jocelyn-mendez1Jocelyn Mendez
andauthored
DOCS-15218 Exclude lower-level fields from serverStatus output (#1038)
* DOCS-15218 non-top-level fields excluded in serverStatus * DOCS-15218 non-top-level fields excluded in serverStatus * DOCS-15218 non-top-level fields excluded in serverStatus * DOCS-15218 nit change * DOCS-15218 internal review changes * DOCS-15218 internal review changes * DOCS-15218 internal review changes * DOCS-15218 internal review changes * DOCS-15218 internal review changes * DOCS-15218 tech changes * DOCS-15218 corrected backport version * DOCS-15218 updated nit languaged and behavior description Co-authored-by: Jocelyn Mendez <[email protected]>
1 parent 572efb5 commit 1b623ce

File tree

4 files changed

+19
-5
lines changed

4 files changed

+19
-5
lines changed

source/includes/extracts-server-status-projection-base.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ content: |
88
- :ref:`server-status-mirroredReads` document. (*Available starting in version 4.4*)
99
1010
To include fields that are excluded by default, specify the top-level
11-
field and set it to ``1`` in the command. To exclude fields that are
12-
included by default, specify the top-level field and set to ``0`` in
13-
the command.
11+
field and set it to ``1`` in the command. To exclude fields that are included
12+
by default, specify the field and set to 0. You can specify either top-level
13+
or embedded fields.
1414
...

source/reference/command.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.. _database-commands:
1+
4.. _database-commands:
22

33
=================
44
Database Commands

source/reference/command/serverStatus.txt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,21 @@ Behavior
6161

6262
.. include:: /includes/extracts/serverStatus-command-projection.rst
6363

64-
For example, the following operation suppresses the ``repl``,
64+
For example, the following operation excludes the ``repl``,
6565
``metrics`` and ``locks`` information in the output.
6666

6767
.. code-block:: javascript
6868

6969
db.runCommand( { serverStatus: 1, repl: 0, metrics: 0, locks: 0 } )
7070

71+
72+
For example, the following operation excludes the embedded ``histogram``
73+
field in the output.
74+
75+
.. code-block:: javascript
76+
77+
db.runCommand( { serverStatus: 1, metrics: { query: { multiPlanner: { histograms: false } } } } )
78+
7179
The following example includes
7280
all :ref:`server-status-repl` information in the output:
7381

source/release-notes/6.0.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,12 @@ Starting in MongoDB 6.0, you can use :ref:`change streams
106106
after changes (the document pre- and post-images). For examples, see
107107
:ref:`db.collection.watch-change-streams-pre-and-post-images-example`.
108108

109+
Exclude Embedded Fields in ``serverStatus`` Output
110+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
111+
112+
Starting in MongoDB 6.0 (and 5.0.9, 4.4.15), you can exclude embedded fields
113+
from the :dbcommand:`serverStatus` output.
114+
109115
Connections
110116
~~~~~~~~~~~
111117

0 commit comments

Comments
 (0)