• /
  • EnglishEspañol日本語한국어Português
  • Inicia sesiónComenzar ahora

MongoDB monitoring integration

Gain deep insights into MongoDB performance with seamless data integration into New Relic. Monitor key metrics like throughput, collection size, connections, and indexes effortlessly, all within our powerful platform. Create alerts to stay ahead of spikes, build custom dashboards for tailored views, and proactively optimize your database monitoring.

Image of the dashboard available through the MongoDB quickstart

To get the most out of this page, select the installation method that fits your environment. You need a New Relic account before starting the installation process.

Sugerencia

Use guided install to quickly see your data in the UI

The guided install is a single CLI command you can run to monitor your MongoDB instance. It's a good option for small organizations, or for anyone who wants to test out New Relic.

Guided install

For a more permanent and scalable solution, we recommend the standard manual install of the agent: keep reading for how to do that.

MongoDB config settings

The following configuration options are available:

Setting

Description

Default

mongodb_cluster_name

User-defined name to uniquely identify the cluster being monitored. Required

N/A

mongodb_uri

MongoDB connection URI. Required

N/A

mongodb_direct_connect

Whether or not a direct connect should be made. Direct connections are not valid if multiple hosts are specified or an SRV URI is used, for example for mongoDB Atlas.

Notice that direct connect should also be set to false if loadBalanced=true is specified either in the connection string or in the DNS entry as it happens in case of Serverless Atlas Deployments.

true

collection_filters

List of comma separated databases.collections. If empty, defaults to all databases and collections

N/A

index_filters

List of comma separated databases.collections to retrieve index stats. If empty, defaults to all indexes

N/A

database_stats

Enable/Disable collection of Database metrics

true

collection_stats

Enable/Disable collection of Collections metrics

true

index_stats

Enable/Disable collection of Index metrics

true

replicaset_stats

Enable/Disable collection of Replica Set metrics

true

top_stats

Enable/Disable collection of Top Admin metrics

true

diagnostic_stats

Enable/Disable collection of Diagnostic metrics

true

exporter_port

Port to expose scrape endpoint on, If this is not provided a random port will be used to launch the exporter

random-port

scrape_timeout

Time until a scrape request times out

5s

Metric data

These are the 3 entities created: MONGODB_INSTANCE, MONGODB_DATABASE, and MONGODB_COLLECTION.

The following dimensional metrics are captured scraping the exporter and linked to the entity MONGODB_INSTANCE

The following dimensional metrics are captured scraping the exporter and linked to the entity MONGODB_COLLECTION:

The following dimensional metrics are captured scraping the exporter and linked to the entity MONGODB_DATABASE:

Copyright © 2024 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.