mongocli ops-manager metrics databases describe
The metrics databases describe
command gets the measurements of the
specified database for an Ops Manager process.
You can get the processes associated with a particular Ops Manager project with the process list command.
Syntax
mongocli ops-manager|om metrics databases describe <process-id> <db-name> --granularity <time-interval> --period <time-period> --start <start-time> --end <end-time> [ --type <type-of-measurement> ] [ --limit <number-of-items-per-page> ] [ --output|-o <output-format> ] [ --page <page-number> ] [ --profile|-P <profile-name> ] [ --projectId <id-of-project> ]
Note
Use -h
or --help
to view the command-line help for
this command.
Options
Option | Type | Description | Required? |
---|---|---|---|
<process-id> | String | The unique identifier of the Ops Manager process that contains the
database to describe. | yes |
<db-name> | String | Name of the database to describe. | yes |
--granularity | String | An ISO 8601-formatted time period that specifies the interval
between measurement data points. For example, The following subset of ISO 8601-formatted time periods are supported:
When you specify | yes |
--period | String | An ISO 8601-formatted time period that specifies the length of
time in the past to query. For example, to request the last 36
hours, specify: --period P1DT12H . Mutually exclusive with
start and end . | yes |
--start | String | The time at which to start retrieving metrics, as specified by an
ISO 8601 timestamp string. If you specify start you must
also specify end . Mutually exclusive with period . | yes |
--end | String | The time at which to stop retrieving metrics, as specified by an
ISO 8601 timestamp string. If you specify end you must also
specify start . Mutually exclusive with period . | yes |
--type | String | Specifies which measurement to return. If You must specify metrics that are valid for the host. Ops Manager returns an error if any specified metrics are invalid. The following measurement values are valid:
| no |
--limit | integer | Number of items per page, up to a maximum of 500. Defaults to
100 if omitted. | no |
--output , -o | string | Command output format. Valid values are:
If omitted, the command returns output in the default format. | no |
--page | integer | Page number (1-based). Defaults to 1 if not specified. | no |
--profile , -P | string | Name of the profile where the public and private
keys for the project are saved. If omitted, uses the
default profile. To learn more about creating a
profile, see Configure the MongoDB CLI. | no |
--projectId | string | Unique identifier of the project. If omitted, uses the project ID in the profile or environment variable. | no |
Output
The command prints the following fields in the specified format to the terminal if the command succeeds. If the command prints an error, see Troubleshooting for recommended solutions.
NAME UNITS TIMESTAMP VALUE DATABASE_AVERAGE_OBJECT_SIZE BYTES 2020-10-07T14:24:20Z 212 DATABASE_AVERAGE_OBJECT_SIZE BYTES 2020-10-07T14:39:20Z 212 DATABASE_AVERAGE_OBJECT_SIZE BYTES 2020-10-07T14:59:20Z 212 DATABASE_COLLECTION_COUNT SCALAR 2020-10-07T14:24:20Z 3 DATABASE_COLLECTION_COUNT SCALAR 2020-10-07T14:39:20Z 3 DATABASE_COLLECTION_COUNT SCALAR 2020-10-07T14:59:20Z 3 DATABASE_DATA_SIZE BYTES 2020-10-07T14:24:20Z 1060 DATABASE_DATA_SIZE BYTES 2020-10-07T14:39:20Z 1060 DATABASE_DATA_SIZE BYTES 2020-10-07T14:59:20Z 1060 DATABASE_STORAGE_SIZE BYTES 2020-10-07T14:24:20Z 98304 DATABASE_STORAGE_SIZE BYTES 2020-10-07T14:39:20Z 98304 DATABASE_STORAGE_SIZE BYTES 2020-10-07T14:59:20Z 98304 DATABASE_INDEX_SIZE BYTES 2020-10-07T14:24:20Z 102400 DATABASE_INDEX_SIZE BYTES 2020-10-07T14:39:20Z 102400 DATABASE_INDEX_SIZE BYTES 2020-10-07T14:59:20Z 102400 DATABASE_INDEX_COUNT SCALAR 2020-10-07T14:24:20Z 4 DATABASE_INDEX_COUNT SCALAR 2020-10-07T14:39:20Z 4 DATABASE_INDEX_COUNT SCALAR 2020-10-07T14:59:20Z 4 DATABASE_EXTENT_COUNT SCALAR 2020-10-07T14:24:20Z 0 DATABASE_EXTENT_COUNT SCALAR 2020-10-07T14:39:20Z 0 DATABASE_EXTENT_COUNT SCALAR 2020-10-07T14:59:20Z 0 DATABASE_OBJECT_COUNT SCALAR 2020-10-07T14:24:20Z 5 DATABASE_OBJECT_COUNT SCALAR 2020-10-07T14:39:20Z 5 DATABASE_OBJECT_COUNT SCALAR 2020-10-07T14:59:20Z 5 DATABASE_VIEW_COUNT SCALAR 2020-10-07T14:24:20Z 0 DATABASE_VIEW_COUNT SCALAR 2020-10-07T14:39:20Z 0 DATABASE_VIEW_COUNT SCALAR 2020-10-07T14:59:20Z 0
The JSON response returns an object with the following fields for the database you specify:
Name | Type | Description |
---|---|---|
databaseName | string | The name of the database to which the measurements pertain. |
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. |
groupId | string | ID of the project that owns the Atlas MongoDB process. |
hostId | string | The hostname of the machine running the Atlas MongoDB
process. |
links | array | An array of documents, representing a
link to one or more sub-resources and/
or related resources such as
list pagination. |
measurements | array of objects | An array of measurements and their data points. |
measurements.dataPoints | array of objects | 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. |
measurements.units | string | How the measurement is quantified. Possible units are:
|
processId | string | The hostname and port of the machine running the Ops Manager
MongoDB process. |
start | string | The start of the period for which to retrieve measurements
specified as an ISO 8601 timestamp. |
Example
The following example uses the mongocli om metrics databases
describe
command to retrieve the DATABASE_INDEX_SIZE
for
the database sample_db
, running on Ops Manager process
5392aa974e4cf52044128aa684fe98b8
.
It uses the default profile for accessing Ops Manager and specifying a
project.
mongocli om metrics database describe 5392aa974e4cf52044128aa684fe98b8 sample_db --granularity PT5M --period PT1H --type DATABASE_INDEX_SIZE -o json
The command prints the following fields to the terminal in JSON format. To learn more about these fields, see Output.
{ "end": "2020-10-07T15:19:20Z", "granularity": "PT5M", "groupId": "f39ffc90735f2201990f5381", "hostId": "5392aa974e4cf52044128aa684fe98b8", "links": [ { "rel": "self", "href": "..." }, { "rel": "http://mms.mongodb.com/host", "href": "..." }, { "rel": "http://mms.mongodb.com/group", "href": "..." } ], "measurements": [ { "dataPoints": [ { "timestamp": "2020-10-07T14:39:20Z", "value": 102400 }, { "timestamp": "2020-10-07T14:59:20Z", "value": 102400 }, { "timestamp": "2020-10-07T15:19:20Z", "value": 102400 } ], "name": "DATABASE_INDEX_SIZE", "units": "BYTES" } ], "processId": "db1.example.com:27017", "start": "2020-10-07T14:39:20Z", "databaseName": "sample_db" }