mongocli ops-manager process list
The process list
command retrieves information about all running
mongod
and mongos
processes for a given Ops Manager
project.
Syntax
mongocli ops-manager|om process list|ls [ --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.
Options
Option | Type | Description | Required? |
---|---|---|---|
--output , -o | string | Command output format. Valid values are:
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 |
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.
process list
returns an array of documents, each representing one
MongoDB process within your Ops Manager
project.
Name | Type | Description |
---|---|---|
created | DateTime | Date this MongoDB process was created. |
groupId | string | ID of the project that owns the process. |
hostname | string | Hostname of the machine running the process. |
id | string | Host ID of the machine running the process. |
lastPing | DateTime | Date and time when the last ping for this process was received. |
links | array of objects | One or more links to sub-resources and/or related resources. |
port | number | Port on which the process listens. |
shardName | string | Name of the shard this process belongs to. Only present if
this process is part of a sharded cluster. |
replicaSetName | string | Name of the replica set this process belongs to. Only present
if this process is part of a replica set. |
typeName | string | Type of process. Possible values are:
The type for new processes is |
version | string | Version of MongoDB running for this process. |
Example
The following example uses the mongocli ops-manager process list
command to retrieve information about MongoDB processes running on the
project. The command uses the default profile where the project ID
and the Programmatic API Keys are stored.
mongocli ops-manager process list --output json
The previous example produces the following output:
[ { "created": "2020-04-20T18:51:21Z", "groupId": "5dd5a6b6f10fab1d71a58495", "hostname": "myOmHost.example.com", "id": "myOmHost.example.com:27017", "lastPing": "2020-04-22T19:44:21Z", "links": [ { "rel": "self", "href": "https://myOmHost.example.com/api/public/v1.0/groups/5dd5a6b6f10fab1d71a58495/processes/myOmHost.example.com:27017" } ], "port": 27017, "shardName": "", "replicaSetName": "rs1", "typeName": "REPLICA_SECONDARY", "version": "4.2.6" }, { "created": "2020-04-20T18:51:21Z", "groupId": "5dd5a6b6f10fab1d71a58495", "hostname": "myOmHost.example.com", "id": "myOmHost.example.com:27017", "lastPing": "2020-04-22T19:45:41Z", "links": [ { "rel": "self", "href": "https://myOmHost.example.com/api/public/v1.0/groups/5dd5a6b6f10fab1d71a58495/processes/myOmHost.example.com:27017" } ], "port": 27017, "shardName": "", "replicaSetName": "rs1", "typeName": "REPLICA_SECONDARY", "version": "4.2.6" }, { "created": "2020-04-20T18:51:21Z", "groupId": "5dd5a6b6f10fab1d71a58495", "hostname": "myOmHost.example.com", "id": "myOmHost.example.com:27017", "lastPing": "2020-04-22T19:47:02Z", "links": [ { "rel": "self", "href": "https://myOmHost.example.com/api/public/v1.0/groups/5dd5a6b6f10fab1d71a58495/processes/myOmHost.example.com:27017" } ], "port": 27017, "shardName": "", "replicaSetName": "rs1", "typeName": "REPLICA_PRIMARY", "version": "4.2.6" } ]