Navigation

mongocli ops-manager alerts acknowledge

On this page

The alerts acknowledge command acknowledges one alert for the specified Ops Manager project.

Syntax

mongocli ops-manager|om alert|alerts acknowledge|ack <alertID>
     [ --until <acknowledgement time> ]
     [ --forever ]
     [ --comment <optional comment> ]
     [ --profile|-P <profile-name> ]
     [ --projectId <id-of-project> ]

Options

Option Type Description Required?
<alertID> string ID of the alert you want to acknowledge or un-acknowledge. yes
--forever string

Prevent the alert from resuming at any point in the future.

You can’t set both --forever and --until in the same command.

no
--until string

Timestamp in ISO 8601 date and time format in UTC through which you acknowledge this alert. After this time passes, the alert becomes un-acknowledged.

You can’t set both --until and --forever in the same command.

no
--comment string Comment describing the alert acknowledgement. If included, wrap the comment in double quotes. no
--profile, -P string

Name of the profile where the project ID and the Programmatic API Keys for the project are saved. If omitted, uses the default profile.

See also

To learn more about creating a profile, see Configure the MongoDB CLI.

no
--projectId string Unique identifier of the project that contains the cluster. If omitted, uses the project ID in the profile or environment variable. no

Output

  • If the command succeeds, the command returns the following JSON document.
  • If the command returns errors, see Troubleshooting for recommended solutions.
Name Type Description
acknowledgedUntil date Timestamp in ISO 8601 date and time format in UTC through which the alert has been acknowledged. mongocli returns this value after the alert has been acknowledged.
acknowledgementComment string Comment left by the user who acknowledged the alert. mongocli returns this value after the alert has been acknowledged.
acknowledgingUsername string Username of the user who acknowledged the alert. mongocli returns this value after the alert has been acknowledged.
alertConfigId string Unique identifier of the alert configuration that triggered this alert.
clusterName string Name the cluster to which this alert applies.
created date Timestamp in ISO 8601 date and time format in UTC when this alert was created.
currentValue object Current value of the metric that triggered the alert. mongocli returns this value if "eventTypeName" : "OUTSIDE_METRIC_THRESHOLD".
currentValue.number float Value.
currentValue.units string

Units for the value. Possible units are:

  • RAW
  • BITS
  • BYTES
  • KILOBITS
  • KILOBYTES
  • MEGABITS
  • MEGABYTES
  • GIGABITS
  • GIGABYTES
  • TERABYTES
  • PETABYTES
  • MILLISECONDS
  • SECONDS
  • MINUTES
  • HOURS
  • DAYS
eventTypeName string Name of the event that triggered the alert. The possible values depend on the alert type.
groupId string Unique identifier of the project for which this alert was opened.
hostnameAndPort string Hostname and port of the host to which the alert applies.
id string Unique identifier for the alert.
lastNotified date Timestamp in ISO 8601 date and time format in UTC when the last notification was sent for this alert. Only present if notifications have been sent.
metricName string

Name of the metric whose value went outside the threshold. mongocli returns this value if "eventTypeName" : "OUTSIDE_METRIC_THRESHOLD". Possible values are:

  • ASSERT_MSG
  • ASSERT_REGULAR
  • ASSERT_USER
  • ASSERT_WARNING
  • BACKGROUND_FLUSH_AVG
  • CACHE_BYTES_READ_INTO
  • CACHE_BYTES_WRITTEN_FROM
  • CACHE_DIRTY_BYTES
  • CACHE_USED_BYTES
  • COMPUTED_MEMORY
  • CONNECTIONS
  • CURSORS_TOTAL_CLIENT_CURSORS_SIZE
  • CURSORS_TOTAL_OPEN
  • CURSORS_TOTAL_TIMED_OUT
  • DB_DATA_SIZE_TOTAL
  • DB_STORAGE_TOTAL
  • DISK_PARTITION_SPACE_USED_DATA
  • DISK_PARTITION_SPACE_USED_INDEX
  • DISK_PARTITION_SPACE_USED_JOURNAL
  • DISK_PARTITION_UTILIZATION_DATA
  • DISK_PARTITION_UTILIZATION_INDEX
  • DISK_PARTITION_UTILIZATION_JOURNAL
  • EXTRA_INFO_PAGE_FAULTS
  • GLOBAL_ACCESSES_NOT_IN_MEMORY
  • GLOBAL_LOCK_CURRENT_QUEUE_READERS
  • GLOBAL_LOCK_CURRENT_QUEUE_TOTAL
  • GLOBAL_LOCK_CURRENT_QUEUE_WRITERS
  • GLOBAL_LOCK_PERCENTAGE
  • GLOBAL_PAGE_FAULT_EXCEPTIONS_THROWN
  • INDEX_COUNTERS_BTREE_ACCESSES
  • INDEX_COUNTERS_BTREE_HITS
  • INDEX_COUNTERS_BTREE_MISS_RATIO
  • INDEX_COUNTERS_BTREE_MISSES
  • JOURNALING_COMMITS_IN_WRITE_LOCK
  • JOURNALING_MB
  • JOURNALING_WRITE_DATA_FILES_MB
  • LOGICAL_SIZE
  • MEMORY_RESIDENT
  • MEMORY_VIRTUAL
  • MEMORY_MAPPED
  • NETWORK_BYTES_IN
  • NETWORK_BYTES_OUT
  • NETWORK_NUM_REQUESTS
  • NORMALIZED_SYSTEM_CPU_USER
  • OPCOUNTER_CMD
  • OPCOUNTER_DELETE
  • OPCOUNTER_INSERT
  • OPCOUNTER_QUERY
  • OPCOUNTER_REPL_UPDATE
  • OPCOUNTER_REPL_DELETE
  • OPCOUNTER_REPL_INSERT
  • OPCOUNTER_UPDATE
  • OPLOG_MASTER_LAG_TIME_DIFF
  • OPLOG_MASTER_TIME
  • OPLOG_RATE_GB_PER_HOUR
  • OPLOG_SLAVE_LAG_MASTER_TIME
  • RESTARTS_IN_LAST_HOUR
  • TICKETS_AVAILABLE_READS
  • TICKETS_AVAILABLE_WRITES
replicaSetName string Name of the replica set, if applicable.
resolved date Timestamp in ISO 8601 date and time format in UTC when the alert was closed. mongocli returns this value if "status" : "CLOSED".
status string

Current state of the alert. Possible values are:

TRACKING Alert conditions exist, but the condition hasn’t persisted for long enough to trigger an alert.
OPEN Alert is open.
CLOSED Alert is closed.
CANCELLED Alert is cancelled.
updated date Timestamp in ISO 8601 date and time format in UTC when this alert was last updated.

Examples

Acknowledge for 1 Month

The following example uses the mongocli om acknowledge command to acknowledge one alert that occurred for the specified project for one month.

mongocli om alerts acknowledge {ALERT-ID} \
         --projectId {PROJECT-ID} \
         --until 2020-06-04T20:24:26Z

The previous command returns the following JSON document. To learn more about these fields, see Output.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
{
  "acknowledgedUntil": "2020-06-04T20:24:26Z",
  "acknowledgementComment": "acknowledging for one month",
  "acknowledgingUsername": "mfnrwcia",
  "alertConfigId": "{ALERT-CONFIG-ID}",
  "created": "2020-05-04T20:23:01Z",
  "eventTypeName": "USERS_WITHOUT_MULTI_FACTOR_AUTH",
  "groupId": "{PROJECT-ID}",
  "id": "{ALERT-ID}",
  "lastNotified": "2020-05-04T20:23:09Z",
  "status": "OPEN",
  "updated": "2020-05-04T20:26:26Z"
}

Acknowledge Forever

The following example uses the mongocli om acknowledge command to acknowledge one alert that occurred for the specified project forever.

mongocli om alerts acknowledge {ALERT-ID} \
         --projectId {PROJECT-ID} \
         --forever

The previous command returns the following JSON document. To learn more about these fields, see Output.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
{
  "id": "{ALERT-ID}",
  "groupId": "{PROJECT-ID}",
  "alertConfigId": "{ALERT-CONFIG-ID}",
  "eventTypeName": "USERS_WITHOUT_MULTI_FACTOR_AUTH",
  "created": "2020-05-04T20:23:01Z",
  "updated": "2020-05-04T20:26:26Z",
  "status": "OPEN",
  "lastNotified": "2020-05-04T20:23:09Z",
  "acknowledgedUntil": "2120-05-04T20:26:26Z",
  "acknowledgementComment": "acknowledging forever",
  "acknowledgingUsername": "mfnrwcia"
}