Skip to main content

MongoDB Performance Metrics

Sharded Cluster Metrics

Metric AliasMetric DescriptionUnit
Connection DetailsMongoDB cluster connection details; mongos node connection count is the sum of all nodes, configServer and shard use the Primary node connection count
Cursor CountNumber of cursors in MongoDB cluster; configServer and shard use the Primary node connection count
Table Count per ShardNumber of tables on each shard in the cluster; sum(metric_value) by shard
Table Size per ShardTable size on each shard in the cluster; sum(metric_value) by shardBytes
Index Size per ShardIndex size on each shard in the cluster; sum(metric_value) by shardBytes
Index Count per ShardIndex count on each shard in the cluster; sum(metric_value) by shard
Document Count per ShardDocument count on each shard in the cluster; sum(metric_value) by shard
Balancer EnabledWhether Balancer is enabled in the cluster; take the max value (top1) among all instances
Cluster EventsAverage number of events triggered per second in the cluster (metric_value>0 means event triggered); event dimension value indicates different event names
Chunk Balancer EnabledWhether Chunk Balancer is enabled; take the min value (top1) among all instances; after the chunk threshold is triggered, the cluster will automatically migrate and balance chunks across all shards
Chunk CountNumber of chunks in the cluster; sum(value) by ty_cluster
Partitioned Table CountNumber of partitioned tables in the cluster
Sharded Database CountNumber of databases in partitions in the cluster; take the max value (top1) among all instances
Chunk Count per ShardNumber of chunks on each shard in the cluster; sum(metric_value) by shard
Draining Shard CountNumber of shards in Draining state in the cluster; take the max value (top1) among all instances; after removeShard, the shard will be in Draining state until the balancer migrates all chunks off and deletes the shard
Shard CountNumber of shards in the cluster; take the max value (top1) among all instances
Operation CountMongoDB cluster operation details. mongos node connection count is the sum of all nodes, configServer and shard use the Primary node connection count; type dimension value insert, update, delete, query, sum as QPS
Connection Ratiocurrent/total%

Replica Set Metrics

Metric AliasMetric DescriptionUnit
Last Election TimeTime of last election in replica set; take the max value (top1) among all instances
Election OccurredWhether an election occurred in the replica set, 0-no; >0 means occurred
Replication LagReplication lag time, secondary and primary lag
Replica Set StatusRole status of each instance in the replica set, 1-primary; 2-secondary; 7-arbiter
Ping LatencyPing latency of replica set members; take the max value (top1) among all instances

Instance Metrics

Metric AliasMetric DescriptionUnit
UptimeUptime of this components
RoleMongoDB role
VersionMongoDB version
AvailabilityMongoDB availability
CPU UsageProcess CPU usage%
Memory UsedProcess memory usageBytes
Memory UsageProcess memory usage / host total memory%
Disk Throughput (Read)Process disk read throughput per secondBytes/s
Disk Throughput (Write)Process disk write throughput per secondBytes/s
Traffic (Send)Bytes sent per second by MongoDBBytes/s
Traffic (Receive)Bytes received per second by MongoDBBytes/s
Throughput (QPS)Number of commands executed per secondCount/s
Throughput DetailsNumber of insert, delete, update, return per secondCount/s
Average Response TimeAverage response time of servicems
Response Time DetailsAverage response time for specific operationsms
Cursor TotalTotal number of open cursors
Pinned Cursor CountNumber of open pinned cursors
noTimeout Cursor CountNumber of open cursors with DBQuery.Option.noTimeout set
Connection CountCurrent number of connections
Active Connection CountCurrent number of active connections
Connection RatioCurrent connections / max connections%
Queue Lock CountNumber of requests waiting for lock
Read Lock CountNumber of requests waiting for read lock
Write Lock CountNumber of requests waiting for write lock
Storage EngineStorage engine type
Data SizeBytes used by databaseBytes
Memory Usage DetailsBytes used for mapped, resident, virtual memoryBytes
Index SizeBytes used by database indexesBytes
Replication LagMaster-slave replication lags
Cache UsageWiredTiger cache usage, calculated as current usage / max configured%
Cache UsedData stored in WiredTiger cache (after decompression)Bytes
Cache MaxMax value set for WiredTiger cacheBytes
Transaction CountAverage number of internal transactions per second in WiredTiger engine
Evicted Page CountAverage number of cache pages evicted per second in WiredTiger engine