Return Cluster-Level Query Latency
On this page
- OAuth 2.0 authentication for programmatic access to Cloud Manager is available as a Preview feature.
- The feature and the corresponding documentation might change at any time during the Preview period. To use OAuth 2.0 authentication, create a service account to use in your requests to the Cloud Manager Public API.
Return a list of cluster-level query latency measurements for the specified namespace.
Base URL: https://cloud.mongodb.com/api/public/v1.0
Resource
GET /groups/{PROJECT-ID}/clusters/{hostClusterId}/{clusterView}/{databaseName}/{collectionName}/collStats/measurements
Request Path Parameters
Parameter | Type | Description |
---|---|---|
PROJECT-ID | string | (Required.) Unique 24-hexadecimal digit string that identifies the project that contains the namespace. |
hostClusterId | string | (Required.) Unique identifier for the cluster that contains the namespace. |
clusterView | string | (Required.) Name that identifies the cluster topology. Values include:
|
databaseName | string | (Required.) Name that identifies the database. |
collectionName | string | (Required.) Name that identifies the collection. |
Request Query Parameters
All parameters are optional.
Name | Type | Description | Default |
---|---|---|---|
pretty | boolean | Indicates whether the response body should be in a prettyprint format. |
|
envelope | boolean | Indicates whether or not to wrap the response in an envelope. |
|
metrics | array | List that contains the metrics to retrieve for the associated data series. If you don't specify this parameter, this resource returns the data series for all query latency metrics. | All |
period | string | Duration in ISO 8601 notation that specifies how far back in the past to
retrieve measurements. If you specify this value, you can't
specify For example, to request the last 36 hours, include this query
parameter: | |
start | string | Timestamp in ISO 8601 date and time format in UTC for the beginning of the period for which to
retrieve measurements. If you specify | |
end | string | Timestamp in ISO 8601 date and time format in UTC for the end of the period for which to retrieve
measurements. If you specify |
Metrics
Metric | Description |
---|---|
| Rate that indicates the total combined server operation duration on a collection (total combined server operation duration / collection interval in seconds). |
| Rate that indicates the total combined read operation duration on a collection (total combined read operation duration / collection interval in seconds). |
| Rate that indicates the total combined write operation duration on a collection (total combined write operation duration / collection interval in seconds). |
| Rate that indicates the total combined command operation duration on a collection (total combined command operation duration / collection interval in seconds). |
| Total server operation duration divided by the total server operation count across all operation types. |
| Read operation duration divided by the read operation count. |
| Write operation duration divided by the write operation count. |
| Command operation duration divided by the command operation count. |
| 50th percentile in the latency histogram. |
| 50th percentile in the read latency histogram. |
| 50th percentile in the write latency histogram. |
| 50th percentile in the command latency histogram. |
| 95th percentile in the latency histogram. |
| 95th percentile in the read latency histogram. |
| 95th percentile in the write latency histogram. |
| 95th percentile in the command latency histogram. |
| 99th percentile in the latency histogram across all operations. |
| 99th percentile in the read latency histogram. |
| 99th percentile in the write latency histogram. |
| 99th percentile in the command latency histogram. |
| Rate that indicates the total number of operations performed on a collection (total operations / collection interval). |
| Rate that indicates the number of read operations performed on a collection (read operations / collection interval). |
| Rate that indicates the number of write operations performed on a collection (write operations / collection interval). |
| Rate that indicates the number of command operations performed on a collection (command operations / collection interval). |
Request Body Parameters
This endpoint doesn't use HTTP request body parameters.
Response
Name | Type | Description |
---|---|---|
collectionName | string | Name that identifies the collection. |
databaseName | string | Name that identifies the database. |
end | string | Timestamp in ISO 8601 date and time format in UTC for the end of the period for which to retrieve measurements. |
granularity | string | Duration in ISO 8601 notation that specifies the size of the interval that each data point covers. For example, |
groupId | string | Unique 24-hexadecimal digit string that identifies the project that contains the namespace. |
links | object array | One or more links to sub-resources and/or related resources. All
|
measurements | object array | Each object in this array represents a measurement and the data points for that measurement. |
measurements.dataPoints | object array | Each object represents a single data point. If there is no data
point available for a particular moment in time, this |
measurements.dataPoints.timestamp | string | Timestamp in ISO 8601 date and time format in UTC for the beginning of the time interval this data point represents. |
measurements.dataPoints.value | float | Value of this data point. |
measurements.name | string | Name of the measurement. Accepted values are given in the Measurement Types page. |
measurements.units | string | How this measurement is quantified. |
processId | string | FQDN and port of the MongoDB process. |
start | string | Timestamp in ISO 8601 date and time format in UTC for the beginning of the period for which to retrieve measurements. |
Example Request
curl --user '{PUBLIC-KEY}:{PRIVATE-KEY}' --digest \ --header 'Accept: application/json' \ --include \ --request GET 'https://{CLOUD-MANAGER-HOST}:{PORT}/api/public/v1.0/groups/{PROJECT-ID}/clusters/{hostClusterId}/{clusterView}/{databaseName}/{collectionName}/collStats/measurements?pretty=true&period={period}'
Example Response
Response Header
200 OK Vary: Accept-Encoding Content-Type: application/json Strict-Transport-Security: max-age=300 Date: {dateInUnixFormat} Connection: keep-alive Content-Length: {requestLengthInBytes} X-MongoDB-Service-Version: gitHash={gitHash}; versionString={ApplicationVersion}
Response Body
{ "collectionName": {collectionName}, "databaseName": "{datbaseName}", "end": "2024-03-21T13:49:25Z", "granularity": "PT10M", "groupId": "{PROJECT-ID}", "links": [ { "href": "https://cloud.mongodb.com/api/public/v1.0/groups/{PROJECT-ID}/hosts/{hostId}/{databaseName}/{collectionName}/collStats/measurements?period={period}", "rel": "self" }, { "href": "https://cloud.mongodb.com/api/public/v1.0/groups/{PROJECT-ID}", "rel": "https://cloud.mongodb.com/group" } ], "measurements": [ { "dataPoints": [ { "timestamp": "2024-03-22T20:26:17Z", "value": null }, { "timestamp": "2024-03-22T20:31:29Z", "value": 0.003203013395002018 }, { "timestamp": "2024-03-22T20:41:29Z", "value": 0.0016666722222407407 } ], "name": "READS_OPS", "units": "SCALAR_PER_SECOND" }, { "dataPoints": [ { "timestamp": "2024-03-21T13:40:02Z", "value": null }, { "timestamp": "2024-03-21T13:49:25Z", "value": 115.25475560992174 } ], "name": "READS_LATENCY", "units": "MICROSECONDS_PER_SECOND" }, { "dataPoints": [ { "timestamp": "2024-03-21T13:40:02Z", "value": null }, { "timestamp": "2024-03-21T13:49:25Z", "value": 229.8723404255319 } ], "name": "AVERAGE_READS_LATENCY", "units": "MICROSECONDS" }, { "dataPoints": [ { "timestamp": "2024-03-21T13:40:02Z", "value": null }, { "timestamp": "2024-03-21T13:49:25Z", "value": 98.5945945945946 } ], "name": "READS_P50_VALUE", "units": "MICROSECONDS" }, { "dataPoints": [ { "timestamp": "2024-03-21T13:40:02Z", "value": null }, { "timestamp": "2024-03-21T13:49:25Z", "value": 174.54545454545456 } ], "name": "READS_P95_VALUE", "units": "MICROSECONDS" }, { "dataPoints": [ { "timestamp": "2024-03-21T13:40:02Z", "value": null }, { "timestamp": "2024-03-21T13:49:25Z", "value": 244.36363636363637 } ], "name": "READS_P99_VALUE", "units": "MICROSECONDS" }, { "dataPoints": [ { "timestamp": "2024-03-22T20:26:17Z", "value": null }, { "timestamp": "2024-03-22T20:31:29Z", "value": 0.0 }, { "timestamp": "2024-03-22T20:41:29Z", "value": 0.0 } ], "name": "WRITES_OPS", "units": "SCALAR_PER_SECOND" }, { "dataPoints": [ { "timestamp": "2024-03-21T13:40:02Z", "value": null }, { "timestamp": "2024-03-21T13:49:25Z", "value": 0.0 } ], "name": "WRITES_LATENCY", "units": "MICROSECONDS_PER_SECOND" }, { "dataPoints": [ { "timestamp": "2024-03-21T13:40:02Z", "value": null }, { "timestamp": "2024-03-21T13:49:25Z", "value": null } ], "name": "AVERAGE_WRITES_LATENCY", "units": "MICROSECONDS" }, { "dataPoints": [ { "timestamp": "2024-03-21T13:40:02Z", "value": null }, { "timestamp": "2024-03-21T13:49:25Z", "value": null } ], "name": "WRITES_P50_VALUE", "units": "MICROSECONDS" }, { "dataPoints": [ { "timestamp": "2024-03-21T13:40:02Z", "value": null }, { "timestamp": "2024-03-21T13:49:25Z", "value": null } ], "name": "WRITES_P95_VALUE", "units": "MICROSECONDS" }, { "dataPoints": [ { "timestamp": "2024-03-21T13:40:02Z", "value": null }, { "timestamp": "2024-03-21T13:49:25Z", "value": null } ], "name": "WRITES_P99_VALUE", "units": "MICROSECONDS" }, { "dataPoints": [ { "timestamp": "2024-03-22T20:26:17Z", "value": null }, { "timestamp": "2024-03-22T20:31:29Z", "value": 0.0 }, { "timestamp": "2024-03-22T20:41:29Z", "value": 0.0 } ], "name": "COMMANDS_OPS", "units": "SCALAR_PER_SECOND" }, { "dataPoints": [ { "timestamp": "2024-03-21T13:40:02Z", "value": null }, { "timestamp": "2024-03-21T13:49:25Z", "value": 0.0 } ], "name": "COMMANDS_LATENCY", "units": "MICROSECONDS_PER_SECOND" }, { "dataPoints": [ { "timestamp": "2024-03-21T13:40:02Z", "value": null }, { "timestamp": "2024-03-21T13:49:25Z", "value": null } ], "name": "AVERAGE_COMMANDS_LATENCY", "units": "MICROSECONDS" }, { "dataPoints": [ { "timestamp": "2024-03-21T13:40:02Z", "value": null }, { "timestamp": "2024-03-21T13:49:25Z", "value": null } ], "name": "COMMANDS_P50_VALUE", "units": "MICROSECONDS" }, { "dataPoints": [ { "timestamp": "2024-03-21T13:40:02Z", "value": null }, { "timestamp": "2024-03-21T13:49:25Z", "value": null } ], "name": "COMMANDS_P95_VALUE", "units": "MICROSECONDS" }, { "dataPoints": [ { "timestamp": "2024-03-21T13:40:02Z", "value": null }, { "timestamp": "2024-03-21T13:49:25Z", "value": null } ], "name": "COMMANDS_P99_VALUE", "units": "MICROSECONDS" }, { "dataPoints": [ { "timestamp": "2024-03-21T13:40:02Z", "value": null }, { "timestamp": "2024-03-21T13:49:25Z", "value": 0.5013859231457166 } ], "name": "TOTAL_OPS", "units": "SCALAR_PER_SECOND" }, { "dataPoints": [ { "timestamp": "2024-03-21T13:40:02Z", "value": null }, { "timestamp": "2024-03-21T13:49:25Z", "value": 115.25475560992174 } ], "name": "TOTAL_LATENCY", "units": "MICROSECONDS_PER_SECOND" }, { "dataPoints": [ { "timestamp": "2024-03-21T13:40:02Z", "value": null }, { "timestamp": "2024-03-21T13:49:25Z", "value": 229.8723404255319 } ], "name": "AVERAGE_TOTAL_OPS_LATENCY", "units": "MICROSECONDS" }, { "dataPoints": [ { "timestamp": "2024-03-21T13:40:02Z", "value": null }, { "timestamp": "2024-03-21T13:49:25Z", "value": 98.5945945945946 } ], "name": "TOTAL_OPS_P50_VALUE", "units": "MICROSECONDS" }, { "dataPoints": [ { "timestamp": "2024-03-21T13:40:02Z", "value": null }, { "timestamp": "2024-03-21T13:49:25Z", "value": 174.54545454545456 } ], "name": "TOTAL_OPS_P95_VALUE", "units": "MICROSECONDS" }, { "dataPoints": [ { "timestamp": "2024-03-21T13:40:02Z", "value": null }, { "timestamp": "2024-03-21T13:49:25Z", "value": 244.36363636363637 } ], "name": "TOTAL_OPS_P99_VALUE", "units": "MICROSECONDS" } ], "processId": "notApplicable", "start": "2024-03-21T13:40:02Z" }