MongoDB Atlas Metrics and Logs

Overview

MongoDB Atlas is a fully managed cloud database service for modern applications. This documentation guides you through setting up monitoring for MongoDB Atlas—tracking key metrics, collecting logs, and visualising them through an out-of-the-box dashboard.

Prerequisites

Before you begin, ensure you have:

  1. A MongoDB Atlas account with appropriate access
  2. MongoDB Atlas API keys with required permissions:
    • Public Key and Private Key with access for the corresponding MongoDB Atlas Project
    • Project Data Access Read Only role (minimum) for accessing project events and logs
  3. For audit logs: Audit logging must be enabled in your MongoDB Atlas project

Setup

Step 1: Install OpenTelemetry Collector

Follow this document to install the OpenTelemetry Collector.

Step 2: Configure MongoDB Atlas Receiver

Modify the config.yaml file created during the installation of the OpenTelemetry Collector to include the mongodbatlas receiver:

config.yaml
receivers:
  mongodbatlas:
    # Authentication
    public_key: "<mongodb-atlas-public-key>"
    private_key: "<mongodb-atlas-private-key>"    
    # Metrics configuration
    collection_interval: 5m

processors:
  batch: {}
  resource/env:
    attributes:
      - key: deployment.environment
        value: prod
        action: upsert

exporters:
  # export to SigNoz cloud
  otlp:
    endpoint: "ingest.<region>.signoz.cloud:443"
    tls:
      insecure: false
    headers:
      "signoz-ingestion-key": "<ingestion-key>"

service:
  pipelines:
    metrics:
      receivers: [mongodbatlas]
      processors: [batch,resource/env]
      exporters: [otlp]
  • <mongodb-atlas-public-key> is the public key of your MongoDB Atlas project
  • <mongodb-atlas-private-key> is the private key of your MongoDB Atlas project
  • Set the <region> to match your SigNoz Cloud region
  • Replace <your-ingestion-key> with your SigNoz ingestion key

All the available MongoDB Atlas receiver configurations can be found here.

Step 3: Start the OTel Collector

Start the OpenTelemetry Collector using the above config.yaml file:

./otelcol-contrib --config ./config.yaml

MongoDB Atlas Dashboard

Here are sample screenshots of the dashboard powered by MongoDB Atlas metrics:

MongoDB Atlas Overview
MongoDB Atlas Overview
MongoDB Atlas Project Stats
MongoDB Atlas Project Stats
Complete list of MongoDB Atlas metrics
  • Name: The name of the metric.
  • Type: The type of the metric (e.g., Sum, Gauge).
  • Unit: The unit of measurement for the metric.
  • Description: A brief description of what the metric represents.
NameTypeUnitDescription
mongodbatlas.db.countsGaugenumberDatabase feature size
mongodbatlas.db.sizeGaugeBytesDatabase feature size
mongodbatlas.disk.partition.iops.averageGaugeops/sDisk partition iops
mongodbatlas.disk.partition.iops.maxGaugeops/sDisk partition iops
mongodbatlas.disk.partition.latency.averageGaugemillisecondsDisk partition latency
mongodbatlas.disk.partition.latency.maxGaugemillisecondsDisk partition latency
mongodbatlas.disk.partition.space.averageGaugeBytesDisk partition space
mongodbatlas.disk.partition.space.maxGaugeBytesDisk partition space
mongodbatlas.disk.partition.usage.averageGaugenumberDisk partition usage (%)
mongodbatlas.disk.partition.usage.maxGaugenumberDisk partition usage (%)
mongodbatlas.disk.partition.utilization.averageGaugenumberThe percentage of time during which requests are being issued to and serviced by the partition.
mongodbatlas.disk.partition.utilization.maxGaugenumberThe maximum percentage of time during which requests are being issued to and serviced by the partition.
mongodbatlas.process.assertsGaugeassertions/sNumber of assertions per second
mongodbatlas.process.background_flushGaugenumberAmount of data flushed in the background
mongodbatlas.process.cache.ioGaugeBytesCache throughput (per second)
mongodbatlas.process.cache.sizeSumBytesCache sizes
mongodbatlas.process.connectionsSumnumberNumber of current connections
mongodbatlas.process.cpu.children.normalized.usage.averageGaugenumberCPU Usage for child processes, normalized to pct
mongodbatlas.process.cpu.children.normalized.usage.maxGaugenumberCPU Usage for child processes, normalized to pct
mongodbatlas.process.cpu.children.usage.averageGaugenumberCPU Usage for child processes (%)
mongodbatlas.process.cpu.children.usage.maxGaugenumberCPU Usage for child processes (%)
mongodbatlas.process.cpu.normalized.usage.averageGaugenumberCPU Usage, normalized to pct
mongodbatlas.process.cpu.normalized.usage.maxGaugenumberCPU Usage, normalized to pct
mongodbatlas.process.cpu.usage.averageGaugenumberCPU Usage (%)
mongodbatlas.process.cpu.usage.maxGaugenumberCPU Usage (%)
mongodbatlas.process.cursorsGaugenumberNumber of cursors
mongodbatlas.process.db.document.rateGaugedocuments/sDocument access rates
mongodbatlas.process.db.operations.rateGaugeoperations/sDB Operation Rates
mongodbatlas.process.db.operations.timeSummillisecondsDB Operation Times
mongodbatlas.process.db.query_executor.scannedGaugeobjects/sScanned objects
mongodbatlas.process.db.query_targeting.scanned_per_returnedGaugescanned/returnedScanned objects per returned
mongodbatlas.process.db.storageGaugeBytesStorage used by the database
mongodbatlas.process.global_lockGaugenumberNumber and status of locks
mongodbatlas.process.index.btree_miss_ratioGaugenumberIndex miss ratio (%)
mongodbatlas.process.index.countersGaugenumberIndexes
mongodbatlas.process.journaling.commitsGaugenumberJournaling commits
mongodbatlas.process.journaling.data_filesGaugeMilliBytesData file sizes
mongodbatlas.process.journaling.writtenGaugeMilliBytesJournals written
mongodbatlas.process.memory.usageGaugeBytesMemory Usage
mongodbatlas.process.network.ioGaugeBytes/sNetwork IO
mongodbatlas.process.network.requestsSumnumberNetwork requests
mongodbatlas.process.oplog.rateGaugeGigaBytes/hExecution rate by operation
mongodbatlas.process.oplog.timeGaugesecondsExecution time by operation
mongodbatlas.process.page_faultsGaugefaults/sPage faults
mongodbatlas.process.restartsGaugerestarts/hRestarts in last hour
mongodbatlas.process.ticketsGaugeticketsTickets
mongodbatlas.system.cpu.normalized.usage.averageGaugenumberSystem CPU Normalized to pct
mongodbatlas.system.cpu.normalized.usage.maxGaugenumberSystem CPU Normalized to pct
mongodbatlas.system.cpu.usage.averageGaugenumberSystem CPU Usage (%)
mongodbatlas.system.cpu.usage.maxGaugenumberSystem CPU Usage (%)
mongodbatlas.system.fts.cpu.normalized.usageGaugenumberFull text search disk usage (%)
mongodbatlas.system.fts.cpu.usageGaugenumberFull-text search (%)
mongodbatlas.system.fts.disk.usedGaugeBytesFull text search disk usage
mongodbatlas.system.fts.memory.usageSumMilliBytesFull-text search
mongodbatlas.system.memory.usage.averageGaugeKiloBytesSystem Memory Usage
mongodbatlas.system.memory.usage.maxGaugeKiloBytesSystem Memory Usage
mongodbatlas.system.network.io.averageGaugeBytes/sSystem Network IO
mongodbatlas.system.network.io.maxGaugeBytes/sSystem Network IO
mongodbatlas.system.paging.io.averageGaugepages/sSwap IO
mongodbatlas.system.paging.io.maxGaugepages/sSwap IO
mongodbatlas.system.paging.usage.averageGaugeKiloBytesSwap usage
mongodbatlas.system.paging.usage.maxGaugeKiloBytesSwap usage
mongodbatlas.disk.partition.queue.depthGaugenumberDisk queue depth
mongodbatlas.disk.partition.throughputGaugeBytes/sDisk throughput
mongodbatlas.process.cache.ratioGaugenumberCache ratios represented as (%)

You can refer this page for more details about the MongoDB Atlas metrics.

Troubleshooting

Logs Collection Issues

If you do not see logs in SigNoz:

  1. For audit logs - Verify audit logging is enabled in your MongoDB Atlas project settings
  2. Check API key permissions - ensure your API key has at least Project Data Ascess Read Only role
  3. Review collector logs for any error messages related to MongoDB Atlas API calls
  4. Confirm project and cluster names match exactly with your MongoDB Atlas configuration
  5. Confirm your cluster type - Some cluster types do not support logging as mentioned here. Ensure you are using the appropriate MongoDB Atlas cluster.

Metrics Collection Issues

  1. Review collector logs for any error messages related to MongoDB Atlas API calls
  2. Confirm your cluster type - Available metrics depend on user role and cluster type as mentioned here. Ensure you are using the appropriate MongoDB Atlas cluster, and API key with appropriate role.

Last updated: July 20, 2025

Was this page helpful?