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 ops-manager logs jobs delete

On this page

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>
     [ --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 mongocli logs jobs list command.

yes
--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 containing the log collection job you want to delete.

Note

You can retrieve the list of projects, including their IDs, using the mongocli iam project list command.

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, or
  • n to abort the command and keep the log collection job (default).

If the command prints an error, see Troubleshooting for recommended solutions.

Examples

The following example uses the mongocli ops-manager logs jobs delete command to delete the completed log collection job 5ec1931cac1a6300711ff72e. The project is specified in a profile named egOmProfile where the project ID and the Programmatic API Keys are stored.

> mongocli ops-manager logs jobs delete 5ec1931cac1a6300711ff72e --profile egOmProfile
Are you sure you want to delete: 5ec1931cac1a6300711ff72e (y/N) y

The log collection job 5ec1931cac1a6300711ff72e is deleted from the project.