MongoDB — Prod Overview

Production-grade MongoDB observability — ops, latency, connections, WiredTiger, replication, DB stats, profiler.

MongoDB — Prod Overview screenshot 1
MongoDB — Prod Overview screenshot 2
MongoDB — Prod Overview screenshot 3
MongoDB — Prod Overview screenshot 4
MongoDB — Prod Overview screenshot 5
MongoDB — Prod Overview screenshot 6

MongoDB — Production Overview

53-panel production-grade MongoDB monitoring dashboard for mongodb-exporter — a lightweight, purpose-built Prometheus exporter written in Go.

GitHub: https://github.com/gurjarchetan/mongodb-exporter


What this dashboard shows

The dashboard is organised into 7 rows:

RowPanelsWhat it tells you
StatusMongoDB Up, Uptime, Ops/s, Open Connections, Active Connections, Resident Memory, WiredTiger Cache %, Replication LagAt-a-glance health of the instance
Operations & LatencyOpcounters time-series, Read latency, Write latency, Command latencyThroughput trends and response-time breakdowns by operation type
ConnectionsCurrent / available / created rateConnection pool pressure over time
WiredTiger InternalsCache reads/writes, evictions, pages read/written, concurrent transactionsStorage engine deep-dive for performance tuning
Database StatisticsStorage size bar gauge (per DB), Documents bar gauge (per DB), detail table with Total Size colour-codingCapacity planning across databases
Replica SetRS member table (role, health, uptime, replication lag with threshold colouring)Replica-set topology and lag monitoring
Slow Query ProfilerProfiling level stat per database (colour-coded: OFF / SLOW OPS / ALL OPS), profiler level state-timeline historyReal-time visibility into MongoDB's built-in query profiler state

How metrics are collected

Metrics are scraped by mongodb-exporter — a Go binary that exposes a /metrics Prometheus endpoint (default port 9216).

Collectors and their MongoDB sources:

CollectorMongoDB commandKey metrics
serverStatusdb.runCommand({serverStatus: 1})mongodb_opcounters_*, mongodb_connections_*, mongodb_mem_*, mongodb_uptime_seconds, mongodb_up
wiredTigerembedded in serverStatusmongodb_wiredtiger_cache_*, mongodb_wiredtiger_concurrent_transactions_*
dbStatsdb.runCommand({dbStats: 1}) per databasemongodb_dbstats_storage_size_bytes, mongodb_dbstats_objects, mongodb_dbstats_data_size_bytes, mongodb_dbstats_indexes
replSetGetStatusdb.adminCommand({replSetGetStatus: 1})mongodb_replset_member_health, mongodb_replset_member_uptime_seconds, mongodb_replset_optime_lag_seconds
opLatenciesembedded in serverStatusmongodb_op_latencies_latency_total, mongodb_op_latencies_ops_total
profiledb.runCommand({profile: -1}) per databasemongodb_profiling_level

Quick start (Docker Compose — full stack):

# Spins up MongoDB 8.0 + Exporter + Prometheus + Grafana in one command
git clone https://github.com/gurjarchetan/mongodb-exporter
cd mongodb-exporter
docker compose up -d
# Grafana → http://localhost:3000 (admin / admin)

Prometheus scrape config:

scrape_configs:
  - job_name: mongodb
    static_configs:
      - targets: ['mongodb-exporter:9216']
    scrape_interval: 15s

Enabling the slow query profiler (shows data in the Profiler row):

// MongoDB shell — enable slow op logging (>0 ms)
use admin
db.adminCommand({ profile: 1, slowms: 0 })

Requirements

  • Prometheus (any modern version)
  • MongoDB 6.0, 7.0, or 8.0 (standalone or replica set)
  • mongodb-exporter running and scraped by Prometheus

The datasource variable DS_PROMETHEUS maps to your Prometheus instance — set it when importing.

Revisions
RevisionDescriptionCreated
MongoDB

MongoDB

by Grafana Labs
Grafana Labs solution

Easily monitor MongoDB, a general purpose, document-based, distributed database, with Grafana Cloud's out-of-the-box monitoring solution.

Learn more

Get this dashboard

Import the dashboard template

or

Download JSON

Datasource
Dependencies