mongocli ops-manager alerts unacknowledge
The alerts unacknowledge
command un-unacknowledges one alert for
the specified Ops Manager project.
Syntax
mongocli ops-manager|om alert|alerts unacknowledge|unack <alertID> [ --until <unacknowledgement time> ] [ --comment <optional comment> ] [ --output|-o <output-format> ] [ --profile|-P <profile-name> ] [ --projectId <id-of-project> ]
Options
Option | Type | Description | Required? |
---|---|---|---|
<alertID> | string | ID of the alert you want to unacknowledge. | yes |
--comment | string | Comment describing the alert unacknowledgement. If included,
wrap the comment in double quotes. | no |
--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 project ID and the Programmatic API Keys
for the project are saved. If omitted, uses the | no |
--projectId | string | Unique identifier of the project. If omitted, uses the project ID in the profile or environment variable. | no |
--until | string | Timestamp in ISO 8601 date and time format in UTC through which you unacknowledge this alert. After this time passes, the alert becomes acknowledged. You can't set both | 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:
| ||||||||
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.
| ||||||||
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:
| ||||||||
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 unacknowledge
command to
unacknowledge one alert that occurred for the specified project for one
month.
mongocli om alerts unacknowledge {ALERT-ID} \ --projectId {PROJECT-ID} \ --until 2020-06-04T20:24:26Z \ --output json
The previous command returns the following JSON document. To learn more about these fields, see Output.
1 { 2 "acknowledgedUntil": "2020-06-04T20:24:26Z", 3 "acknowledgementComment": "acknowledging for one month", 4 "acknowledgingUsername": "mfnrwcia", 5 "alertConfigId": "{ALERT-CONFIG-ID}", 6 "created": "2020-05-04T20:23:01Z", 7 "eventTypeName": "USERS_WITHOUT_MULTI_FACTOR_AUTH", 8 "groupId": "{PROJECT-ID}", 9 "id": "{ALERT-ID}", 10 "lastNotified": "2020-05-04T20:23:09Z", 11 "status": "OPEN", 12 "updated": "2020-05-04T20:26:26Z" 13 }