Project: SkyWalking (Observability and Analysis / Observability)
File: backend-mongodb-monitoring.md

SkyWalking leverages mongodb-exporter for collecting metrics data from MongoDB. It leverages OpenTelemetry Collector to transfer the metrics to and into the . The `mongodb-exporter` collects metrics data from MongoDB. The exporter works side by side with the MongoDB node. OpenTelemetry Collector fetches metrics from mongodb-exporter via Prometheus Receiver and pushes metrics to SkyWalking OAP Server via OpenTelemetry gRPC exporter. The SkyWalking OAP Server parses the expression with to filter/calculate/aggregate and store the results. Setup . Set up . The example for OpenTelemetry Collector configuration, refer to . Config SkyWalking . MongoDB monitoring provides multidimensional metrics monitoring of MongoDB clusters as `Layer: MONGODB` `Service` in the OAP. In each cluster, the nodes are represented as

| Monitoring Panel | Unit | Metric Name | Description | Data Source | |||-||| | Uptime (day) | day | metermongodbcluster_uptime | Maximum uptime of nodes in the cluster | mongodb-exporter | | Data Size (GB) | GB | metermongodbclusterdatasize | Total data size of the cluster | mongodb-exporter | | Collection Count | | metermongodbclustercollectioncount | Number of collection of the cluster | mongodb-exporter | | Object Count | | metermongodbclusterobjectcount | Number of object of the cluster | mongodb-exporter | | Document Total QPS | | metermongodbclusterdocumentavg_qps | Total document operations rate of nodes | mongodb-exporter | | Operation Total QPS | | metermongodbclusteroperationavg_qps | Total operations rate of nodes | mongodb-exporter | | Total Connections | | metermongodbcluster_connections | Cluster total connections of nodes | mongodb-exporter | | Cursor Total | | metermongodbclustercursoravg | Total Opened cursor of nodes | mongodb-exporter | | Replication Lag (ms) | ms | metermongodbclusterrepllag | Repl set member avg replication lag, this metric works in repl mode | mongodb-exporter | | DB Total Data Size (GB) | GB | metermongodbclusterdbdata_size | Total data size of every database | mongodb-exporter | | DB Total Index Size (GB) | GB | metermongodbclusterdbindex_size | Total index size per of every database | mongodb-exporter | | DB Total Collection Count | | metermongodbclusterdbcollection_count | Total collection count of every database | mongodb-exporter | | DB Total Index Count | | metermongodbclusterdbindex_count | Total index count of every database | mongodb-exporter | | Monitoring Panel | Unit | Metric Name | Description | Data Source | |||--||| | Uptime (day) | day | metermongodbnode_uptime | Uptime of the node | mongodb-exporter | | QPS | | metermongodbnode_qps | Operations per second of the node | mongodb-exporter | | Latency | s | metermongodbnodeoprate<br/>metermongodbnodelatencyrate | Latency of operations | mongodb-exporter | | Memory Usage | % | metermongodbnodememoryusage | Memory usage percent of RAM | mongodb-exporter | | Version | | metermongodbnode_version | MongoDB edition and version | mongodb-exporter | | ReplSet State | | metermongodbnodersstate | Repl set state of the node, this metric works in repl mode | mongodb-exporter | | CPU Usage (%) | % | metermongodbnodecputotal_percentage | Cpu usage percent of the node | mongodb-exporter | | Network (KB/s) | KB/s | metermongodbnodenetworkbytesin<br/>metermongodbnodenetworkbytesout | Inbound and outbound network bytes of node | mongodb-exporter | | Memory Free (GB) | GB | metermongodbnodememoryfreekb<br/>metermongodbnodeswapmemoryfree_kb | Free memory of RAM and swap | mongodb-exporter | | Disk (GB) | GB | metermongodbnodefsusedsize<br/>metermongodbnodefstotalsize | Used and total size of disk | mongodb-exporter | | Connections | | metermongodbnode_connections | Connection nums of node | mongodb-exporter | | Active Client | | metermongodbnodeactivetotalnum<br/>metermongodbnodeactivereadernum<br/>metermongodbnodeactivewriter_num | Count of active reader and writer | mongodb-exporter | | Transactions | | metermongodbnodetransactionsactive<br/>metermongodbnodetransactionsinactive | Count of transactions running on the node | mongodb-exporter | | Document QPS | | metermongodbnodedocumentqps | Document operations per second | mongodb-exporter | | Operation QPS | | metermongodbnodeoperationqps | Operations per second | mongodb-exporter | | Repl Operation QPS | | metermongodbnodereploperation_qps | Repl operations per second | mongodb-exporter | | Operation Latency (s) | s | metermongodbnodeoprate<br/>metermongodbnodelatencyrate | Latencies for different operation type | mongodb-exporter | | Cursor | | metermongodbnode_cursor | Opened cursor of the node | mongodb-exporter | | Server Status Memory (MB) | MB | metermongodbnodememvirtual<br/>metermongodbnodememresident | Virtual and resident memory of the node | mongodb-exporter | | Asserts | | metermongodbnode_asserts | The rate of raised assertions | mongodb-exporter | | Repl Buffer Count | | metermongodbnodereplbuffer_count | The current number of operations in the oplog buffer | mongodb-exporter | |