MongoDB (local or remote monitoring) extension

  • Latest Dynatrace
  • Extension
  • Published Oct 27, 2025

Monitor your MongoDB servers either locally or remotely!

Get started

Overview

Connect your MongoDB servers either remotely and locally. A collective batch of data is gathered every minute by this extension and sent to the Dynatrace platform for detailed analysis.

Use cases

  • Monitor database traffic for optimization plan.
  • Monitor database operations with a comprehensive dashboard.
  • Take pre-emptive measures to avoid service degradations.

Requirements

  • Depending on your deployment, one of the folowing is true
    • Dynatrace OneAgent is installed on you MongoDB Server.
    • Dynatrace ActiveGate is installed and with network access to your MongoDB Server.
  • A MongoDB user with serverStatus@admin, listDatabases, and dbStats permissions. The MongoDB Built In Cluster Monitor Role has these permissions already set up.

Activation and setup

  1. Enable the extension via the Dynatrace Hub.
  2. Choose to monitor remotely via an ActiveGate group or locally via the OneAgent.
  3. Enter the configuration and credentials.
  4. Review the data in the included dashboard.

Details

Along with the username and password you can configure the extension to:

  • Use a different Authentication Database (sets the authSource property in the connection string).

  • Add a path to a CA PEM File (sets the tlsCAFile argument of the MongoClient).

  • Add a path to a Client Certificate (sets the tlsCertificateKeyFile of the MongoClient).

    These file paths need to be accessible on all ActiveGates in the group or locally on the OneAgent Host

  • Select between MongoDB Auth Mechanisms: SCRAM-SHA-1, SCRAM-SHA-256, PLAIN, DEFAULT.

    If no mechanism is specified, PyMongo will automatically use a default value depending on MondoDB version.

    • MondoDB version 3.6 SCRAM-SHA-1
    • MondoDB version 4.0+ SCRAM-SHA-1 or SCRAM-SHA-256

FAQ

What is the Custom Metric Usage of this extension?

The formula for consumption of the extension is: Per connected process/port: (17 + 5 * <# of Databases>)

Activating the extension locally consumes the included metrics per host unit.

Feature sets

When activating your extension using monitoring configuration, you can limit monitoring to one of the feature sets. To work properly the extension has to collect at least one metric after the activation.

In highly segmented networks, feature sets can reflect the segments of your environment. Then, when you create a monitoring configuration, you can select a feature set and a corresponding ActiveGate group that can connect to this particular segment.

All metrics that aren't categorized into any feature set are considered to be the default and are always reported.

A metric inherits the feature set of a subgroup, which in turn inherits the feature set of a group. Also, the feature set defined on the metric level overrides the feature set defined on the subgroup level, which in turn overrides the feature set defined on the group level.

wiredTiger
Metric nameMetric keyDescription
Cache - Pages Requestedmongodb.cache.pages_requestedNumber of pages reqeusted from the cache
Cache - Pages Readmongodb.cache.pages_readNumber of pages read into the cache
locks
Metric nameMetric keyDescription
Locks - Current Global Queuemongodb.locks.global_current_queueThe number of operations queued because of a lock.
Locks - Global Total Timemongodb.locks.global_total_timeThe time, in microseconds, since the database last started and created the globalLock. This is roughly equivalent to total server uptime.
Locks - Current Global Acquired Locksmongodb.locks.global_acquireNumber of times the lock was acquired in the specified mode.
Locks - Current Global Aqcuired Waitsmongodb.locks.global_acquire_waitNumber of times the lock acquisitions encountered waits because the locks were held in a conflicting mode.
Locks - Global Time Acquired (Microseconds)mongodb.locks.global_time_acquireCumulative wait time in microseconds for the lock acquisitions.
Locks - Current Global Deadlocksmongodb.locks.global_deadlocksNumber of times the lock acquisitions encountered deadlocks.
default
Metric nameMetric keyDescription
Current connectionsmongodb.current_connections
Available connectionsmongodb.available_connections
Insert operationsmongodb.insert_operations2.count
Query operationsmongodb.query_operations2.count
Update operationsmongodb.update_operations2.count
Delete operationsmongodb.delete_operations2.count
Getmore operationsmongodb.getmore_operations2.count
Command operationsmongodb.command_operations2.count
Resident memorymongodb.resident_memory
Virtual memorymongodb.virtual_memory
Current queuemongodb.current_queue
Active clientsmongodb.active_clients
Regular assertsmongodb.regular_asserts2.count
Warning assertsmongodb.warning_asserts2.count
Message assertsmongodb.message_asserts2.count
User assertsmongodb.user_asserts2.count
Rollover assertsmongodb.rollover_asserts2.count
Page Faultsmongodb.page_faultsThe total number of page faults
Uptimemongodb.uptimeThe number of seconds that the MongoDB process has been active.
Objectsmongodb.db.objects
Indexesmongodb.db.indexes
Data sizemongodb.db.db_data_size
Storage sizemongodb.db.db_storage_size
Index sizemongodb.db.db_index_size
replicaSet
Metric nameMetric keyDescription
Replica Set - Oplog Sizemongodb.rs.oplog_sizeThe range between the earliest and latest oplog entires
Replica Set - Oplog Windowmongodb.rs.oplog_windowThe time window covered by the oplog (Replication headroom)
Related tags
DatabasePythonNoSQLMongoDBApplication Observability