Navigation

mongocli ops-manager alerts settings fields type

On this page

The alerts settings fields type command retrieves all field names that the matchers.fieldName option accepts when you create or update an alert configuration.

Syntax

mongocli ops-manager|om alert|alerts settings|config fields type|types
     [ --profile|-P <profile-name> ]

Options

Option Type Description Required?
--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

Output

The command prints the following array to the terminal if the command succeeds. If the command returns an error, see Troubleshooting for recommended solutions.

[
  "TYPE_NAME",
  "HOSTNAME",
  "PORT",
  "HOSTNAME_AND_PORT",
  "REPLICA_SET_NAME",
  "SHARD_NAME",
  "CLUSTER_NAME"
]

When you create or update an alert configuration:

  • Host alerts support these fields:
    • TYPE_NAME
    • HOSTNAME
    • PORT
    • HOSTNAME_AND_PORT
    • REPLICA_SET_NAME
  • Replica set alerts support these fields:
    • REPLICA_SET_NAME
    • SHARD_NAME
    • CLUSTER_NAME
  • Sharded cluster alerts support these fields:
    • CLUSTER_NAME
    • SHARD_NAME

Example

The following example uses the mongocli om alerts settings fields type command to retrieve all field names that the matchers.fieldName option accepts when you create or update an alert configuration. It uses the default profile to access Ops Manager.

mongocli om alerts configs fields type

The previous command prints the following fields in JSON format to the terminal. To learn more about these fields, see Output.

[
  "TYPE_NAME",
  "HOSTNAME",
  "PORT",
  "HOSTNAME_AND_PORT",
  "REPLICA_SET_NAME",
  "SHARD_NAME",
  "CLUSTER_NAME"
]