mongocli ops-manager logs jobs delete
The logs jobs delete
command deletes an in-progress or completed
log collection job from the specified Ops Manager project. You can also
delete a log collection job through the Ops Manager
API.
Syntax
mongocli ops-manager|om logs|log jobs|job delete <id> [ --output|-o <output-format> ] [ --projectId <id-of-project> ] [ --profile|-P <profile-name> ]
Options
Option | Type | Description | Required? |
---|---|---|---|
<id> | string | Unique identifier of the log collection job to delete. You can retrieve a list of log collection jobs for a project
with the | yes |
--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. NoteYou can retrieve the list of projects, including their IDs, using
the | no |
Output
When you run logs jobs delete
, your terminal prompts:
Are you sure you want to delete: <id> (y/N)
In the terminal, you can enter:
y
to delete the log collection job, orn
to abort the command and keep the log collection job (default).
If the command prints an error, see Troubleshooting for recommended solutions.
Example
The following example uses the mongocli ops-manager logs jobs delete
command to delete the completed log collection job
5ec1931cac1a6300711ff72e
. The command uses the default profile where
the project ID and the Programmatic API Keys are stored.
mongocli ops-manager logs jobs delete 5ec1931cac1a6300711ff72e Are you sure you want to delete: 5ec1931cac1a6300711ff72e (y/N) y
The log collection job 5ec1931cac1a6300711ff72e
is deleted from the
project.