MongoDBAtlas Monitoring

Atlas Monitoring

Atlas ships a full monitoring stack out of the box — metrics, slow query profiling, index advice, and alerting — without installing anything. Knowing where to look before something breaks is most of the job.

Metrics Dashboard

Every cluster has a Metrics tab with real-time and historical graphs. The ones worth checking regularly:

Metric

What it tells you

Opcounters

Rate of inserts/queries/updates/deletes — your baseline load shape

Connections

Current vs available — approaching the limit predicts connection errors

Tickets Available (Read/Write)

WiredTiger concurrency tickets free — exhaustion means requests queue up

Query Targeting (Scanned / Returned)

Ratio near 1:1 is healthy; a high ratio means unindexed or poorly targeted queries

Replication Lag

How far behind secondaries are — high lag risks stale reads and slower failover

Disk IOPS / Latency

Storage layer pressure — sustained high latency slows every operation

Cache Usage / Eviction (WiredTiger)

Whether your working set fits in RAM

Performance Advisor

Performance Advisor analyzes your slow query logs and suggests specific indexes to add, along with the queries that would benefit and estimated impact. It also flags indexes that look redundant or are never used.

Tip
Treat Performance Advisor suggestions as a starting point, not an auto-apply list — verify a suggested index actually matches your real query shapes (check the ESR rule) before creating it, and watch for suggestions that overlap with an index you already have.
Query Profiler

The Query Profiler surfaces individual slow operations (above a configurable threshold, default 100ms) with full details: the query shape, execution time, documents scanned vs returned, and whether an index was used.

JS
// The same data is available manually via the profiler collection
// (also works on self-hosted deployments, not just Atlas)
db.setProfilingLevel(1, { slowms: 100 })
db.system.profile.find().sort({ ts: -1 }).limit(10)
Alerts

Configure alerts under Project Settings → Alerts so you find out about problems before a user reports them.

  • Connections % of limit above a threshold (e.g. 80%).

  • Replication lag above a few seconds.

  • Disk usage above 80-90% of provisioned storage.

  • Query targeting ratio exceeding a threshold, suggesting missing indexes.

  • CPU/memory sustained above a threshold for several minutes.

  • Primary elected (failover occurred) — useful even if handled automatically, so you know it happened.

Real-Time Panel

The Real Time tab shows second-by-second operation counts, active connections, and current network/disk throughput — useful when actively debugging a live incident rather than reviewing historical trends.

What to Watch in Production
  • Query targeting ratio creeping up over weeks — usually means a new feature shipped a query with no supporting index.

  • Replication lag spikes correlating with large batch writes or backups — may need to throttle bulk jobs.

  • Connection count climbing steadily — check for a connection leak (a service not closing/reusing MongoClient properly).

  • Cache eviction rate rising — working set has outgrown available RAM, a leading signal to scale up before latency visibly degrades.

  • Any COLLSCAN showing up repeatedly in the Query Profiler for a query running at meaningful frequency.

Warning
Dashboards tell you something is wrong; they rarely tell you why on their own. Pair Atlas metrics with your application-level logging (request tracing, slow endpoint alerts) to connect a database symptom back to the code path that caused it.
Summary
  • The Metrics dashboard is your baseline — know what normal looks like before an incident happens.

  • Performance Advisor and Query Profiler turn real production traffic into concrete index suggestions.

  • Set alerts on connections, replication lag, disk usage, and query targeting so problems surface before users notice.

  • Watch query targeting ratio and cache eviction rate as the earliest leading indicators of a scaling problem.