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

Field nameUnitDescriptionRemarks
inActTimeMillisecond(ms)Amount of time the agent remains inactive-
isActive-Whether the agent is active or nottrue / false
isRestart-Whether the agent has been recently restartedtrue / false
lastActTimeMillisecond(ms)Time when the agent was last activated0: If disabled
oid-Unique IDs for each agent in the project-
startTimeMillisecond(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.

Tag nameDescriptionRemarks
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_user(xos)pctTime spent for CPU to execute user code.
cpu_sys(xos)pctTime spent for CPU to execute the kernel code.
cpu_iowait(xos)pctCPU time waited for IO.
cpu_idle(xos)pctCPU processor's idle time.
disk_reads(xos)blockAmount of data read from disk.
disk_read_bytes(xos)byteAmount of data read from disk.
disk_writes(xos)blockAmount of data written to disk.
disk_write_bytes(xos)byteAmount of data written to disk.
mem(xos)pctMemory utilization.
mem_total(xos)MBTotal amount of memory.
mem_free(xos)MBAmount of memory not in use by the system.
mem_used(xos)MBAmount of memory in use by the system.
mem_buffcache(xos)MBAmount of memory used by the buff/cache.
mem_swaptotal(xos)MBSet this in preparation for the case where the total Swap size and physical memory are insufficient.
mem_swapfree(xos)MBBecause the unused Swap area and Swap area are secured in disk space, the system performance may drop drastically while using Swap.
mem_available(xos)MBAvailable memory area.
net_recv_bytes(xos)byteAmount of data received over the network.
net_recv_packets(xos)-Number of data packets received over the network.
net_send_bytes(xos)byteAmount of data transmitted over the network.
net_send_packets(xos)-Number of data packets transmitted over the network.