MongoDB Logo

MongoDB

Visualize MongoDB performance metrics in real-time during load tests. The MongoDB monitoring module ships with pre-selected counters and thresholds.

Supported versions

MongoDB database servers version 3.4 and above are supported.

Configuration

MongoDB Configuration Wizard

The MongoDB monitor requires the following configuration:

  • Hostname: Database hostname,
  • Port: Database port (27017 by default),
  • Database: Database name to connect to,
  • Username and Password: Optional. In case MongoDB requires credentials to login.

Applications

MongoDB Applications

The MongoDB monitor supports monitor specific database collections. Most relevant counters are selected in the next step depending on the applications being selected.

Monitored Counters

MongoDB Counters

The MongoDB monitoring module collects the following metrics:

  • Asserts:

    • Threads Connected: The number of currently open connections equivalent to number of threads,
    • Regular Asserts/sec: The number of regular assertions raised since the MongoDB process started. Check the log file for more information about these messages,
    • Warning Asserts/sec: The number of warnings raised since the MongoDB process started. Check the log file for more information about these warnings,
    • Msg Asserts/sec: The number of message assertions raised since the MongoDB process started. Check the log file for more information about these messages,
    • User Asserts/sec: The number of “user asserts” that have occurred since the last time the MongoDB process started. These are errors that user may generate, such as out of disk space or duplicate key. You can prevent these assertions by fixing a problem with your application or deployment,
    • Rollover Asserts/sec: The number of times that the rollover counters have rolled over since the last time the MongoDB process started. The counters will rollover to zero after 230 assertions. Use this value to provide context to the other values in the asserts data structure,
  • Background Flushing:

    • Background Flushing Flushes/sec: The number of times the database has flushed all writes to disk. This value will grow as database runs for longer periods of time,
    • Background Flushing Total Ms: The total number of milliseconds (ms) that the mongod processes have spent writing (i.e. flushing) data to disk. Because total_ms is an absolute value, consider the flushes and average_ms values to provide context,
    • Background Flushing Average Ms: The average time in milliseconds for each flush to disk, calculated by dividing total_ms by flushes,
    • Background Flushing Last Ms: The amount of time, in milliseconds, that the last flush operation took to complete. Use this value to verify that the current performance of the server is in line with the historical data provided by backgroundFlushing.average_ms and backgroundFlushing.total_ms,
  • Connections:

    • Available Connections: The number of unused incoming connections available. Consider this value in combination with the value of connections.current to understand the connection load on the database, and the UNIX ulimit Settings document for more information about system thresholds on available connections,
    • Current Connections: The number of incoming connections from clients to the database server . This number includes the current shell session. Consider the value of connections.available to add more context to this datum,
    • TimedOut Connections: The total number of cursors that have timed out since the server process started. If this number is large or growing at a regular rate, this may indicate an application error,
  • Cursors:

    • Total Open Cursors: The number of cursors that MongoDB is maintaining for clients. Because MongoDB exhausts unused cursors, typically this value should be small or zero. However, if there is a queue, stale tailable cursors, or a large number of operations, this value may rise,
  • Collections:

    • {Collection}:

      • Namespace: The namespace of the current collection, which follows the format [database].[collection],
      • Objects Count: The number of objects or documents in this collection,
      • Total Size: The total size in memory of all records in a collection. This value does not include the record header, which is 16 bytes per record, but does include the record’s padding. Additionally size does not include the size of any indexes associated with the collection, which the totalIndexSize field reports,
      • Average Object Size: The average size of an object in the collection (plus any padding),
      • Average Storage Size: The total amount of storage allocated to this collection for document storage,
      • Num Extents: The total number of contiguously allocated data file regions. Only present when using the MMAPv1 storage engine,
      • Indexes Count: The number of indexes on the collection. All collections have at least one index on the _id field,
      • Total Index Size: The total size of all indexes,
      • Max Document Count: Shows the maximum number of documents that may be present in a capped collection,
      • Max Size: Shows the maximum size of a capped collection,
  • Statistics:

    • Database Name: Contains the name of the database,
    • Collections Count: Contains a count of the number of collections in that database,
    • Objects Count: Contains a count of the number of objects (i.e. documents) in the database across all collections,
    • Average Object Size: The average size of each document in Mbytes. This is the dataSize divided by the number of documents,
    • Data Size: The total size in Mbytes of the uncompressed data held in this database,
    • Storage Size: The total amount of space in bytes allocated to collections in this database for document storage,
    • Num Extents: Contains a count of the number of extents in the database across all collections,
    • Indexes: Contains a count of the total number of indexes across all collections in the database,
    • Indexes Size: The total size in Mbytes of all indexes created on this database,
    • File Size: The total size in Mbytes of the data files that hold the database. This value includes preallocated space and the padding factor. The value of fileSize only reflects the size of the data files for the database and not the namespace file,
    • NS Size: The total size of the namespace files (i.e. that end with .ns) for this database. You cannot change the size of the namespace file after creating a database, but you can change the default size for all new namespace files with the nsSize runtime option,
  • Journaling:

    • Commits: The number of transactions written to the journal during the last journal group commit interval,
    • Journaled (MB): The amount of data in megabytes (MB) written to journal during the last journal group commit interval,
    • Write To Data Files (MB): The amount of data in megabytes (MB) written from journal to the data files during the last journal group commit interval,
    • Compression Ratio: The compression ratio of the data written to the journal,
    • Commits In Write Lock: The count of the commits that occurred while a write lock was held. Commits in a write lock indicate a MongoDB node under a heavy write load and call for further diagnosis,
    • Dt: The amount of time, in milliseconds, over which MongoDB collected the dur.timeMS data. Use this field to provide context to the other dur.timeMS field values,
    • PrepLogBuffer/sec: The amount of time, in milliseconds, spent per second preparing to write to the journal. Smaller values indicate better journal performance,
    • Write To Journal/sec: The amount of time, in milliseconds, spent per second actually writing to the journal. File system speeds and device interfaces can affect performance,
    • Write To Data Files/sec: The amount of time, in milliseconds, spent per second writing to data files after journaling. File system speeds and device interfaces can affect performance,
    • Remap Private View/sec: The amount of time, in milliseconds, spent per second remapping copy-on-write memory mapped views. Smaller values indicate better journal performance,
    • Commits/sec: The amount of time, in milliseconds, spent per second for commits,
    • Commits In Write Lock /sec: The amount of time, in milliseconds, spent for commits that occurred while a write lock was held,
  • Extra Infos:

    • Page Faults/sec: The number of page faults per second. The extra_info.page_faults counter may increase dramatically during moments of poor performance and may correlate with limited memory environments and larger data sets. Limited and sporadic page faults do not necessarily indicate an issue,
  • Global Lock:

    • Total Time: The time, in microseconds, since the database last started and created the globalLock. This is roughly equivalent to total server uptime,
    • CurrentQueue Total: The total number of operations queued waiting for the lock (i.e., the sum of globalLock.currentQueue.readers and globalLock.currentQueue.writers),
    • CurrentQueue Readers: The number of operations that are currently queued and waiting for the read lock. A consistently small read-queue, particularly of shorter operations, should cause no concern,
    • CurrentQueue Writers: The number of operations that are currently queued and waiting for the write lock. A consistently small write-queue, particularly of shorter operations, is no cause for concern,
    • ActiveClients Total: The total number of active client connections to the database (i.e., the sum of globalLock.activeClients.readers and globalLock.activeClients.writers),
    • ActiveClients Readers: The number of the active client connections performing read operations,
    • ActiveClients Writers: The number of the active client connections performing write operations,
  • Memory:

    • Resident Memory: The value of mem.resident is roughly equivalent to the amount of RAM, in megabytes (MB), currently used by the database process. During normal use, this value tends to grow. In dedicated database servers, this number tends to approach the total amount of system memory,
    • Virtual Memory: mem.virtual displays the quantity, in megabytes (MB), of virtual memory used by the mongod process,
    • Supported Memory: A boolean that indicates whether the underlying system supports extended memory information. If this value is false and the system does not support extended memory information, then other mem values may not be accessible to the database server,
    • Mapped Memory: The amount of mapped memory, in megabytes (MB), by the database. Because MongoDB uses memory-mapped files, this value is likely to be to be roughly equivalent to the total size of your database or databases,
    • Mapped With Journal Memory: The amount of mapped memory, in megabytes (MB), including the memory used for journaling. This value will always be twice the value of mem.mapped. This field is only included if journaling is enabled,
  • Network:

    • MBytes In/sec: The number of Mbytes that reflects the amount of network traffic received by this database. Use this value to ensure that network traffic sent to the mongod process is consistent with expectations and overall inter-application traffic,
    • MBytes Out/sec: The number of Mbytes that reflects the amount of network traffic sent from this database. Use this value to ensure that network traffic sent by the mongod process is consistent with expectations and overall inter-application traffic,
    • Requests/sec: The number of distinct requests per second that the server has received. Use this value to provide context for the network.bytesIn and network.bytesOut values to ensure that MongoDB’s network utilization is consistent with expectations and application use,
  • Operations:

    • Reads/sec: The number of read operations per second,
    • Writes/sec: The number of write operations per second,
    • Query/sec: The number of query operations per second,
    • Insert/sec: The number of insert operations per second,
    • Update/sec: The number of update operations per second,
    • Delete/sec: The number of delete operations per second,
    • GetMore/sec: The number of getmore operations per second,
    • Command/sec: The number of command operations per second,
  • Replicated Operations:

    • Replicated Read/sec: The number of replicated read operations per second,
    • Replicated Write/sec: The number of replicated write operations per second,
    • Replicated Insert/sec: The number of replicated insert operations per second,
    • Replicated Query/sec: The number of replicated query operations per second.
    • Replicated Update/sec: The number of replicated update operations per second,
    • Replicated Delete/sec: The number of replicated delete operations per second,
    • Replicated GetMore/sec: The number of replicated getmore operations per second,
    • Replicated Command/sec: The number of command write operations per second,
  • Other:

    • MongoDB Hostname: Database hostname,
    • MongoDB Version: Database version,
    • Uptime: Uptime in seconds.