Updated on 2024-07-04 GMT+08:00

MongoDB Monitoring

This section describes the types, names, and meanings of MongoDB metrics collected by APM.

Table 1 Collection parameters for MongoDB monitoring

Parameter

Data Type

Application Type

Default

Supported Start Agent Version

Supported End Agent Version

Description

TraceReportTimeSpanThreshold(ms)

integer

JAVA

1

2.1.13

-

Threshold for reporting getConnection method traces. If the threshold is not exceeded, such traces will not be reported.

isParseOriginalCommand

radio

JAVA

false

2.2.2

-

Indicates whether to collect original Mongo JSON commands.

Table 2 MongoDB metrics

Category

Metric

Name

Description

Unit

Data Type

Default Aggregation Mode

Connection details (connection)

host

Connected Host

Connected host

-

ENUM

LAST

concurrentMax

Max. Concurrency

Maximum concurrency

-

INT

MAX

invokeCount

Calls

Number of calls

-

INT

SUM

totalTime

Total Time

Total time

-

INT

SUM

errorCount

Errors

Number of errors

-

INT

SUM

maxTime

Max. RT

Maximum response time

-

INT

SUM

range1

0–10 ms

Number of requests with 0–10 ms response time

-

INT

SUM

range2

10–100 ms

Number of requests with 10–100 ms response time

-

INT

SUM

range3

100–500 ms

Number of requests with 100–500 ms response time

-

INT

SUM

range4

500–1000 ms

Number of requests with 500–1000 ms response time

-

INT

SUM

range5

1–10s

Number of requests with 1–10s response time

-

INT

SUM

range6

> 10s

Number of requests with response time longer than 10s

-

INT

SUM

openedCount

Opened Connections

Number of opened connections

-

INT

SUM

closedCount

Closed Connections

Number of closed connections

-

INT

SUM

idleClosedCount

Connections Closed Due to Idling

Number of connections that are closed due to long idle time

-

INT

SUM

lifeClosedCount

Connections Closed Due to Keepalive Timeout

Number of connections that are closed due to keepalive timeout

-

INT

SUM

errorClosedCount

Connections Closed Due to Errors

Number of connections that are closed due to errors

-

INT

SUM

staleClosedCount

Connections Closed Due to Pool Clearing

Number of connections that are closed due to pool clearing

-

INT

SUM

poolClosedClosedCount

Connections Closed Due to Pool Closure

Number of connections that are closed due to pool closure

-

INT

SUM

Exception (exception: exception statistics of MongoDB calls)

exceptionType

Exception Type

Exception type

-

ENUM

LAST

causeType

Exception Class

Exception class

-

ENUM

LAST

count

Count

Number of times the exception has occurred

-

INT

SUM

message

Exception Message

Message returned when the exception occurred

-

STRING

LAST

stackTrace

Exception Stack

Exception stack information

-

CLOB

LAST

Cluster information (clusterInfo)

clusterId

Cluster ID

Cluster ID

-

ENUM

LAST

hosts

Cluster Node Information Set on Client

Cluster node information set on the client

-

STRING

LAST

MongoDB call monitoring (client)

namespace

Namespace

Namespace corresponding to the MongoDB operation

-

ENUM

LAST

command

Command

Command run on the MongoDB server

-

ENUM

LAST

concurrentMax

Max. concurrency

Maximum concurrency

-

INT

MAX

queryCount

Read Rows

Number of read rows

-

INT

SUM

updateCount

Updated Rows

Number of updated rows

-

INT

SUM

errorCount

Errors

Number of errors

-

INT

SUM

errorTraceId

Error Trace ID

ID of the trace that encounters an error in a collection period

-

STRING

LAST

slowTraceId

Slow Trace ID

ID of the slowest trace in a collection period

-

STRING

LAST

invokeCount

Calls

Number of calls

-

INT

SUM

lastError

Error Message

Error message

-

STRING

LAST

maxTime

Max. RT

Maximum response time

-

INT

MAX

totalTime

Total RT

Total response time

-

INT

SUM

range1

0–10 ms

Number of requests with 0–10 ms response time

-

INT

SUM

range2

10–100 ms

Number of requests with 10–100 ms response time

-

INT

SUM

range3

100–500 ms

Number of requests with 100–500 ms response time

-

INT

SUM

range4

500–1000 ms

Number of requests with 500–1000 ms response time

-

INT

SUM

range5

1–10s

Number of requests with 1–10s response time

-

INT

SUM

range6

> 10s

Number of requests with response time longer than 10s

-

INT

SUM

MongoDB version (version)

version

Version

Version

-

STRING

LAST

MongoDB summary (total: summary of MongoDB call statistics)

invokeCount

Calls

Total number of calls

-

INT

SUM

queryCount

Total Read Rows

Total number of read rows

-

INT

SUM

updateCount

Total Updated Rows

Total number of updated rows

-

INT

SUM

errorCount

Total Errors

Total number of errors

-

INT

SUM

totalTime

Total RT

Total response time

-

INT

SUM

MongoDB cluster call (cluster)

nodes

Cluster Node

Cluster node information

-

ENUM

LAST

concurrentMax

Max. Concurrency

Maximum concurrency

-

INT

MAX

errorCount

Errors

Number of errors

-

INT

SUM

errorTraceId

Error Trace ID

ID of the trace that encounters an error in a collection period

-

STRING

LAST

slowTraceId

Slow Trace ID

ID of the slowest trace in a collection period

-

STRING

LAST

invokeCount

Calls

Number of calls

-

INT

SUM

lastError

Error Message

Error message

-

STRING

LAST

maxTime

Max. RT

Maximum response time

-

INT

MAX

totalTime

Total RT

Total response time

-

INT

SUM

range1

0–10 ms

Number of requests with 0–10 ms response time

-

INT

SUM

range2

10–100 ms

Number of requests with 10–100 ms response time

-

INT

SUM

range3

100–500 ms

Number of requests with 100–500 ms response time

-

INT

SUM

range4

500–1000 ms

Number of requests with 500–1000 ms response time

-

INT

SUM

range5

1–10s

Number of requests with 1–10s response time

-

INT

SUM

range6

> 10s

Number of requests with response time longer than 10s

-

INT

SUM

Connection pool monitoring (connectionPool)

host

Connection Address

Connection address

-

ENUM

LAST

maxSize

Max. Pool Size

Maximum connection pool size

-

INT

AVG

minSize

Min. Pool Size

Minimum connection pool size

-

INT

AVG

availableCount

Idle Connections

Number of idle connections

-

INT

AVG

inUseCount

Active Connections

Number of active connections

-

INT

AVG

maxWaitTimeMs

Max. Waiting Time (ms)

Maximum waiting time of a connection (ms)

-

INT

AVG

maxConnectionLifeTimeMs

Max. Keepalive Time

Maximum keepalive time of a connection

-

INT

AVG

maxConnectionIdleTimeMs

Max. Idle Time

Maximum idle time of a connection

-

INT

AVG

MongoDB node call monitoring (serverNode)

serverAddr

Node Address

Node address

-

ENUM

LAST

type

Node Type

Node type

-

STRING

LAST

concurrentMax

Max. Concurrency

Maximum concurrency

-

INT

MAX

errorCount

Errors

Number of errors

-

INT

SUM

errorTraceId

Error Trace ID

ID of the trace that encounters an error in a collection period

-

STRING

LAST

slowTraceId

Slow Trace ID

ID of the slowest trace in a collection period

-

STRING

LAST

invokeCount

Calls

Number of calls

-

INT

SUM

lastError

Error Message

Error message

-

STRING

LAST

maxTime

Max. RT

Maximum response time

-

INT

MAX

totalTime

Total RT

Total response time

-

INT

SUM

range1

0–10 ms

Number of requests with 0–10 ms response time

-

INT

SUM

range2

10–100 ms

Number of requests with 10–100 ms response time

-

INT

SUM

range3

100–500 ms

Number of requests with 100–500 ms response time

-

INT

SUM

range4

500–1000 ms

Number of requests with 500–1000 ms response time

-

INT

SUM

range5

1–10s

Number of requests with 1–10s response time

-

INT

SUM

range6

> 10s

Number of requests with response time longer than 10s

-

INT

SUM