Docs Menu
Docs Home
/ /
MongoDB Command Line Interface
/ / /

mongocli ops-manager metrics disks list

On this page

  • Syntax
  • Options
  • Output
  • Example

The metrics disks list command lists the available partitions on a specified Ops Manager host.

You can get the host IDs associated with a particular Ops Manager project with the process list command.

mongocli ops-manager|om metrics disks list|ls <hostID>
[ --output|-o <output-format> ]
[ --profile|-P <profile-name> ]
[ --projectId <project-ID> ]

Note

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

Option
Type
Description
Required?
<hostID>
String
The host ID of the server running the MongoDB process.
yes
--output, -o
string

Command output format. Valid values are:

  • json for output in JSON format

  • go-template for custom output using the Go template

  • go-template-file for custom output specified using Go template file

If omitted, the command returns output in the default format.

no
--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. If omitted, uses the project ID in the profile or environment variable.

no

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
Type
Description
links
document array
One or more links to sub-resources and/or related resources. The relations between URLs are explained in the Web Linking Specification.
partitionName
string
Name of the disk or partition with available metrics.
totalCount
number
The number of results returned.

The following example uses the mongocli ops-manager metrics disks list command to retrieve available partitions on a host with ID 5abbc52a0bd66b71d71f5698. The command uses the default profile where the project ID and the Programmatic API Keys are stored.

mongocli ops-manager metrics disks list 5abbc52a0bd66b71d71f5698 --output json

The previous command produces the following output:

{
"links": [
...
],
"results": [
{
"links": [
...
],
"partitionName": "data"
}
],
"totalCount": 1
}

Back

Describe Available Metrics