- API >
- Public API Resources >
- Measurements and Alerts >
- Measurements
Measurements¶
On this page
Retrieves measurements collected by the Monitoring and Automation Agents for your MongoDB processes, databases, and hardware disks. Monitoring Agents collect process and database measurements using MongoDB diagnostic commands, including serverStatus and dbStats. Automation Agents collect measurements for servers that run managed mongod and mongos processes.
Query Parameters¶
When you issue a GET
command to retrieve measurements through the
measurements
endpoint, you must include the granularity
parameter and
either the period
or start
and end
parameters.
Each endpoint supports the following query parameters:
Parameter | Description |
---|---|
granularity |
An ISO-8601-formatted time
period that specifies the interval between measurement data points. For
example, The supported values for this parameter are the same as are available in the Granularity drop-down list when you view metrics in the Ops Manager interface. |
period |
How far back in the past to retrieve measurements, as specified by an
ISO-8601 period string. For example, setting PT24H specifies 24
hours. An ISO-8601-formatted time period that specifies how far back in
the past to query. For example, to request the last 36 hours, specify:
period=P1DT12H . |
start |
The time at which to start retrieving measurements, as specified by an
ISO-8601 timestamp string. If you specify start you must also
specify end . |
end |
The time at which to stop retrieving measurements, as specified by an
ISO-8601 timestamp string. If you specify end you must also
specify start . |
m |
Specifies which measurements to return. If To specify multiple values for You must specify measurements that are valid for the host. Ops Manager returns an error if any specified measurements are invalid For available measurements, see Measurement Types. |
Endpoints¶
Get Host, Process, and System Measurements¶
You must include the granularity
parameter
and either the period
or start
and end
parameters.
Host measurements provide data on the state of the MongoDB process. The Monitoring Agent collects host measurements through the MongoDB serverStatus and dbStats commands.
System and process measurements provide data on the CPU usage of the servers that run MongoDB. The Automation Agent collects these measurements. You must run Ops Manager Automation to retrieve system and process measurements.
Get Disk Partition Measurements¶
You must include the granularity
parameter
and either the period
or start
and end
parameters.
Disk measurements provide data on IOPS, disk use, and disk latency on the servers running MongoDB, as collected by the Automation Agent. You must run Ops Manager Automation to retrieve disk measurements.
Get Database Measurements¶
You must include the granularity
parameter
and either the period
or start
and end
parameters.
Database measurements provide statistics on database performance and storage. The Monitoring Agent collects database measurements through the dbStats command.
Get a List of Measurement Types¶
To retrieve the applicable Measurement Types without returning a large
document, issue the following GET
command with a value of PT5M
for both the
granularity
and period
. This returns a document with only one data
point for each measurement.
Ops Manager filters out any measurement types that are not applicable. For example, if you are querying a replica set’s primary, Ops Manager will not return measurements specific to replica set secondaries, such as replication lag.
Sample Entity¶
Entity Fields¶
Name | Type | Description |
---|---|---|
groupId |
string | ID of the group that owns the host. |
hostId |
string | ID of the host to which the measurements pertain. |
start |
string | The beginning of the period for which to retrieve measurements, specified as an ISO-8601 timestamp. |
end |
string | The end of the period for which to retrieve measurements, specified as an ISO-8601 timestamp. |
granularity |
string | An ISO-8601-formatted
time period that specifies the size of the interval covered by each
data point. For example, PT5M specifies a 5-minute granularity. |
databaseName |
string | The database to which the measurement applies. Only present for the following endpoint and its children: |
measurements |
object array | An array of measurements and their data points. |
measurements.dataPoints |
object array | An array of objects, where each object represents a single data
point. If there is no data point available for a particular moment in
time (i.e., a timestamp), the value field is set to null . |
measurements.dataPoints.timestamp |
string | The timestamp of the beginning of the time interval represented by this data point. |
measurements.dataPoints.value |
float | The value of the data point. |
measurements.name |
string | The name of the measurement. For possible values, see Measurement Types below on this page. |
measurements.units |
string | How the measurement is quantified. Possible units are:
|
Measurement Types¶
The measurements
endpoint returns measurement types in the
measurements.name
field.
Host Measurements¶
|
Measure the rate of asserts for a MongoDB process, as collected from
the MongoDB serverStatus
command’s asserts document. |
|
Measurement found on the host’s background flush avg chart. To view the
chart, see View Metrics. |
|
Apply to a MongoDB process’s WiredTiger
storage engine, as collected from the MongoDB serverStatus command’s
wiredTiger.cache and
wiredTiger.concurrentTransactions documents. |
|
Measures connections to a MongoDB process, as collected from the
MongoDB serverStatus
command’s connections document. |
|
Measure the number of cursors for a MongoDB
process, as collected from the MongoDB serverStatus command’s
metrics.cursor document. |
|
Measurements found on the host’s Record Stats and Page Faults
charts. To view the charts, see View Metrics. |
|
Measure operations waiting on locks, as collected from the MongoDB serverStatus command. Ops Manager computes these values based on the type of storage engine. |
|
Applicable only to hosts running MongoDB 2.0 and earlier. Measures operations waiting on the global lock, as collected from the MongoDB serverStatus command. |
|
Measurements found on the host’s btree chart. To view the chart, see
View Metrics. |
|
Measurements found on the host’s journal - commits in write lock chart
and journal stats chart. To view the charts, see
View Metrics. |
|
Measure memory for a MongoDB process, as collected from the MongoDB
serverStatus command’s
mem document. |
|
Measure throughput for MongoDB process, as collected from the MongoDB
serverStatus command’s
network document. |
|
Measurements that apply to the MongoDB process’s oplog. |
|
Measurements displayed on the host’s db storage chart. To view the
chart, see View Metrics. |
|
Measure the rate of database operations on a MongoDB process since the
process last started, as collected from the MongoDB
serverStatus command’s
opcounters document. |
|
Measure the rate of database operations on MongoDB secondaries, as collected from the MongoDB serverStatus command’s
opcountersRepl document. |
|
The average rate per second of documents returned, inserted, updated,
or deleted for a selected time period. These measurements are found on
the host’s Document Metrics chart. To view the chart, see
View Metrics. |
|
For a selected time period, the average rate per second for operations
that perform a sort but cannot perform the sort using an index. This
measurement is found on the host’s Scan and Order chart. To view
the chart, see View Metrics. |
|
Available to hosts running MongoDB v3.4+. The average execution
time in milliseconds per read, write, or command operation
over the selected time period. These measurements are found
on the host’s Operation Execution Times chart. To view the chart,
see View Metrics. |
|
The average rate per second to scan index items during
queries and query-plan evaluations. This rate is driven by
the same value as totalKeysExamined in the output of
explain. This
measurement is found on the host’s Query Executor
chart, accessed when viewing metrics. |
|
The average rate per second to scan documents during queries
and query-plan evaluations. Ops Manager derives the rate using the
explain output’s
totalDocsExamined value. This measurement is found on the
host’s Query Executor chart, accessed when viewing
metrics. |
|
The ratio of the number of index items scanned to the number of
documents returned. This measurement is found on the host’s
Query Targeting chart, accessed when viewing metrics. |
|
The ratio of the number of documents scanned to the number of
documents returned. This measurement is found on the host’s
Query Targeting chart, accessed when viewing metrics. |
|
Applicable only to hosts running MongoDB versions 2.2 through 2.6.
Measures the amount of time hosts are write locked. For more
information see Lock % . |
Process Measurements¶
|
The CPU usage of MongoDB. For servers with more than 1 CPU core, these values can exceed 100%. Only available if you use Ops Manager Automation. |
|
The CPU usage of MongoDB, scaled to a range of 0-100% by dividing by the number of CPU cores. Only available if you use Ops Manager Automation. |
System Measurements¶
|
CPU usage of processes on the host server. For servers with more than 1 CPU core, this value can exceed 100%. Only available if you use Ops Manager Automation. |
|
CPU usage of processes on the host server, scaled to a range of 0-100% by dividing by the number of CPU cores. Only available if you use Ops Manager Automation. |
Disk Measurements¶
|
Measures throughput of I/O operations for the disk partition used for MongoDB. Only available if you use Ops Manager Automation. |
|
The percentage of time during which requests are being issued to and serviced by the partition. This includes requests from any process, not just MongoDB processes. Only available if you use Ops Manager Automation. |
|
Measures latency per operation type of the disk partition used by MongoDB. Only available if you use Ops Manager Automation. |
|
Measures the free disk space and used disk space on the disk partition used by MongoDB. Only available if you use Ops Manager Automation. |
Database Measurements¶
|
Measures the amount of time the host is write locked. |
|
Measures the database’s on-disk storage space, as collected from the MongoDB dbStats command. The Monitoring Agent retrieves database measurements every 20 minutes by
default but adjusts frequency when necessary to reduce the impact on
database performance. You can disable the collection of database
statistics through the Ops Manager interface by clicking Settings
in the Ops Manager interface, then clicking Group Settings, and
then setting Collect Database Specific Statistics to |
Links¶
Relation | Description |
---|---|
self |
Me |
http://mms.mongodb.com/group |
The group the host belongs to. |
http://mms.mongodb.com/host |
The host the measurements pertain to. |
http://mms.mongodb.com/measurements/disk/partition |
The disk partition the measurements pertain to. This is available for disk measurements only. |
http://mms.mongodb.com/measurements/database |
The database the measurement pertain to. This is available for database measurements only. |