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

host

Connected host

-

ENUM

LAST

concurrentMax

concurrentMax

Maximum concurrency

-

INT

MAX

invokeCount

invokeCount

Number of calls

-

INT

SUM

totalTime

totalTime

Total time

-

INT

SUM

errorCount

errorCount

Number of errors

-

INT

SUM

maxTime

maxTime

Maximum response time

-

INT

SUM

range1

range1

Number of requests with 0-10 ms response time

-

INT

SUM

range2

range2

Number of requests with 10-100 ms response time

-

INT

SUM

range3

range3

Number of requests with 100-500 ms response time

-

INT

SUM

range4

range4

Number of requests with 500-1000 ms response time

-

INT

SUM

range5

range5

Number of requests with 1-10s response time

-

INT

SUM

range6

range6

Number of requests with response time longer than 10s

-

INT

SUM

openedCount

openedCount

Number of opened connections

-

INT

SUM

closedCount

closedCount

Number of closed connections

-

INT

SUM

idleClosedCount

idleClosedCount

Number of connections that are closed due to long idle time

-

INT

SUM

lifeClosedCount

lifeClosedCount

Number of connections that are closed due to keepalive timeout

-

INT

SUM

errorClosedCount

errorClosedCount

Number of connections that are closed due to errors

-

INT

SUM

staleClosedCount

staleClosedCount

Number of connections that are closed due to pool clearing

-

INT

SUM

poolClosedClosedCount

poolClosedClosedCount

Number of connections that are closed due to pool closure

-

INT

SUM

Exception (exception: exception statistics of MongoDB calls)

exceptionType

exceptionType

Exception type

-

ENUM

LAST

causeType

causeType

Exception class

-

ENUM

LAST

count

count

Number of times the exception has occurred

-

INT

SUM

message

message

Message returned when the exception occurred

-

STRING

LAST

stackTrace

stackTrace

Exception stack information

-

CLOB

LAST

Cluster information (clusterInfo)

clusterId

clusterId

Cluster ID

-

ENUM

LAST

hosts

hosts

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

concurrentMax

Maximum concurrency

-

INT

MAX

queryCount

queryCount

Number of read rows

-

INT

SUM

updateCount

updateCount

Number of updated rows

-

INT

SUM

errorCount

errorCount

Number of errors

-

INT

SUM

errorTraceId

errorTraceId

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

-

STRING

LAST

slowTraceId

slowTraceId

ID of the slowest trace in a collection period

-

STRING

LAST

invokeCount

invokeCount

Number of calls

-

INT

SUM

lastError

lastError

Error message

-

STRING

LAST

maxTime

maxTime

Maximum response time

-

INT

MAX

totalTime

totalTime

Total response time

-

INT

SUM

range1

range1

Number of requests with 0-10 ms response time

-

INT

SUM

range2

range2

Number of requests with 10-100 ms response time

-

INT

SUM

range3

range3

Number of requests with 100-500 ms response time

-

INT

SUM

range4

range4

Number of requests with 500-1000 ms response time

-

INT

SUM

range5

range5

Number of requests with 1-10s response time

-

INT

SUM

range6

range6

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

invokeCount

Total number of calls

-

INT

SUM

queryCount

queryCount

Total number of read rows

-

INT

SUM

updateCount

updateCount

Total number of updated rows

-

INT

SUM

errorCount

errorCount

Total number of errors

-

INT

SUM

totalTime

totalTime

Total response time

-

INT

SUM

MongoDB cluster call (cluster)

nodes

nodes

Cluster node information

-

ENUM

LAST

concurrentMax

concurrentMax

Maximum concurrency

-

INT

MAX

errorCount

errorCount

Number of errors

-

INT

SUM

errorTraceId

errorTraceId

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

-

STRING

LAST

slowTraceId

slowTraceId

ID of the slowest trace in a collection period

-

STRING

LAST

invokeCount

invokeCount

Number of calls

-

INT

SUM

lastError

lastError

Error message

-

STRING

LAST

maxTime

maxTime

Maximum response time

-

INT

MAX

totalTime

totalTime

Total response time

-

INT

SUM

range1

range1

Number of requests with 0-10 ms response time

-

INT

SUM

range2

range2

Number of requests with 10-100 ms response time

-

INT

SUM

range3

range3

Number of requests with 100-500 ms response time

-

INT

SUM

range4

range4

Number of requests with 500-1000 ms response time

-

INT

SUM

range5

range5

Number of requests with 1-10s response time

-

INT

SUM

range6

range6

Number of requests with response time longer than 10s

-

INT

SUM

Connection pool monitoring (connectionPool)

host

host

Connection address

-

ENUM

LAST

maxSize

maxSize

Maximum connection pool size

-

INT

AVG

minSize

minSize

Minimum connection pool size

-

INT

AVG

availableCount

availableCount

Number of idle connections

-

INT

AVG

inUseCount

inUseCount

Number of active connections

-

INT

AVG

maxWaitTimeMs

maxWaitTimeMs

Maximum waiting time of a connection (ms)

-

INT

AVG

maxConnectionLifeTimeMs

maxConnectionLifeTimeMs

Maximum keepalive time of a connection

-

INT

AVG

maxConnectionIdleTimeMs

maxConnectionIdleTimeMs

Maximum idle time of a connection

-

INT

AVG

MongoDB node call monitoring (serverNode)

serverAddr

serverAddr

Node address

-

ENUM

LAST

type

type

Node type

-

STRING

LAST

concurrentMax

concurrentMax

Maximum concurrency

-

INT

MAX

errorCount

errorCount

Number of errors

-

INT

SUM

errorTraceId

errorTraceId

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

-

STRING

LAST

slowTraceId

slowTraceId

ID of the slowest trace in a collection period

-

STRING

LAST

invokeCount

invokeCount

Number of calls

-

INT

SUM

lastError

lastError

Error message

-

STRING

LAST

maxTime

maxTime

Maximum response time

-

INT

MAX

totalTime

totalTime

Total response time

-

INT

SUM

range1

range1

Number of requests with 0-10 ms response time

-

INT

SUM

range2

range2

Number of requests with 10-100 ms response time

-

INT

SUM

range3

range3

Number of requests with 100-500 ms response time

-

INT

SUM

range4

range4

Number of requests with 500-1000 ms response time

-

INT

SUM

range5

range5

Number of requests with 1-10s response time

-

INT

SUM

range6

range6

Number of requests with response time longer than 10s

-

INT

SUM