MongoDB Atlas Integration

The MongoDB Atlas integration ingests performance, health, and operational metrics (connections, ops rates, replication lag, CPU/memory, disk I/O, etc.) from your Atlas clusters into Middleware for dashboards and alerts.

Prerequisites

  • MongoDB Atlas account with an M10 or higher tier cluster (M0 free tier doesn’t expose the metrics API endpoints needed).
  • Whitelist the Middleware’s collector IP for Atlas API access: 48.217.209.253. This IP can change, and if metrics stop flowing, contact MW Customer Support to verify the current IP.

Configuration Overview

Atlas is integrated via the MongoDB Atlas API. You’ll create an API Key with Organization Read Only permission, whitelist the collector IP, then paste the key pair into the Middleware integration form.

1 Create a MongoDB Atlas API Key

  • Log in to Atlas.
  • Go to Identity & Access → Applications → API Keys → Add New.
  • Add a description for the key.
  • Under Organization Permissions, select Organization Read Only.
  • Click Next and copy both Public Key and Private Key (you won’t be able to view the private key again).
  • Add 48.217.209.253 to the API access list.
  • Create API Key.

(Optional) Verify API Key access

Run the Atlas API test calls (HTTP Digest) with your key pair:

1# Test organization access
2curl -u "<PUBLIC_KEY>:<PRIVATE_KEY>" \
3  --digest \
4  "https://cloud.mongodb.com/api/atlas/v1.0/orgs"
5
6# Test project access
7curl -u "<PUBLIC_KEY>:<PRIVATE_KEY>" \
8  --digest \
9  "https://cloud.mongodb.com/api/atlas/v1.0/groups"

Replace the placeholders with your actual values.

2 Open the MongoDB Atlas integration in Middleware

Installations → All Integrations → MongoDB Atlas.

MongoDB Atlas Access Screen

3 Fill in the Configuration

Enter the required fields exactly as they appear in Atlas; leave the defaults unless you have a reason to change them.

Required fields (as shown on the form):

  • Public Key: Your Atlas API public key
  • Private Key: Your Atlas API private key
  • Collection Interval (optional): default 3m
  • Granularity: default PT1M
  • Storage: Default file_storage

Projects (optional)

  • Project Name
  • Include Clusters / Exclude Clusters: Specify one of these (not both) to control which clusters are collected.
MongoDB Atlas Configuration Screen

Save the configuration to start collection. Middleware connects to Atlas via the API and begins pulling metrics shortly after.

Visualize Analytics

Default Dashboard

A ready-made MongoDB Atlas dashboard appears in Dashboard Builder after a successful setup (use it to validate data flow, then customize as needed).

Create Widget Profile Screen

Create a custom widget

  1. Select Widget Dashboard Navigate to the Create Widget screen:
Create Widget Profile Screen
  1. Add Widget → Database → MongoDB Atlas; pick your metric(s), filters, and time range, then preview and save:
Create Widget Profile Screen

Alerts

You can alert on any MongoDB Atlas metric. When creating a rule, choose Detection method: Database and Database type: MongoDB Atlas to see all Atlas metrics in the Metrics dropdown, then set your conditions.

Metrics Collected

MetricDescription
mongodbatlas.process.assertsNumber of assertions per
mongodbatlas.process.background_flushAmount of data flushed in the background
mongodbatlas.process.cache.ioCache throughput (per second)
mongodbatlas.process.cache.ratioCache ratios represented as (%)
mongodbatlas.process.cache.sizeCache sizes
mongodbatlas.process.connectionsNumber of current connections
mongodbatlas.process.cpu.usage.maxCPU Usage (%)
mongodbatlas.process.cpu.usage.averageCPU Usage (%)
mongodbatlas.process.cpu.children.usage.maxCPU Usage for child processes (%)
mongodbatlas.process.cpu.children.usage.averageCPU Usage for child processes (%)
mongodbatlas.process.cpu.children.normalized.usage.maxCPU Usage for child processes, normalized to pct
mongodbatlas.process.cpu.children.normalized.usage.averageCPU Usage for child processes, normalized to pct
mongodbatlas.process.cpu.normalized.usage.maxCPU Usage, normalized to pct
mongodbatlas.process.cpu.normalized.usage.averageCPU Usage, normalized to pct
mongodbatlas.process.cursorsNumber of cursors
mongodbatlas.process.db.storageStorage used by the database
mongodbatlas.process.db.document.rateDocument access rates
mongodbatlas.process.global_lockNumber and status of locks
mongodbatlas.process.index.btree_miss_ratioIndex miss ratio (%)
mongodbatlas.process.index.countersIndexes
mongodbatlas.process.journaling.commitsJournaling commits
mongodbatlas.process.journaling.data_filesData file sizes
mongodbatlas.process.journaling.writtenJournals written
mongodbatlas.process.memory.usageMemory Usage
mongodbatlas.process.network.ioNetwork IO
mongodbatlas.process.network.requestsNetwork requests
mongodbatlas.process.oplog.timeExecution time by operation
mongodbatlas.process.oplog.rateExecution rate by operation
mongodbatlas.process.db.operations.rateDB Operation Rates
mongodbatlas.process.db.operations.timeDB Operation Times
mongodbatlas.process.page_faultsPage faults
mongodbatlas.process.db.query_executor.scannedScanned objects
mongodbatlas.process.db.query_targeting.scanned_per_returnedScanned objects per returned
mongodbatlas.process.restartsRestarts in last hour
mongodbatlas.system.paging.usage.maxSwap usage
mongodbatlas.system.paging.usage.averageSwap usage
mongodbatlas.system.paging.io.maxSwap IO
mongodbatlas.system.paging.io.averageSwap IO
mongodbatlas.system.cpu.usage.maxSystem CPU Usage (%)
mongodbatlas.system.cpu.usage.averageSystem CPU Usage (%)
mongodbatlas.system.memory.usage.maxSystem Memory Usage
mongodbatlas.system.memory.usage.averageSystem Memory Usage
mongodbatlas.system.network.io.maxSystem Network IO
mongodbatlas.system.network.io.averageSystem Network IO
mongodbatlas.system.cpu.normalized.usage.maxSystem CPU Normalized to pct
mongodbatlas.system.cpu.normalized.usage.averageSystem CPU Normalized to pct
mongodbatlas.process.ticketsTickets
mongodbatlas.disk.partition.iops.maxDisk partition iops
mongodbatlas.disk.partition.iops.averageDisk partition iops
mongodbatlas.disk.partition.throughputDisk throughput
mongodbatlas.disk.partition.usage.maxDisk partition usage (%)
mongodbatlas.disk.partition.usage.averageDisk partition usage (%)
mongodbatlas.disk.partition.utilization.maxMax % time requests are issued/serviced by the partition
mongodbatlas.disk.partition.utilization.average% time requests are issued/serviced by the partition
mongodbatlas.disk.partition.latency.maxDisk partition latency
mongodbatlas.disk.partition.latency.averageDisk partition latency
mongodbatlas.disk.partition.space.maxDisk partition space
mongodbatlas.disk.partition.space.averageDisk partition space
mongodbatlas.disk.partition.queue.depthDisk queue depth
mongodbatlas.db.sizeDatabase feature size
mongodbatlas.db.countsDatabase feature size
mongodbatlas.system.fts.memory.usageFull-text search
mongodbatlas.system.fts.disk.usedFull text search disk usage
mongodbatlas.system.fts.cpu.usageFull-text search CPU (%)
mongodbatlas.system.fts.cpu.normalized.usageFull-text search CPU (normalized %)

Need assistance or want to learn more about Middleware? Contact our support team at [email protected] or join our Slack channel.