mongocli ops-manager automation status
The automation status
command retrieves the latest plan for MongoDB
processes in the specified Ops Manager project. Plans are a set of actions
required to get a MongoDB deployment to the goalVersion
.
The command returns the goalVersion
field to
report the current version of the automation configuration and the
lastGoalVersionAchieved
field to report the versions of the
configuration running on each server.
Syntax
mongocli ops-manager|om automation status [ --output|-o <output-format> ] [ --profile|-P <profile-name> ] [ --projectId projectId ]
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 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 returns errors, see Troubleshooting for recommended solutions.
Name | Type | Description |
---|---|---|
goalVersion | number | The version of the most recently submitted automation
configuration. If there
is a conflict in submissions of automation configurations, this field lists the winning
configuration. |
processes | array | The project's deployed MongoDB instances. |
process.errorCode | integer | The error code. Returns 0 if the process has no errors. |
process.errorCodeDescription | string | Detailed error description. Returns an empty string if the
process has no errors. |
process.errorCodeHumanReadable | string | Short error description. Returns an empty string if the
process has no errors. |
process.errorString | string | Output of the log line that contains the error. Examine this
field for additional error context.
Returns an empty string if the process has no errors. |
processes.hostname | string | The fully qualified domain name (retrieved by issuing
hostname -f ) of the server on which the MongoDB process and
Automation Agent are hosted. |
processes.name | string | The process name as specified in the automation configuration. |
processes.lastGoalVersionAchieved | number | The last version of the automation configuration with which this
process had deployed as configured. If the
processes.lastGoalVersionAchieved number is not equal to the
goalVersion number, the process has not yet deployed
according to the current configuration. |
processes.plan | array | Describes how a process that is not yet up-to-date with the
configuration will achieve the goal state. |
Example
The following mongocli om automation status
command
returns plans of MongoDB processes in the specified project in JSON
format. It uses the default profile to access the specified
project.
mongocli om automation status --projectId 5e2f06127a3e5a5700de8d8d --output json
The command prints the following fields to the terminal. To learn more about these fields, see Output.
{ "processes": [ { "plan": [ "WaitRsInit", "WaitFeatureCompatibilityVersionCorrect" ], "lastGoalVersionAchieved": 28, "name": "repl-2", "hostname": "repl-2.repl-example" }, { "plan": [ "WaitAllRsMembersUp", "RsInit", "WaitFeatureCompatibilityVersionCorrect" ], "lastGoalVersionAchieved": 28, "name": "repl-0", "hostname": "repl-0.repl-example" }, { "plan": [ "WaitRsInit", "WaitFeatureCompatibilityVersionCorrect" ], "lastGoalVersionAchieved": 28, "name": "repl-1", "hostname": "repl-1.repl-example" } ], "goalVersion": 28 }