Skip to content

Commit 8c2877f

Browse files
committed
Fixes
1 parent 63a2acc commit 8c2877f

File tree

1 file changed

+21
-23
lines changed

1 file changed

+21
-23
lines changed

source/monitoring.txt

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ To monitor command events, create a class that implements the
8181
``CommandListener`` interface and register an instance of that class with your
8282
``MongoClient`` instance.
8383

84-
For more information about MongoDB database commands, see :manual:`</reference/command/>`
84+
For more information about MongoDB database commands, see :manual:`Database Commands </reference/command/>`
8585
in the {+mdb-server+} manual.
8686

8787
.. note:: Internal Commands
@@ -135,9 +135,11 @@ counter.
135135
:language: java
136136
:start-after: start-monitor-command-example
137137
:end-before: end-monitor-command-example
138+
:dedent:
138139

139140
.. output::
140-
141+
:visible: false
142+
141143
{find=1}
142144
{find=2}
143145
{find=2, endSessions=1}
@@ -153,10 +155,10 @@ The driver defines nine SDAM events. The driver divides these nine events
153155
between three separate listener interfaces which each listen for three of the
154156
nine events. Here are the three interfaces and the events they listen for:
155157

156-
- ``ClusterListener``: :spec:`topology </server-discovery-and-monitoring/server-discovery-and-monitoring.md#topology>`
157-
related events
158+
- ``ClusterListener``: :spec:`topology </server-discovery-and-monitoring/server-discovery-and-monitoring.md#topology>`-related
159+
events
158160
- ``ServerListener``: events related to ``mongod`` or ``mongos`` processes
159-
- ``ServerMonitorListener``: heartbeat related events
161+
- ``ServerMonitorListener``: heartbeat-related events
160162

161163
To monitor a type of SDAM event, write a class that
162164
implements one of the three preceding interfaces and register an instance of that
@@ -172,7 +174,7 @@ For a detailed description of each SDAM event in the driver, see the
172174
Example
173175
^^^^^^^
174176

175-
This example shows how to make a listener class that prints a message that lets
177+
The following example shows how to make a listener class that prints a message that lets
176178
you know if the driver can write to your MongoDB instance.
177179

178180
The following code defines the ``IsWritable`` class which implements the
@@ -199,16 +201,10 @@ The following code adds an instance of the ``IsWritable`` class to a
199201
:dedent:
200202

201203
.. output::
204+
:visible: false
202205

203206
Able to write to server
204207

205-
- `ClusterListener <{+api+}/apidocs/mongodb-driver-core/com/mongodb/event/ClusterListener.html>`__
206-
- `ServerListener <{+api+}/apidocs/mongodb-driver-core/com/mongodb/event/ServerListener.html>`__
207-
- `ServerMonitorListener <{+api+}/apidocs/mongodb-driver-core/com/mongodb/event/ServerMonitorListener.html>`__
208-
- `MongoClientSettings <{+api+}/apidocs/mongodb-driver-core/com/mongodb/MongoClientSettings.html>`__
209-
- `MongoClient <{+api+}/apidocs/mongodb-driver-sync/com/mongodb/client/MongoClient.html>`__
210-
- `ClusterDescriptionChangedEvent <{+api+}/apidocs/mongodb-driver-core/com/mongodb/event/ClusterDescriptionChangedEvent.html>`__
211-
212208
Connection Pool Events
213209
~~~~~~~~~~~~~~~~~~~~~~
214210

@@ -252,6 +248,7 @@ librarian.
252248
:dedent:
253249

254250
.. output::
251+
:visible: false
255252

256253
Let me get you the connection with id 21...
257254

@@ -324,8 +321,8 @@ following resources from Oracle:
324321
JMX and JConsole Example
325322
~~~~~~~~~~~~~~~~~~~~~~~~
326323

327-
This example shows how you can monitor the driver's connection pools using JMX
328-
and **JConsole**. JConsole is a JMX compliant GUI monitoring tool that comes with
324+
The following example shows how you can monitor the driver's connection pools using JMX
325+
and **JConsole**. JConsole is a JMX-compliant GUI monitoring tool that comes with
329326
the Java Platform.
330327

331328
.. tip:: Consult the Official JMX and JConsole Documentation
@@ -334,7 +331,7 @@ the Java Platform.
334331
rather than a source of truth. For guaranteed up to date information, consult
335332
the following official Oracle resources:
336333

337-
- `JConsole documentation <https://www.oracle.com/technical-resources/articles/java/jconsole.html>`__.
334+
- `JConsole documentation <https://www.oracle.com/technical-resources/articles/java/jconsole.html>`__
338335
- `JMX documentation <https://docs.oracle.com/javase/tutorial/jmx/index.html>`__
339336

340337
The following code snippet adds a ``JMXConnectionPoolListener`` to a
@@ -351,6 +348,7 @@ navigate to JConsole and inspect your connection pools.
351348
:dedent:
352349

353350
.. output::
351+
:visible: false
354352

355353
Navigate to JConsole to see your connection pools...
356354

@@ -377,7 +375,7 @@ following:
377375
For more information about JMX and JConsole, see the following resources from
378376
Oracle:
379377

380-
- `JConsole Documentation <https://www.oracle.com/technical-resources/articles/java/jconsole.html>`__.
378+
- `JConsole Documentation <https://www.oracle.com/technical-resources/articles/java/jconsole.html>`__
381379
- `Monitoring and Management Guide <https://docs.oracle.com/en/java/javase/16/management/monitoring-and-management-using-jmx-technology.html>`__
382380

383381
For more information about the ``JMXConnectionPoolListener`` class, see
@@ -420,14 +418,14 @@ API Documentation
420418
For more information about the classes and methods mentioned in this document, see
421419
the following API Documentation:
422420

423-
- `MongoClient <{+api+}/mongodb-driver-sync/com/mongodb/client/MongoClient.html>`__
421+
- `MongoClients <{+api+}/mongodb-driver-reactivestreams/com/mongodb/reactivestreams/client/MongoClients.html>`__
424422
- `MongoClientSettings <{+api+}/mongodb-driver-core/com/mongodb/MongoClientSettings.html>`__
425423
- `CommandListener <{+api+}/mongodb-driver-core/com/mongodb/event/CommandListener.html>`__
426424
- `CommandStartedEvent <{+api+}/mongodb-driver-core/com/mongodb/event/CommandStartedEvent.html>`__
427425
- `CommandSucceededEvent <{+api+}/mongodb-driver-core/com/mongodb/event/CommandSucceededEvent.html>`__
428426
- `CommandFailedEvent <{+api+}/mongodb-driver-core/com/mongodb/event/CommandFailedEvent.html>`__
429-
- `ClusterListener <{+api+}/apidocs/mongodb-driver-core/com/mongodb/event/ClusterListener.html>`__
430-
- `ClusterDescriptionChangedEvent <{+api+}/apidocs/mongodb-driver-core/com/mongodb/event/ClusterDescriptionChangedEvent.html>`__
431-
- `ConnectionPoolListener <{+api+}/apidocs/mongodb-driver-core/com/mongodb/event/ConnectionPoolListener.html>`__
432-
- `ConnectionCheckedOutEvent <{+api+}/apidocs/mongodb-driver-core/com/mongodb/event/ConnectionCheckedOutEvent.html>`__
433-
- `ConnectionCheckOutFailedEvent <{+api+}/apidocs/mongodb-driver-core/com/mongodb/event/ConnectionCheckOutFailedEvent.html>`__
427+
- `ClusterListener <{+api+}/mongodb-driver-core/com/mongodb/event/ClusterListener.html>`__
428+
- `ClusterDescriptionChangedEvent <{+api+}/mongodb-driver-core/com/mongodb/event/ClusterDescriptionChangedEvent.html>`__
429+
- `ConnectionPoolListener <{+api+}/mongodb-driver-core/com/mongodb/event/ConnectionPoolListener.html>`__
430+
- `ConnectionCheckedOutEvent <{+api+}/mongodb-driver-core/com/mongodb/event/ConnectionCheckedOutEvent.html>`__
431+
- `ConnectionCheckOutFailedEvent <{+api+}/mongodb-driver-core/com/mongodb/event/ConnectionCheckOutFailedEvent.html>`__

0 commit comments

Comments
 (0)