MongoDB Atlas
The MongoDB Atlas Integration allows you to ingest performance, health, and operational metrics from your MongoDB Atlas clusters. This enables monitoring of connections, operations, replication lag, memory usage, disk I/O, and more.
Prerequisites
- An active MongoDB Atlas account with an M10 or higher tier cluster. The free tier (M0) does not provide access to the required metrics API endpoints.
Important: You must whitelist the IP address
48.217.209.253
in your MongoDB Atlas API key access list. This IP is used by Middleware to collect metrics from your MongoDB Atlas clusters. Note that this IP address is subject to change. If you notice that metrics are not being collected, please contact the Middleware support team at [email protected] to verify the current IP address.
Configuration
MongoDB Atlas is integrated using the MongoDB Atlas API. You'll need to create an API Key in MongoDB Atlas and configure it in the Middleware platform.
API-Based Authentication
To set up the integration, you'll need to create an API Key in MongoDB Atlas with the following permission:
- Organization Read Only
These permission is required to access metrics, logs, and events data from your MongoDB Atlas clusters.
Create MongoDB Atlas API Key
- Log in to MongoDB Atlas
- Navigate to "Identity & Access" > Applications > API Keys
- Click "Add New"
- Add a description for your key
- Under "Organization Permissions", select "Organization Read Only"
- Click "Next"
- Copy both the Public Key and Private Key and store them securely (you won't be able to access the private key later)
- Add IP address
48.217.209.253
to the API access list - Click "Create API Key"
Verify API Key Access
You can verify your API key has the correct permissions by testing the following endpoints:
# Test organization access curl -u "<PUBLIC_KEY>:<PRIVATE_KEY>" \ --digest \ "https://cloud.mongodb.com/api/atlas/v1.0/orgs" # Test project access curl -u "<PUBLIC_KEY>:<PRIVATE_KEY>" \ --digest \ "https://cloud.mongodb.com/api/atlas/v1.0/groups"
Replace <PUBLIC_KEY>
, <PRIVATE_KEY>
, <PROJECT_ID>
, and <CLUSTER_NAME>
with your actual values.
Required Fields
- Public Key – Your MongoDB Atlas API public key.
- Private Key – Your MongoDB Atlas API private key.
- Collection Interval (Optional) – The frequency at which data is collected. The default interval is 3m.
- Granularity - The default is PT1M.
- Storage - The default is file_storage. These values must be entered into the integration form in the Middleware UI to enable the MongoDB Atlas Integration.
Projects (Optional)
- Project Name: Name of your project
- Include Clusters / Exclude Clusters: You can choose to specify either what clusters to include or what clusters to exclude. (Not both at once)
Access Integrations
Step 1: Access MongoDB Atlas Integration
Log in to Middleware, navigate to Installations Page in the bottom left corner, select All Integrations, and click on MongoDB Atlas.

Step 2: Configure MongoDB Atlas Integration
- Public Key: Your Atlas public API key.
- Private Key: Your Atlas private API key.
- Collection Interval: Set as needed (default is 3m).
- Granularity: PT1M
- Storage: file_storage
- Projects (Optional):
Project Name
: Name of your projectInclude Clusters
/Exclude Clusters
: You can choose to specify either which clusters to include or which clusters to exclude. (Not both at once)

Conclusion
Once configured, Middleware will securely connect to MongoDB Atlas using the API and begin collecting real-time metrics for analysis and alerts.
Visualize Analytics
Default MongoDB Atlas Dashboard
A pre-built dashboard for MongoDB Atlas will appear in Dashboard Builder after successful integration. This default dashboard serves as a jumping off point for visualizing and analyzing MongoDB Atlas data.

Create MongoDB Atlas Widget
You can add MongoDB Atlas data to dashboards as a custom widget. Follow these steps to configure your widget:
- Select Widget Dashboard Navigate to the Create Widget screen.

Configure Widget Profile On the Widget Profile screen, select category as database and define the widget name and description.
Set Up Configuration In the Widget Configuration screen, customize data settings, apply filters, and finalize widget preferences.


Alerts
Alerts can be configured for any MongoDB Atlas metrics. When creating a new rule, select the Database detection method and MongoDB Atlas database type for available metrics to appear in the Metrics dropdown list. Select the desired metric and continue configuring the alert conditions.
Metrics Collected
Metric | Description |
---|---|
mongodbatlas.process.asserts | Number of assertions per second |
mongodbatlas.process.background_flush | Amount of data flushed in the background |
mongodbatlas.process.cache.io | Cache throughput (per second) |
mongodbatlas.process.cache.ratio | Cache ratios represented as (%) |
mongodbatlas.process.cache.size | Cache sizes |
mongodbatlas.process.connections | Number of current connections |
mongodbatlas.process.cpu.usage.max | CPU Usage (%) |
mongodbatlas.process.cpu.usage.average | CPU Usage (%) |
mongodbatlas.process.cpu.children.usage.max | CPU Usage for child processes (%) |
mongodbatlas.process.cpu.children.usage.average | CPU Usage for child processes (%) |
mongodbatlas.process.cpu.children.normalized.usage.max | CPU Usage for child processes, normalized to pct |
mongodbatlas.process.cpu.children.normalized.usage.average | CPU Usage for child processes, normalized to pct |
mongodbatlas.process.cpu.normalized.usage.max | CPU Usage, normalized to pct |
mongodbatlas.process.cpu.normalized.usage.average | CPU Usage, normalized to pct |
mongodbatlas.process.cursors | Number of cursors |
mongodbatlas.process.db.storage | Storage used by the database |
mongodbatlas.process.db.document.rate | Document access rates |
mongodbatlas.process.global_lock | Number and status of locks |
mongodbatlas.process.index.btree_miss_ratio | Index miss ratio (%) |
mongodbatlas.process.index.counters | Indexes |
mongodbatlas.process.journaling.commits | Journaling commits |
mongodbatlas.process.journaling.data_files | Data file sizes |
mongodbatlas.process.journaling.written | Journals written |
mongodbatlas.process.memory.usage | Memory Usage |
mongodbatlas.process.network.io | Network IO |
mongodbatlas.process.network.requests | Network requests |
mongodbatlas.process.oplog.time | Execution time by operation |
mongodbatlas.process.oplog.rate | Execution rate by operation |
mongodbatlas.process.db.operations.rate | DB Operation Rates |
mongodbatlas.process.db.operations.time | DB Operation Times |
mongodbatlas.process.page_faults | Page faults |
mongodbatlas.process.db.query_executor.scanned | Scanned objects |
mongodbatlas.process.db.query_targeting.scanned_per_returned | Scanned objects per returned |
mongodbatlas.process.restarts | Restarts in last hour |
mongodbatlas.system.paging.usage.max | Swap usage |
mongodbatlas.system.paging.usage.average | Swap usage |
mongodbatlas.system.paging.io.max | Swap IO |
mongodbatlas.system.paging.io.average | Swap IO |
mongodbatlas.system.cpu.usage.max | System CPU Usage (%) |
mongodbatlas.system.cpu.usage.average | System CPU Usage (%) |
mongodbatlas.system.memory.usage.max | System Memory Usage |
mongodbatlas.system.memory.usage.average | System Memory Usage |
mongodbatlas.system.network.io.max | System Network IO |
mongodbatlas.system.network.io.average | System Network IO |
mongodbatlas.system.cpu.normalized.usage.max | System CPU Normalized to pct |
mongodbatlas.system.cpu.normalized.usage.average | System CPU Normalized to pct |
mongodbatlas.process.tickets | Tickets |
mongodbatlas.disk.partition.iops.max | Disk partition iops |
mongodbatlas.disk.partition.iops.average | Disk partition iops |
mongodbatlas.disk.partition.throughput | Disk throughput |
mongodbatlas.disk.partition.usage.max | Disk partition usage (%) |
mongodbatlas.disk.partition.usage.average | Disk partition usage (%) |
mongodbatlas.disk.partition.utilization.max | The maximum percentage of time during which requests are being issued to and serviced by the partition. |
mongodbatlas.disk.partition.utilization.average | The percentage of time during which requests are being issued to and serviced by the partition. |
mongodbatlas.disk.partition.latency.max | Disk partition latency |
mongodbatlas.disk.partition.latency.average | Disk partition latency |
mongodbatlas.disk.partition.space.max | Disk partition space |
mongodbatlas.disk.partition.space.average | Disk partition space |
mongodbatlas.disk.partition.queue.depth | Disk queue depth |
mongodbatlas.db.size | Database feature size |
mongodbatlas.db.counts | Database feature size |
mongodbatlas.system.fts.memory.usage | Full-text search |
mongodbatlas.system.fts.disk.used | Full text search disk usage |
mongodbatlas.system.fts.cpu.usage | Full-text search (%) |
mongodbatlas.system.fts.cpu.normalized.usage | Full text search disk usage (%) |
Troubleshooting
Missing Integration Option
If you do not see the Integrations Menu in Middlware, that means your account has not been granted Installation
permissions. Contact your system administrator to add the Installation
permission to your user role in Settings.
Next Steps
- How to Create Alerts
- Dashboard Basics & Customization
- Custom Telemetry Ingestion
- Getting Started With Real User Monitoring (RUM)
- Data Ingestion APIs
Need assistance or want to learn more about Middleware? Contact our support team at [email protected].