IMPORTANT!
This legacy integration is set to reach end-of-life in 2024: we'll add a specific EOL date when we know it. We recommend using our newer MongoDB integration. For information on switching from the legacy integration to the new one, see our migration docs.
Our legacy MongoDB integration collects and sends inventory and metrics from your MongoDB cluster to our platform, where you can aggregate and visualize key performance metrics. We collect data on mongos
and mongod
instances, config servers, as well as on databases and collections to help pinpoint performance bottlenecks.
Compatibility and requirements
This legacy integration is compatible with MongoDB v3 and v4. Our newer MongoDB integration supports newer versions.
Before installing this legacy integration, make sure that you meet the following requirements:
- A New Relic account. Don't have one? Sign up for free! No credit card required.
- MongoDB user with
clusterMonitor
andlistCollections
roles. - If MongoDB is not running on Kubernetes or Amazon ECS, you must install the infrastructure agent on a host that's running MongoDB. Otherwise:
- If running on Kubernetes, see these requirements.
- If running on ECS, see these requirements.
Install and activate
If you want to install our legacy MongoDB integration, follow the instructions for your environment:
Install the infrastructure agent, and replace the
INTEGRATION_FILE_NAME
variable withnri-mongodb
.Change directory to the integrations folder:
cd /etc/newrelic-infra/integrations.dCopy of the sample configuration file:
sudo cp mongodb-config.yml.sample mongodb-config.ymlEdit the
mongodb-config.yml
file as described in the configuration settings.To enable automatic MongoDB error log parsing and forwarding, copy (or rename) the
mongodb-log.yml.example
file tomongodb-log.yml
. No need to restart the agent.Example:
sudo cp /etc/newrelic-infra/logging.d/mongodb-log.yml.example /etc/newrelic-infra/logging.d/mongodb-log.yml
Download the
nri-mongodb
.MSI installer image from:To install from the Windows command prompt, run:
msiexec.exe /qn /i PATH\TO\nri-mongodb-amd64.msiIn the Integrations directory,
C:\Program Files\New Relic\newrelic-infra\integrations.d\
, create a copy of the sample configuration file by running:cp mongodb-config.yml.sample mongodb-config.ymlEdit the
mongodb-config.yml
configuration file using the configuration settings.
Additional notes:
- Advanced: Integrations are also available in tarball format to allow for install outside of a package manager.
- On-host integrations do not automatically update. For best results, regularly update the integration package and the infrastructure agent.
Configuration
Enabling your MongoDB server
In the MongoDB shell, execute the following commands to create a listCollections
role and a new user. Then, assign clusterMonitor
and listCollections
roles to the new user. Note: Replace username, password, and similar user-specific values.
See the MongoDB documentation for details on creating users and roles.
Tip
Complete these steps on the mongos to be monitored. If mongod-level metrics are to be collected, such as host or replica set statistics, create the role and user on each mongod as well.
In the MongoDB shell, enter
use admin
.Use the following command to create the
listCollections
role.db.createRole({role: "listCollections",privileges: [{resource: {db:"",collection:""},actions: ["listCollections"]}],roles: []})Use the following commands to create a new user, and assign
clusterMonitor
andlistCollections
roles to the user.db.createUser({user: "username",pwd: "password",roles: ["clusterMonitor","listCollections"]})
Did this doc help with your installation?
Configure the integration
There are several ways to configure the integration, depending on how it was installed:
- If enabled via Kubernetes: see Monitor services running on Kubernetes.
- If enabled via Amazon ECS: see Monitor services running on ECS.
- If installed on-host: edit the config in the integration's YAML config file,
mongodb-config.yml
.
An integration's YAML-format configuration is where you can place required login credentials and configure how data is collected. Which options you change depend on your setup and preference.
The configuration file has common settings applicable to all integrations, such as interval
, timeout
, inventory_source
. To read all about these common settings, refer to our Configuration Format document.
Important
If you're still using our legacy configuration/definition files, please see standard configuration format for help.
Specific settings related to MongoDB are defined using the env
section of the configuration file. These settings control the connection to your MongoDB instance as well as other security settings and features. The list of valid settings is described in the next section of this document.
The MongoDB integration can be configured to monitor either a full MongoDB cluster or a standalone MongoDB instance. To monitor a cluster, the host
and port
arguments should point to one of the mongos
instances in your cluster. If you want to monitor a standalone instance, make sure host
and port
point to the mongod
running the database.
Tip
SCRAM authentication isn't supported.
MongoDB instance settings
The MongoDB integration collects both metrics and inventory information. In the following table, see the Applies To column for the settings available to each collection.
The values for these settings can be defined in several ways:
- Adding the value directly in the config file. This is the most common way.
- Replacing the values from environment variables using the
{{}}
notation. This requires infrastructure agent v1.14.0 or higher. For more information, see our documentation about passthrough, or see the replacement example. - Using secrets management. Use this to protect sensitive information, such as passwords that would be exposed in plain text on the configuration file. For more information, see Secrets management.
Setting | Description | Applies to |
---|---|---|
MONGODB_CLUSTER_NAME | User-defined name to uniquely identify the cluster being monitored. Required. | Metrics/Inventory |
HOST | Hostname or IP where MongoDB is running. Default is | Metrics/Inventory |
PORT | Port on which MongoDB is listening. Default is 27017. | Metrics/Inventory |
USERNAME | Username for accessing MongoDB server. | Metrics/Inventory |
PASSWORD | Password for the given user. | Metrics/Inventory |
AUTH_SOURCE | The database to authenticate against. Default is | Metrics/Inventory |
SSL | Use SSL when communicating with the MongoDB server. Default is | Metrics/Inventory |
SSL_CA_CERTS | Location of SSL certificate on the host. Only required if | Metrics/Inventory |
SSL_INSECURE_SKIP_VERIFY | Skip the verification of the server's certificate chain and hostname. Default is | Metrics/Inventory |
PEM_KEY_FILE | Location of PEM file containing Private Key and Client Certificate. | Metrics/Inventory |
PASSPHRASE | Passphrase to decrypt | Metrics/Inventory |
CONCURRENT_COLLECTIONS | Number of entities to collect metrics for concurrently. Default is 50. | Metrics |
FILTERS | A JSON map of database names to an array of collection names. If empty, defaults to all databases and collections. | Metrics |
METRICS | Set to | |
INVENTORY | Set to |
Labels and custom attributes
You can further decorate your metrics using labels. Labels allow you to add key/value pair attributes to your metrics, which you can then use to query, filter, or group your metrics on.
Our default sample config file includes examples of labels; however, as they are not mandatory, you can remove, modify, or add new ones of your choice.
labels: env: production role: load_balancer
Example configurations
This is the basic configuration used to collect metrics and inventory from your localhost:
integrations: - name: nri-mongodb env: CLUSTER_NAME: my_cluster HOST: localhost PORT: 27017 USERNAME: mongodb_user PASSWORD: mongodb_password interval: 15s labels: environment: production inventory_source: config/mongodb
This configuration collects metrics every 15 seconds and inventory every 60 seconds:
integrations: - name: nri-mongodb env: METRICS: true CLUSTER_NAME: my_cluster HOST: localhost PORT: 27017 USERNAME: mongodb_user PASSWORD: mongodb_password interval: 15s labels: environment: production
- name: nri-mongodb env: INVENTORY: true CLUSTER_NAME: my_cluster HOST: localhost PORT: 27017 USERNAME: mongodb_user PASSWORD: mongodb_password interval: 60s labels: environment: production inventory_source: config/mongodb
In this configuration we're using the environment variable MONGODB_HOST
to populate the HOST setting of the integration:
integrations: - name: nri-mongodb env: METRICS: "true" CLUSTER_NAME: my_cluster HOST: {{MONGODB_HOST}} PORT: 27017 USERNAME: mongodb_user PASSWORD: mongodb_password interval: 15s labels: env: production role: load_balancer
In this configuration we're using filters to narrow down the databases and collections we monitor. With this sample filter the integration will collect:
db1
database metrics and all its collections. Usenull
to collect all collections from a databasedb2
database metrics and metrics forcollection1
andcollection2
db3
database metrics and no collection metrics. Use an empty array[]
if you want to skip collection metricsintegrations:- name: nri-mongodbenv:METRICS: "true"CLUSTER_NAME: my_clusterHOST: localhostPORT: 27017USERNAME: mongodb_userPASSWORD: mongodb_passwordFILTERS: '{"db1":null,"db2":["collection1","collection2"],"db3:":[]}'interval: 15slabels:env: productionrole: load_balancer
In this configuration we're monitoring multiple MongoDB servers from the same integration. For the first instance (HOST: 1st_mongodb_host
) we're collecting metrics and inventory while for the second instance (HOST: 2nd_mongodb_host
) we'll only collect metrics.
integrations: - name: nri-mongodb env: METRICS: "true" CLUSTER_NAME: my_cluster HOST: 1st_mongodb_host PORT: 27017 USERNAME: mongodb_user PASSWORD: mongodb_password interval: 15s labels: env: production role: load_balancer - name: nri-mongodb env: INVENTORY: "true" CLUSTER_NAME: my_cluster HOST: 1st_mongodb_host PORT: 27017 USERNAME: mongodb_user PASSWORD: mongodb_password interval: 60s labels: env: production role: load_balancer inventory_source: config/mongodb
- name: nri-mongodb env: METRICS: "true" CLUSTER_NAME: my_2nd_cluster HOST: 2nd_mongodb_host PORT: 27017 USERNAME: mongodb_user PASSWORD: mongodb_password interval: 15s labels: env: production role: load_balancer
Find and use data
Data from this service is reported to an integration dashboard.
Metrics are attached to these event types:
MongoCollectionSample
MongoConfigServerSample
MongoDatabaseSample
MongodTopSample
MongoSample
MongodSample
MongosSample
You can query this data for troubleshooting purposes or to create custom charts and dashboards.
For more on how to find and use your data, see Understand integration data.
Metric data
The MongoDB integration collects the following metric data attributes. Some metric name are prefixed with a category indicator and a period, such as asserts.
or collection.
.
Different metrics are available depending on whether a cluster or a standalone instance is being monitored. For a standalone instance, only MongodSample, MongoDatabaseSample, MongodTopSample, and MongoCollectionSample are collected. For a cluster, all event types are collected.
These attributes are attached to the MongoCollectionSample
event type:
Metric | Description |
---|---|
| The size of the average object in the collection, in bytes. |
| Whether or not the collection is capped. |
| The total number of objects in the collection. |
| The number of time the index was used. |
| The size of index, in bytes. |
| The maximum number of documents in a capped collection. |
| The maximum size of a capped collection, in bytes. |
| The total number of indices on the collection. |
| The total size of the data in the collection plus the size of every indexes on the collection, in bytes. |
| The total storage space allocated to this collection for document storage, in bytes. |
These attributes are attached to the MongoConfigServerSample
event type:
Metric | Description |
---|---|
| The number of message assertions raised per second. |
| The number of regular assertions raised per second. |
| The number of times that the rollover counters roll over. The counters rollover to zero every 2^30 assertions per second. |
| The number of user assertions raised per second. |
| The number of warnings raised per second. |
| The number of times |
| The number of times |
| The number of times |
| The number of times |
| The number of times |
| The number of times |
| The number of times |
| The number of times |
| The number of times |
| The number of times |
| The number of times |
| The number of times |
| The number of times |
| The number of times |
| The number of unused available incoming connections the database can provide. |
| The number of connections to the database server from clients. |
| The total number of connections created. |
| The number of open cursors with the option |
| The number of pinned open cursors. |
| The number of cursors that MongoDB is maintaining for clients. |
| The total number of cursors that have timed out since the server process started. |
| The number of documents deleted per second. |
| The number of documents inserted per second. |
| The number of documents returned by queries per second. |
| The number of documents updated per second. |
| The number of transactions written to the journal during the last journal group commit interval. |
| The amount of time spent for commits, in milliseconds. |
| The count of the commits that occurred while a write lock was held. |
| The amount of time spent for commits that occurred while a write lock was held, in milliseconds. |
| The compression ratio of the data written to the journal. |
| The amount of data written from journal to the data files during the last journal group commit interval, in bytes. |
| The number of times MongoDB has requested a commit before the scheduled journal group commit interval. |
| The amount of data written to journal during the last journal group commit interval, in bytes. |
| The amount of time spent preparing to write to the journal, in milliseconds. |
| The amount of time spent remapping copy-on-write memory mapped views, in milliseconds. |
| The amount of time over which MongoDB collected the |
| The amount of time spent writing to data files after journaling, in milliseconds. |
| The amount of time spent writing to the journal, in milliseconds. |
| The average time for each flush to disk, in milliseconds. |
| The number of times the database has flushed all writes to disk. |
| The amount of time that the last flush operation took to complete, in milliseconds. |
| The total amount of time that the mongod processes have spent writing (that is, flushing) data to disk, in milliseconds. |
| The number of |
| The number of times that write concern operations have timed out as a result of the wtimeout threshold to |
| The count of the active client connections performing read operations. |
| The total number of active client connections to the database. |
| The count of active client connections performing write operations. |
| The number of operations that are currently queued and waiting for the read lock. |
| The total number of operations queued waiting for the lock. |
| The number of operations that are currently queued and waiting for the write lock. |
| The time since the database last started and created the global lock. |
| The number of times the collection lock type was acquired in the Exclusive (X) mode. |
| The number of times the collection lock type was acquired in the Intent Exclusive (IX) mode. |
| The number of times the collection lock type was acquired in the Intent Shared (IS) mode. |
| The number of times the collection lock type was acquired in the Shared (S) mode. |
| The number of times the collection lock type acquisition in the Exclusive (X) mode encountered waits because the locks were held in a conflicting mode. |
| The number of times the collection lock type acquisition in the Shared (S) mode encountered waits because the locks were held in a conflicting mode. |
| The wait time for the collection lock type acquisitions in the Exclusive (X) mode. |
| The wait time for the collection lock type acquisitions in the Shared (S) mode. |
| The number of times the database lock type was acquired in the Exclusive (X) mode. |
| The number of times the database lock type was acquired in the Intent Exclusive (IX) mode. |
| The number of times the database lock type was acquired in the Intent Shared (IS) mode. |
| The number of times the database lock type was acquired in the Shared (S) mode. |
| The number of times the database lock type acquisition in the Exclusive (X) mode encountered waits because the locks were held in a conflicting mode. |
| The number of times the database lock type acquisition in the Intent Exclusive (IX) mode encountered waits because the locks were held in a conflicting mode. |
| The number of times the database lock type acquisition in the Intent Shared (IS) mode encountered waits because the locks were held in a conflicting mode. |
| The number of times the database lock type acquisition in the Shared (S) mode encountered waits because the locks were held in a conflicting mode. |
| The wait time for the database lock type acquisitions in the Exclusive (X) mode. |
| The wait time for the database lock type acquisitions in the Intent Exclusive (IX) mode. |
| The wait time for the database lock type acquisitions in the Intent Shared (IS) mode. |
| The wait time for the database lock type acquisitions in the Shared (S) mode. |
| The number of times the global lock type was acquired in the Exclusive (X) mode. |
| The number of times the global lock type was acquired in the Intent Exclusive (IX) mode. |
| The number of times the global lock type was acquired in the Intent Shared (IS) mode. |
| The number of times the global lock type was acquired in the Shared (S) mode. |
| The number of times the global lock type acquisition in the Exclusive (X) mode encountered waits because the locks were held in a conflicting mode. |
| The number of times the global lock type acquisition in the Intent Exclusive (IX) mode encountered waits because the locks were held in a conflicting mode. |
| The number of times the global lock type acquisition in the Intent Shared (IS) mode encountered waits because the locks were held in a conflicting mode. |
| The number of times the global lock type acquisition in the Shared (S) mode encountered waits because the locks were held in a conflicting mode. |
| The wait time for the global lock type acquisitions in the Exclusive (X) mode. |
| The wait time for the global lock type acquisitions in the Intent Exclusive (IX) mode. |
| The wait time for the global lock type acquisitions in the Intent Shared (IS) mode. |
| The wait time for the global lock type acquisitions in the Shared (S) mode. |
| The number of times the metadata lock type was acquired in the Exclusive (X) mode. |
| The number of times the metadata lock type was acquired in the Shared (S) mode. |
| The number of times the MMAPv1 storage engine lock type was acquired in the Exclusive (X) mode. |
| The number of times the MMAPv1 storage engine lock type was acquired in the Intent Exclusive (IX) mode. |
| The number of times the MMAPv1 storage engine lock type was acquired in the Intent Shared (IS) mode. |
| The number of times the MMAPv1 storage engine lock type was acquired in the Shared (S) mode. |
| The number of times the MMAPv1 storage engine lock type acquisition in the Exclusive (X) mode encountered waits because the locks were held in a conflicting mode. |
| The number of times the MMAPv1 storage engine lock type acquisition in the Intent Exclusive (IX) mode encountered waits because the locks were held in a conflicting mode. |
| The number of times the MMAPv1 storage engine lock type acquisition in the Intent Shared (IS) mode encountered waits because the locks were held in a conflicting mode. |
| The number of times the MMAPv1 storage engine lock type acquisition in the Shared (S) mode encountered waits because the locks were held in a conflicting mode. |
| The wait time for the MMAPv1 storage engine lock type acquisitions in the Exclusive (X) mode. |
| The wait time for the MMAPv1 storage engine lock type acquisitions in the Intent Exclusive (IX) mode. |
| The wait time for the MMAPv1 storage engine lock type acquisitions in the Intent Shared (IS) mode. |
| The wait time for the MMAPv1 storage engine lock type acquisitions in the Shared (S) mode. |
| The number of times the oplog lock type was acquired in the Exclusive (X) mode. |
| The number of times the oplog lock type was acquired in the Intent Exclusive (IX) mode. |
| The number of times the oplog lock type was acquired in the Intent Shared (IS) mode. |
| The number of times the oplog lock type was acquired in the Shared (S) mode. |
| The number of times the oplog lock type acquisition in the Intent Exclusive (IX) mode encountered waits because the locks were held in a conflicting mode. |
| The number of times the oplog lock type acquisition in the Shared (S) mode encountered waits because the locks were held in a conflicting mode. |
| The wait time for the oplog lock type acquisitions in the Intent Exclusive (IX) mode. |
| The wait time for the oplog lock type acquisitions in the Shared (S) mode. |
| The size of the in-memory storage engine. |
| The amount of mapped memory by the database, in mebibyte (MiB). |
| The amount of mapped memory, including the memory used for journaling, in mebibyte (MiB). |
| The amount of memory currently used by the database process, in mebibyte (MiB). |
| The amount of virtual memory used by the mongod process, in mebibyte (MiB). |
| The number of bytes that reflects the amount of network traffic into this database. |
| The number of bytes that reflects the amount of network traffic sent from this database. |
| The number of distinct requests that the server has received. |
| The total number of commands issued to the database per second. |
| The number of delete operations per second. |
| The number of getmore operations per second. |
| The number of insert operations per second. |
| The total number of queries per second. |
| The number of update operations per second. |
| The total number of replicated commands issued to the database per second. |
| The number of replicated delete operations per second. |
| The number of replicated getmore operations per second. |
| The number of replicated insert operations per second. |
| The total number of replicated queries per second. |
| The number of replicated update operations per second. |
| The number of update operations that neither cause documents to grow nor require updates to the index per second. |
| The number of queries that contain the |
| The number of queries that return sorted numbers that cannot perform the sort operation using an index per second. |
| The number of times that write concern operations has encountered a conflict per second. |
| The number of page faults that require disk operations per second. |
| The number of index items scanned during queries and query-plan evaluation per second. |
| The number of times documents move within the on-disk representation of the MongoDB data set per second. |
| The number of batches applied across all databases per second. |
| The number of oplog operations applied per second. |
| The number of operations in the oplog buffer. |
| The maximum size of the buffer, in bytes. |
| The current size of the contents of the oplog buffer, in bytes. |
| The number of documents loaded during the pre-fetch stage of replication. |
| The amount of time spent loading documents as part of the pre-fetch stage of replication, in milliseconds. |
| The number of index entries loaded by members before updating documents as part of the pre-fetch stage of replication. |
| The amount of time spent loading indices as part of the pre-fetch stage of replication, in milliseconds. |
| The amount of data read from the replication sync source per second. |
| The number of getmore operations per second. |
| The number of operations read from the replication source per second. |
| The number of oplog query processes created per second. |
| The Member health value of the replica set: conveys if the member is up ( |
|
|
|
|
|
|
|
|
| The election priority of the mongod. |
| The delay between a write operation on the primary and its copy to a secondary. |
| The state of a replica that reflects its disposition within the set. |
| The number of seconds that the mongos or mongod process has been active, in milliseconds. |
| The fraction of votes a server will cast in a replica set election. |
| The number of votes a server will cast in a replica set election. |
| The number of documents deleted from collections with a ttl index per second. |
| The number of times the background process removes documents from collections with a ttl index per second. |
| The size of the dirty data in the cache, in bytes. |
| The size of the data currently in cache, in bytes. |
| The in-memory page splits. |
| The maximum cache size, in bytes. |
| The maximum page size at eviction, in bytes. |
| The number of pages, that have been modified, evicted from the cache. |
| The number of page evicted by application threads per second. |
| The number of pages evicted because they exceeded the cache in-memory maximum, per second. |
| The number of pages currently held in the cache. |
| The number of pages, that were not modified, evicted from the cache. |
| The number of available read tickets (concurrent transactions) remaining. |
| The number of read tickets (concurrent transactions) in use. |
| The total number of read tickets (concurrent transactions) available. |
| The number of available write tickets (concurrent transactions) remaining. |
| The number of write tickets (concurrent transactions) in use. |
| The total number of write tickets (concurrent transactions) available. |
| The number of failed eviction of pages that exceeded the in-memory maximum, per second. |
These attributes are attached to the MongoDatabaseSample
event type:
Metric | Description |
---|---|
| The total size of the data held in this database including the padding factor, in bytes. |
| The total number of indexes across all collections in the database. |
| The total size of all indexes created on this database, in bytes. |
| The number of objects (documents) in the database across all collections. |
| The total amount of space allocated to collections in this database for document storage, in bytes. |
| The total number of existing databases. |
These attributes are attached to the MongodTopSample
event type:
Metric | Description |
---|---|
| The total time spent performing commands, in milliseconds. |
| The number of commands per second. |
| The total time spent performing getmore, in milliseconds. |
| The number of getmore per second. |
| The total time spent performing inserts, in milliseconds. |
| The number of inserts per second. |
| The total time spent performing queries, in milliseconds. |
| The number of queries per second. |
| The total time spent performing read locks, in milliseconds. |
| The number of read locks per second. |
| The total time spent performing removes, in milliseconds. |
| The number of removes per second. |
| The total time spent performing operations, in milliseconds. |
| The number of operations per second. |
| The total time spent performing updates, in milliseconds. |
| The number of updates per second. |
| The total time spent performing write locks, in milliseconds. |
| The number of write locks per second. |
These attributes are attached to the MongoSample
event type:
Metric | Description |
---|---|
| The number of databases on the cluster. |
These attributes are attached to the MongodSample
event type:
Metric | Description |
---|---|
| The number of message assertions raised per second. |
| The number of regular assertions raised per second. |
| The number of times that the rollover counters roll over. The counters rollover to zero every 2^30 assertions per second. |
| The number of user assertions raised per second. |
| The number of warnings raised per second. |
| The number of times |
| The number of times |
| The number of times |
| The number of times |
| The number of times |
| The number of times |
| The number of times |
| The number of times |
| The number of times |
| The number of times |
| The number of times |
| The number of times |
| The number of times |
| The number of times |
| The number of unused available incoming connections the database can provide. |
| The number of connections to the database server from clients. |
| The total number of connections created. |
| The number of open cursors with the option |
| The number of pinned open cursors. |
| The number of cursors that MongoDB is maintaining for clients. |
| The total number of cursors that have timed out since the server process started. |
| The number of documents deleted per second. |
| The number of documents inserted per second. |
| The number of documents returned by queries per second. |
| The number of documents updated per second. |
| The number of transactions written to the journal during the last journal group commit interval. |
| The amount of time spent for commits, in milliseconds. |
| The count of the commits that occurred while a write lock was held. |
| The amount of time spent for commits that occurred while a write lock was held, in milliseconds. |
| The compression ratio of the data written to the journal. |
| The amount of data written from journal to the data files during the last journal group commit interval, in bytes. |
| The number of times MongoDB has requested a commit before the scheduled journal group commit interval. |
| The amount of data written to journal during the last journal group commit interval, in bytes. |
| The amount of time spent preparing to write to the journal, in milliseconds. |
| The amount of time spent remapping copy-on-write memory mapped views, in milliseconds. |
| The amount of time over which MongoDB collected the |
| The amount of time spent writing to data files after journaling, in milliseconds. |
| The amount of time spent writing to the journal, in milliseconds. |
| The average time for each flush to disk, in milliseconds. |
| The number of times the database has flushed all writes to disk. |
| The amount of time that the last flush operation took to complete, in milliseconds. |
| The total amount of time that the mongod processes have spent writing (that is, flushing) data to disk, in milliseconds. |
| The number of |
| The number of times that write concern operations have timed out as a result of the wtimeout threshold to |
| The count of the active client connections performing read operations. |
| The total number of active client connections to the database. |
| The count of active client connections performing write operations. |
| The number of operations that are currently queued and waiting for the read lock. |
| The total number of operations queued waiting for the lock. |
| The number of operations that are currently queued and waiting for the write lock. |
| The time since the database last started and created the global lock. |
| The number of times the collection lock type was acquired in the Exclusive (X) mode. |
| The number of times the collection lock type was acquired in the Intent Exclusive (IX) mode. |
| The number of times the collection lock type was acquired in the Intent Shared (IS) mode. |
| The number of times the collection lock type was acquired in the Shared (S) mode. |
| The number of times the collection lock type acquisition in the Exclusive (X) mode encountered waits because the locks were held in a conflicting mode. |
| The number of times the collection lock type acquisition in the Shared (S) mode encountered waits because the locks were held in a conflicting mode. |
| The wait time for the collection lock type acquisitions in the Exclusive (X) mode. |
| The wait time for the collection lock type acquisitions in the Shared (S) mode. |
| The number of times the database lock type was acquired in the Exclusive (X) mode. |
| The number of times the database lock type was acquired in the Intent Exclusive (IX) mode. |
| The number of times the database lock type was acquired in the Intent Shared (IS) mode. |
| The number of times the database lock type was acquired in the Shared (S) mode. |
| The number of times the database lock type acquisition in the Exclusive (X) mode encountered waits because the locks were held in a conflicting mode. |
| The number of times the database lock type acquisition in the Intent Exclusive (IX) mode encountered waits because the locks were held in a conflicting mode. |
| The number of times the database lock type acquisition in the Intent Shared (IS) mode encountered waits because the locks were held in a conflicting mode. |
| The number of times the database lock type acquisition in the Shared (S) mode encountered waits because the locks were held in a conflicting mode. |
| The wait time for the database lock type acquisitions in the Exclusive (X) mode. |
| The wait time for the database lock type acquisitions in the Intent Exclusive (IX) mode. |
| The wait time for the database lock type acquisitions in the Intent Shared (IS) mode. |
| The wait time for the database lock type acquisitions in the Shared (S) mode. |
| The number of times the global lock type was acquired in the Exclusive (X) mode. |
| The number of times the global lock type was acquired in the Intent Exclusive (IX) mode. |
| The number of times the global lock type was acquired in the Intent Shared (IS) mode. |
| The number of times the global lock type was acquired in the Shared (S) mode. |
| The number of times the global lock type acquisition in the Exclusive (X) mode encountered waits because the locks were held in a conflicting mode. |
| The number of times the global lock type acquisition in the Intent Exclusive (IX) mode encountered waits because the locks were held in a conflicting mode. |
| The number of times the global lock type acquisition in the Intent Shared (IS) mode encountered waits because the locks were held in a conflicting mode. |
| The number of times the global lock type acquisition in the Shared (S) mode encountered waits because the locks were held in a conflicting mode. |
| The wait time for the global lock type acquisitions in the Exclusive (X) mode. |
| The wait time for the global lock type acquisitions in the Intent Exclusive (IX) mode. |
| The wait time for the global lock type acquisitions in the Intent Shared (IS) mode. |
| The wait time for the global lock type acquisitions in the Shared (S) mode. |
| The number of times the metadata lock type was acquired in the Exclusive (X) mode. |
| The number of times the metadata lock type was acquired in the Shared (S) mode. |
| The number of times the MMAPv1 storage engine lock type was acquired in the Exclusive (X) mode. |
| The number of times the MMAPv1 storage engine lock type was acquired in the Intent Exclusive (IX) mode. |
| The number of times the MMAPv1 storage engine lock type was acquired in the Intent Shared (IS) mode. |
| The number of times the MMAPv1 storage engine lock type was acquired in the Shared (S) mode. |
| The number of times the MMAPv1 storage engine lock type acquisition in the Exclusive (X) mode encountered waits because the locks were held in a conflicting mode. |
| The number of times the MMAPv1 storage engine lock type acquisition in the Intent Exclusive (IX) mode encountered waits because the locks were held in a conflicting mode. |
| The number of times the MMAPv1 storage engine lock type acquisition in the Intent Shared (IS) mode encountered waits because the locks were held in a conflicting mode. |
| The number of times the MMAPv1 storage engine lock type acquisition in the Shared (S) mode encountered waits because the locks were held in a conflicting mode. |
| The wait time for the MMAPv1 storage engine lock type acquisitions in the Exclusive (X) mode. |
| The wait time for the MMAPv1 storage engine lock type acquisitions in the Intent Exclusive (IX) mode. |
| The wait time for the MMAPv1 storage engine lock type acquisitions in the Intent Shared (IS) mode. |
| The wait time for the MMAPv1 storage engine lock type acquisitions in the Shared (S) mode. |
| The number of times the oplog lock type was acquired in the Exclusive (X) mode. |
| The number of times the oplog lock type was acquired in the Intent Exclusive (IX) mode. |
| The number of times the oplog lock type was acquired in the Intent Shared (IS) mode. |
| The number of times the oplog lock type was acquired in the Shared (S) mode. |
| The number of times the oplog lock type acquisition in the Intent Exclusive (IX) mode encountered waits because the locks were held in a conflicting mode. |
| The number of times the oplog lock type acquisition in the Shared (S) mode encountered waits because the locks were held in a conflicting mode. |
| The wait time for the oplog lock type acquisitions in the Intent Exclusive (IX) mode. |
| The wait time for the oplog lock type acquisitions in the Shared (S) mode. |
| The size of the in-memory storage engine. |
| The amount of mapped memory by the database, in mebibyte (MiB). |
| The amount of mapped memory, including the memory used for journaling, in mebibyte (MiB). |
| The amount of memory currently used by the database process, in mebibyte (MiB). |
| The amount of virtual memory used by the mongod process, in mebibyte (MiB). |
| The number of bytes that reflects the amount of network traffic into this database. |
| The number of bytes that reflects the amount of network traffic sent from this database. |
| The number of distinct requests that the server has received. |
| The total number of commands issued to the database per second. |
| The number of delete operations per second. |
| The number of getmore operations per second. |
| The number of insert operations per second. |
| The total number of queries per second. |
| The number of update operations per second. |
| The total number of replicated commands issued to the database per second. |
| The number of replicated delete operations per second. |
| The number of replicated getmore operations per second. |
| The number of replicated insert operations per second. |
| The total number of replicated queries per second. |
| The number of replicated update operations per second. |
| The number of update operations that neither cause documents to grow nor require updates to the index per second. |
| The number of queries that contain the |
| The number of queries that return sorted numbers that cannot perform the sort operation using an index per second. |
| The number of times that write concern operations has encountered a conflict per second. |
| The number of page faults that require disk operations per second. |
| The number of index items scanned during queries and query-plan evaluation per second. |
| The number of times documents move within the on-disk representation of the MongoDB data set per second. |
| The number of batches applied across all databases per second. |
| The number of oplog operations applied per second. |
| The number of operations in the oplog buffer. |
| The maximum size of the buffer, in bytes. |
| The current size of the contents of the oplog buffer, in bytes. |
| The number of documents loaded during the pre-fetch stage of replication. |
| The amount of time spent loading documents as part of the pre-fetch stage of replication, in milliseconds. |
| The number of index entries loaded by members before updating documents as part of the pre-fetch stage of replication. |
| The amount of time spent loading indices as part of the pre-fetch stage of replication, in milliseconds. |
| The amount of data read from the replication sync source per second. |
| The number of getmore operations per second. |
| The number of operations read from the replication source per second. |
| The number of oplog query processes created per second. |
| The Member health value of the replica set: conveys if the member is up ( |
|
|
|
|
|
|
|
|
| The election priority of the mongod. |
| The delay between a write operation on the primary and its copy to a secondary. |
| The state of a replica that reflects its disposition within the set. |
| The number of seconds that the mongos or mongod process has been active, in milliseconds. |
| The fraction of votes a server will cast in a replica set election. |
| The number of votes a server will cast in a replica set election. |
| The number of documents deleted from collections with a ttl index per second. |
| The number of times the background process removes documents from collections with a ttl index per second. |
| The size of the dirty data in the cache, in bytes. |
| The size of the data currently in cache, in bytes. |
| The in-memory page splits. |
| The maximum cache size, in bytes. |
| The maximum page size at eviction, in bytes. |
| The number of pages, that have been modified, evicted from the cache. |
| The number of page evicted by application threads per second. |
| The number of pages evicted because they exceeded the cache in-memory maximum, per second. |
| The number of pages currently held in the cache. |
| The number of pages, that were not modified, evicted from the cache. |
| The number of available read tickets (concurrent transactions) remaining. |
| The number of read tickets (concurrent transactions) in use. |
| The total number of read tickets (concurrent transactions) available. |
| The number of available write tickets (concurrent transactions) remaining. |
| The number of write tickets (concurrent transactions) in use. |
| The total number of write tickets (concurrent transactions) available. |
| The number of failed eviction of pages that exceeded the in-memory maximum, per second. |
These attributes are attached to the MongosSample
event type:
Metric | Description |
---|---|
| The number of message assertions raised per second. |
| The number of regular assertions raised per second. |
| The number of times that the rollover counters roll over. The counters rollover to zero every 2^30 assertions per second. |
| The number of user assertions raised per second. |
| The number of warnings raised per second. |
| The number of times |
| The number of times |
| The number of times |
| The number of times |
| The number of times |
| The number of times |
| The number of times |
| The number of times |
| The number of times |
| The number of times |
| The number of times |
| The number of times |
| The number of times |
| The number of times |
| The number of unused available incoming connections the database can provide. |
| The number of connections to the database server from clients. |
| The total number of connections created. |
| The number of open cursors with the option |
| The number of pinned open cursors. |
| The number of cursors that MongoDB is maintaining for clients. |
| The total number of cursors that have timed out since the server process started. |
| The number of documents deleted per second. |
| The number of documents inserted per second. |
| The number of documents returned by queries per second. |
| The number of documents updated per second. |
| The number of transactions written to the journal during the last journal group commit interval. |
| The amount of time spent for commits, in milliseconds. |
| The count of the commits that occurred while a write lock was held. |
| The amount of time spent for commits that occurred while a write lock was held, in milliseconds. |
| The compression ratio of the data written to the journal. |
| The amount of data written from journal to the data files during the last journal group commit interval, in bytes. |
| The number of times MongoDB has requested a commit before the scheduled journal group commit interval. |
| The amount of data written to journal during the last journal group commit interval, in bytes. |
| The amount of time spent preparing to write to the journal, in milliseconds. |
| The amount of time spent remapping copy-on-write memory mapped views, in milliseconds. |
| The amount of time over which MongoDB collected the |
| The amount of time spent writing to data files after journaling, in milliseconds. |
| The amount of time spent writing to the journal, in milliseconds. |
| The average time for each flush to disk, in milliseconds. |
| The number of times the database has flushed all writes to disk. |
| The amount of time that the last flush operation took to complete, in milliseconds. |
| The total amount of time that the mongod processes have spent writing (that is, flushing) data to disk, in milliseconds. |
| The number of |
| The number of times that write concern operations have timed out as a result of the wtimeout threshold to |
| The count of the active client connections performing read operations. |
| The total number of active client connections to the database. |
| The count of active client connections performing write operations. |
| The number of operations that are currently queued and waiting for the read lock. |
| The total number of operations queued waiting for the lock. |
| The number of operations that are currently queued and waiting for the write lock. |
| The time since the database last started and created the global lock. |
| The number of times the collection lock type was acquired in the Exclusive (X) mode. |
| The number of times the collection lock type was acquired in the Intent Exclusive (IX) mode. |
| The number of times the collection lock type was acquired in the Intent Shared (IS) mode. |
| The number of times the collection lock type was acquired in the Shared (S) mode. |
| The number of times the collection lock type acquisition in the Exclusive (X) mode encountered waits because the locks were held in a conflicting mode. |
| The number of times the collection lock type acquisition in the Shared (S) mode encountered waits because the locks were held in a conflicting mode. |
| The wait time for the collection lock type acquisitions in the Exclusive (X) mode. |
| The wait time for the collection lock type acquisitions in the Shared (S) mode. |
| The number of times the database lock type was acquired in the Exclusive (X) mode. |
| The number of times the database lock type was acquired in the Intent Exclusive (IX) mode. |
| The number of times the database lock type was acquired in the Intent Shared (IS) mode. |
| The number of times the database lock type was acquired in the Shared (S) mode. |
| The number of times the database lock type acquisition in the Exclusive (X) mode encountered waits because the locks were held in a conflicting mode. |
| The number of times the database lock type acquisition in the Intent Exclusive (IX) mode encountered waits because the locks were held in a conflicting mode. |
| The number of times the database lock type acquisition in the Intent Shared (IS) mode encountered waits because the locks were held in a conflicting mode. |
| The number of times the database lock type acquisition in the Shared (S) mode encountered waits because the locks were held in a conflicting mode. |
| The wait time for the database lock type acquisitions in the Exclusive (X) mode. |
| The wait time for the database lock type acquisitions in the Intent Exclusive (IX) mode. |
| The wait time for the database lock type acquisitions in the Intent Shared (IS) mode. |
| The wait time for the database lock type acquisitions in the Shared (S) mode. |
| The number of times the global lock type was acquired in the Exclusive (X) mode. |
| The number of times the global lock type was acquired in the Intent Exclusive (IX) mode. |
| The number of times the global lock type was acquired in the Intent Shared (IS) mode. |
| The number of times the global lock type was acquired in the Shared (S) mode. |
| The number of times the global lock type acquisition in the Exclusive (X) mode encountered waits because the locks were held in a conflicting mode. |
| The number of times the global lock type acquisition in the Intent Exclusive (IX) mode encountered waits because the locks were held in a conflicting mode. |
| The number of times the global lock type acquisition in the Intent Shared (IS) mode encountered waits because the locks were held in a conflicting mode. |
| The number of times the global lock type acquisition in the Shared (S) mode encountered waits because the locks were held in a conflicting mode. |
| The wait time for the global lock type acquisitions in the Exclusive (X) mode. |
| The wait time for the global lock type acquisitions in the Intent Exclusive (IX) mode. |
| The wait time for the global lock type acquisitions in the Intent Shared (IS) mode. |
| The wait time for the global lock type acquisitions in the Shared (S) mode. |
| The number of times the metadata lock type was acquired in the Exclusive (X) mode. |
| The number of times the metadata lock type was acquired in the Shared (S) mode. |
| The number of times the MMAPv1 storage engine lock type was acquired in the Exclusive (X) mode. |
| The number of times the MMAPv1 storage engine lock type was acquired in the Intent Exclusive (IX) mode. |
| The number of times the MMAPv1 storage engine lock type was acquired in the Intent Shared (IS) mode. |
| The number of times the MMAPv1 storage engine lock type was acquired in the Shared (S) mode. |
| The number of times the MMAPv1 storage engine lock type acquisition in the Exclusive (X) mode encountered waits because the locks were held in a conflicting mode. |
| The number of times the MMAPv1 storage engine lock type acquisition in the Intent Exclusive (IX) mode encountered waits because the locks were held in a conflicting mode. |
| The number of times the MMAPv1 storage engine lock type acquisition in the Intent Shared (IS) mode encountered waits because the locks were held in a conflicting mode. |
| The number of times the MMAPv1 storage engine lock type acquisition in the Shared (S) mode encountered waits because the locks were held in a conflicting mode. |
| The wait time for the MMAPv1 storage engine lock type acquisitions in the Exclusive (X) mode. |
| The wait time for the MMAPv1 storage engine lock type acquisitions in the Intent Exclusive (IX) mode. |
| The wait time for the MMAPv1 storage engine lock type acquisitions in the Intent Shared (IS) mode. |
| The wait time for the MMAPv1 storage engine lock type acquisitions in the Shared (S) mode. |
| The number of times the oplog lock type was acquired in the Exclusive (X) mode. |
| The number of times the oplog lock type was acquired in the Intent Exclusive (IX) mode. |
| The number of times the oplog lock type was acquired in the Intent Shared (IS) mode. |
| The number of times the oplog lock type was acquired in the Shared (S) mode. |
| The number of times the oplog lock type acquisition in the Intent Exclusive (IX) mode encountered waits because the locks were held in a conflicting mode. |
| The number of times the oplog lock type acquisition in the Shared (S) mode encountered waits because the locks were held in a conflicting mode. |
| The wait time for the oplog lock type acquisitions in the Intent Exclusive (IX) mode. |
| The wait time for the oplog lock type acquisitions in the Shared (S) mode. |
| The size of the in-memory storage engine. |
| The amount of mapped memory by the database, in mebibyte (MiB). |
| The amount of mapped memory, including the memory used for journaling, in mebibyte (MiB). |
| The amount of memory currently used by the database process, in mebibyte (MiB). |
| The amount of virtual memory used by the mongod process, in mebibyte (MiB). |
| The number of bytes that reflects the amount of network traffic into this database. |
| The number of bytes that reflects the amount of network traffic sent from this database. |
| The number of distinct requests that the server has received. |
| The total number of commands issued to the database per second. |
| The number of delete operations per second. |
| The number of getmore operations per second. |
| The number of insert operations per second. |
| The total number of queries per second. |
| The number of update operations per second. |
| The total number of replicated commands issued to the database per second. |
| The number of replicated delete operations per second. |
| The number of replicated getmore operations per second. |
| The number of replicated insert operations per second. |
| The total number of replicated queries per second. |
| The number of replicated update operations per second. |
| The number of update operations that neither cause documents to grow nor require updates to the index per second. |
| The number of queries that contain the |
| The number of queries that return sorted numbers that cannot perform the sort operation using an index per second. |
| The number of times that write concern operations has encountered a conflict per second. |
| The number of page faults that require disk operations per second. |
| The number of index items scanned during queries and query-plan evaluation per second. |
| The number of times documents move within the on-disk representation of the MongoDB data set per second. |
| The number of batches applied across all databases per second. |
| The number of oplog operations applied per second. |
| The number of operations in the oplog buffer. |
| The maximum size of the buffer, in bytes. |
| The current size of the contents of the oplog buffer, in bytes. |
| The number of documents loaded during the pre-fetch stage of replication. |
| The amount of time spent loading documents as part of the pre-fetch stage of replication, in milliseconds. |
| The number of index entries loaded by members before updating documents as part of the pre-fetch stage of replication. |
| The amount of time spent loading indices as part of the pre-fetch stage of replication, in milliseconds. |
| The amount of data read from the replication sync source per second. |
| The number of getmore operations per second. |
| The number of operations read from the replication source per second. |
| The number of oplog query processes created per second. |
| The number of documents deleted from collections with a ttl index per second. |
| The number of times the background process removes documents from collections with a ttl index per second. |
| The size of the dirty data in the cache, in bytes. |
| The size of the data currently in cache, in bytes. |
| The in-memory page splits. |
| The maximum cache size, in bytes. |
| The maximum page size at eviction, in bytes. |
| The number of pages, that have been modified, evicted from the cache. |
| The number of page evicted by application threads per second. |
| The number of pages evicted because they exceeded the cache in-memory maximum, per second. |
| The number of pages currently held in the cache. |
| The number of pages, that were not modified, evicted from the cache. |
| The number of available read tickets (concurrent transactions) remaining. |
| The number of read tickets (concurrent transactions) in use. |
| The total number of read tickets (concurrent transactions) available. |
| The number of available write tickets (concurrent transactions) remaining. |
| The number of write tickets (concurrent transactions) in use. |
| The total number of write tickets (concurrent transactions) available. |
| The number of failed eviction of pages that exceeded the in-memory maximum, per second. |
Inventory data
The MongoDB integration captures all command line options and runtime-configured parameters from each host in the cluster.
The data is available on the Inventory page, under the config/mongodb source. For more about inventory data, see Understand integration data.
Check the source code
This integration is open source software. That means you can browse its source code and send improvements, or create your own fork and build it.