Reactive Scala Driver for MongoDB

Asynchronous & Non-Blocking

Monitoring

ReactiveMongo provides a mechanism to collect some metrics about MongoDB connections, that can be useful to monitor.

JMX

A JMX module is available.

When running with this module, you can check the state of the ReactiveMongo pools from outside the JVM, using a JMX client.

It can be enabled by adding the dependency as bellow.

"org.reactivemongo" %% "reactivemongo-jmx" % "1.0.0"

Using JConsole:

In order to monitor with jconsole, first start it and select the ReactiveMongo JVM.

JConsole startup

The following warning may be display when connecting to a JVM without SSL (e.g. for local JVMs).

JConsole warning

Once connected, you can select the “MBeans” tab on the top of JConsole, to check the beans managed in the JVM, including those representing the MongoDB nodes managed by ReactiveMongo.

JConsole Node MBean

Kamon

Kamon is an instrumentation and monitoring library for JVM application.

For projects where Kamon is set up, the module reactivemongo-kamon can to added as bellow, to collect metrics about the connection pools.

"org.reactivemongo" %% "reactivemongo-kamon" % "1.0.0"

Then the metrics can be configured in dashboards, according the used Kamon reporters. For example if using Kamon APM.

Create a graph in Kamon APM

Graph about established connections

The collected metrics are the following.

Pool metrics: (tagged by pool name)

Instana

Automatic ReactiveMongo Monitoring is part of Instana’s comprehensive microservices and cloud-native application monitoring solution.

See documentation

Suggest changes