Navigation

Alpha Release of MongoDB CLI

This is a pre-release early version of MongoDB CLI. Do not use MongoDB CLI to manage production environments.

mongocli atlas measurements disks list

On this page

The measurements disks list command lists the available partitions on a specified Atlas host.

You can get the hostnames associated with a particular Atlas project with the process list command.

Syntax

mongocli atlas measurements disks list|ls <hostname>:<port>
     [ --profile|-P <profile-name> ]
     [ --projectId <project-ID> ]

Note

Use -h or --help to view the command-line help for this command.

Options

Option Type Description Required?
<hostname>:<port> String The hostname of the server running the Atlas MongoDB process and the port on which the process listens. yes
--profile, -P string Name of the profile where the project ID and the Programmatic API 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 for which to retrieve events. If omitted, uses the project ID listed in the profile. no

Output

The command prints the following fields in JSON format to the terminal if the command succeeds. If the command prints an error, see Troubleshooting for recommended solutions.

The HTTP response returns a JSON document that includes the following objects:

Name Type Description
links array An array of documents, representing a link to one or more sub-resources and/or related resources such as list pagination. See Linking for more information.
partitionName string Name of the disk or partition with available measurements.
totalCount number The number of results returned.

Example

The following example uses the mongocli atlas measurements disks list command to retrieve available partitions on a host with ID atlas-ap6k8a-shard-00-02.qmljy.mongodb.net, listening on port 27017. The command uses a profile named egAtlasProfile where the project ID and the Programmatic API Keys are stored.

mongocli atlas measurements disks list \
  atlas-ap6k8a-shard-00-02.qmljy.mongodb.net:27017 \
  --profile egAtlasProfile

The previous command produces the following output:

{
     "links": [
             {
                     "rel": "self",
                     "href": "https://cloud.mongodb.com/api/atlas/v1.0/groups/5dd5a6b6f10fab1d71a58495/processes/atlas-ap6kaa-shard-00-02.qmajy.mongodb.net:27017/disks?pageNum=1\u0026itemsPerPage=100"
             }
     ],
     "results": [
             {
                     "links": [
                             {
                                     "rel": "self",
                                     "href": "https://cloud.mongodb.com/api/atlas/v1.0/groups/5dd5a6b6f10fab1d71a58495/processes/atlas-ap6kaa-shard-00-02.qmajy.mongodb.net:27017/disks/data"
                             }
                     ],
                     "partitionName": "data"
             }
     ],
     "totalCount": 1
 }