Skip to main content

MongoDB Metrics

Database metrics are comprehensive data collected for database workloads and resource usages. The WhaTap monitoring service continuously collects metrics to identify bottlenecks in the database and provides data to help identify the root causes of performance issues.

MongoDB collects key metrics from db.serverStatus, and the following lists the descriptions for the collected key metrics: For more information about other metrics, see the following.

agent_status_summary

This category collects metrics related to agent status every 10 seconds.

Fields

FieldTypeUnitDescription
inActTime-Millisecond(ms)Amount of time the agent remains inactive
isActiveBoolean-Whether the agent is active or not
isRestartBoolean-Whether the agent was restarted recently (true / false)
lastActTime-Millisecond(ms)Last time when the agent was activated (0: Disabled)
oid--Unique IDs for each agent in the project
startTime-Millisecond(ms)Timestamp when the agent was started.

db_mongodb_counter

Tags

The following lists the tags that are collected in the db_mongodb_counter category.

TagDescriptionRemarks
onameAgent nameUnique value

Field

The following lists the fields that are collected in the db_mongodb_counter category.

MetricsDescription
accepted$tcpFastOpen$networkNumber of network connections accepted via TCP Fast Open.
active$connectionsNumber of active clients in progress.
available$connectionsNumber of available network connections.
awaitingTopologyChanges$connectionsNumber of connections waiting for topology changes.
bytesIn$compressor$snappy$compression$networkNetwork bytes received via Snappy compression.
bytesIn$compressor$zlib$compression$networkNetwork bytes received through zlib compression.
bytesIn$compressor$zstd$compression$networkNumber of network bytes received via zstd compression.
bytesIn$decompressor$snappy$compression$networkNumber of network bytes received via Snappy decompression.
bytesIn$decompressor$zlib$compression$networkNumber of network bytes received through zlib decompression.
bytesIn$decompressor$zstd$compression$networkNumber of network bytes received via zstd decompression.
bytesIn$networkTotal network bytes received by the server via connection from a MongoDB client or other instances.
bytesOut$compressor$snappy$compression$networkNetwork bytes transmitted via Snappy compression.
bytesOut$compressor$zlib$compression$networkNetwork bytes transmitted via zlib compression.
bytesOut$compressor$zstd$compression$networkNumber of network bytes transmitted via zstd compression.
bytesOut$decompressor$snappy$compression$networkNumber of network bytes transmitted via Snappy decompression.
bytesOut$decompressor$zlib$compression$networkNumber of network bytes transmitted through zlib decompression.
bytesOut$decompressor$zstd$compression$networkNumber of network bytes transmitted via zstd decompression.
bytesOut$networkTotal network bytes transmitted by the server via connection from a MongoDB client or other instances.
clientsInTotal$fixed$serviceExecutors$networkTotal number of clients processed in the fixed service executors.
clientsInTotal$passthrough$serviceExecutors$networkTotal number of clients processed in the passthrough service executors.
clientsRunning$fixed$serviceExecutors$networkTotal number of clients being run in the fixed service executors.
clientsRunning$passthrough$serviceExecutors$networkTotal number of clients being run in the passthrough service executors.
clientsWaitingForData$fixed$serviceExecutors$networkTotal number of clients waiting for data in the fixed service executors.
clientsWaitingForData$passthrough$serviceExecutors$networkNumber of clients waiting for data in the passthrough service executors.
command$opcountersTotal number of commands executed in the database.
connect_errorNumber of connection errors.
cpuCPU utilization calculated using the user_time_us and system_time_us values in the extra_info metric.
cpu_coresNumber of available CPU cores
cpu_sysCPU time used in the system.
cpu_userCPU time used for user tasks.
current$connectionsTotal number of clients connected to the current server.
delete$opcountersNumber of delete commands processed.
exhaustHello$connectionsNumber of connections associated with the the exhaustHello message.
exhaustIsMaster$connectionsNumber of connections associated with the exhaustIsMaster message.
fatal countNumber of fatal errors.
getmore$opcountersNumber of getMore operations processed.
input_blocks$extra_infoInput block value of the system.
insert$opcountersNumber of Insert commands processed.
involuntary_context_switches$extra_infoAdditional information regarding the number of forced context switches.
kernelSetting$tcpFastOpen$networkKernel configuration status for TCP Fast Open.
latency$commands$opLatenciesLatency for database commands.
latency$reads$opLatenciesLatency for read operations.
latency$transactions$opLatenciesLatency for processing transactions.
latency$writes$opLatenciesLatency for write operations.
maximum_resident_set_kb$extra_infoAdditional information regarding the maximum resident set size (KB).
msg$assertsNumber of message assertions occurred.
node_stateCurrent state of the node.
numRequests$networkTotal number of network requests received by the server.
numSlowDNSOperations$networkNumber of slow DNS operations.
numSlowSSLOperations$networkNumber of slow SSL operations.
ops$commands$opLatenciesNumber of command operations processed.
ops$reads$opLatenciesNumber of read operations processed.
ops$transactions$opLatenciesNumber of transaction operations processed.
ops$writes$opLatenciesNumber of write operations processed.
output_blocks$extra_infoOutput block value of the system.
page_faults$extra_infoAdditional information regarding the page faults.
page_reclaims$extra_infoAdditional information regarding the page reclaims.
physicalBytesIn$networkPhysical bytes received.
physicalBytesOut$networkPhysical bytes transmitted.
query$opcountersNumber of query commands processed.
readers$activeClients$globalLockNumber of active read clients (global lock).
readers$currentQueue$globalLockNumber of waiting read clients (global lock).
regular$assertsNumber of general assertions occurred.
replication_delay_maxMaximum replication delay time.
resident$memActual memory size in use.
rollovers$assertsNumber of rollover assertions occurred.
system_time_us$extra_infoAdditional information regarding the system time (microseconds).
threaded$connectionsNumber of thread-based connections.
threadsRunning$fixed$serviceExecutors$networkNumber of threads being run in the fixed service executors.
threadsRunning$passthrough$serviceExecutors$networkNumber of threads being run in the passthrough service executors.
total$activeClients$globalLockNumber of active all clients (global lock).
total$currentQueue$globalLockNumber of all waiting clients (global lock).
totalCreated$connectionsTotal number of created connections.
totalTime$globalLockTotal time spent on global lock.
tripwire$assertsNumber of tripwire assertions occurred.
update$opcountersNumber of update commands processed.
user$assertsNumber of user assertions occurred.
user_time_us$extra_infoAdditional information regarding the user time (microseconds).
virtual$memVirtual memory size in use.
voluntary_context_switches$extra_infoAdditional information regarding the number of voluntary context switches.
warning countNumber of warnings.
warning$assertsNumber of warning assertions occurred.
writers$activeClients$globalLockNumber of active write clients (global lock).
writers$currentQueue$globalLockNumber of waiting write clients (global lock).
Note

WhaTap basically stores the client-related information.

XOS-related metrics

The following describes the metrics collected from the XOS agent.

MetricUnitDescription
cpu(xos)pctCPU utilization
cpu_user + cpu_sys + cpu_iowait
cpu_idle(xos)pctCPU idle time
cpu_iowait(xos)pctCPU's I/O waiting time
cpu_sys(xos)pctCPU's kernel code execution time
cpu_user(xos)pctCPU's user code execution time
disk_read_bytes(xos)byteNumber of data blocks read from disk
disk_reads(xos)blockNumber of buffers read from disk
disk_write_bytes(xos)byteNumber of pages written to disk
disk_writes(xos)blockNumber of buffers written to disk
mem(xos)pctMemory utilization
mem_available(xos)MBShared memory size
mem_buffcache(xos)MBAmount of memory used by the buff/cache
mem_free(xos)MBMemory not in use
mem_swapfree(xos)MBUnused swap space size
Because swap uses disk space, it may cause performance degradation.
mem_swaptotal(xos)MBTotal swap size
It is used when physical memory is insufficient.
mem_total(xos)MBTotal memory size
mem_used(xos)MBMemory size in use
net_recv_bytes(xos)byteAmount of data transmitted over the network
net_recv_packets(xos)countNumber of data packets transmitted over the network
net_send_bytes(xos)byteAmount of data transmitted over the network
net_send_packets(xos)countNumber of data packets transmitted over the network