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

mongocli ops-manager alerts settings delete

On this page

  • Syntax
  • Options
  • Output
  • Examples

The alerts settings delete command deletes the specified alert configuration in an Ops Manager project. You must confirm the operation when you run this command without the --force option.

You can also delete a alert configuration using the Ops Manager UI or API.

mongocli ops-manager|om alerts settings|config delete|rm|Delete|Remove <alert-id>
[ --force ]
[ --output|-o <output-format> ]
[ --profile|-p <profile-name> ]
[ --projectId <project-ID> ]
Option
Type
Description
Required?
<alert-id>
string
ID of the alert configuration to delete.
yes
--force
Flag that indicates that the alert configuration can be deleted without requiring confirmation.
no
--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 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

The command prints a confirmation message similar to the following to the terminal if it succeeds. If the command prints an error, see Troubleshooting for recommended solutions.

Alert settings '<alert-id>' deleted

If you choose not to delete the alert configuration, the command prints a message similar to the following:

Alert config not deleted

The following alerts settings delete command deletes an alert configuration with the ID 5ec4518ce4a7ba70e03dbf13 after prompting for a confirmation. The command uses the default profile.

mongocli cm alerts settings delete 5ec4518ce4a7ba70e03dbf13

The command prints the following to the terminal:

? Are you sure you want to delete: 5ec4518ce4a7ba70e03dbf13 Yes
Alert config '5ec4518ce4a7ba70e03dbf13' deleted

The following alerts settings delete command deletes an alert configuration with the ID 5ec4518ce4a7ba70e03dbf13 without requiring confirmation. The command uses the default profile.

mongocli cm alerts settings delete 5ec4518ce4a7ba70e03dbf13 --force

The command prints the following to the terminal:

Alert config '5ec4518ce4a7ba70e03dbf13' deleted

Back

Update One Alert Configuration