Acknowledge One Global Alert
On this page
You can acknowledge one alert until the time and date you specify. You can also un-acknowledge an alert by specifying a date and time in the past.
Required Roles
You can successfully call this endpoint with any of the following assigned roles:
Request
Base URL: https://{OPSMANAGER-HOST}:{PORT}/api/public/v1.0
PATCH /globalAlerts/{ALERT-ID}
Request Path Parameters
Name | Type | Description |
---|---|---|
| string | Unique identifier of the maintenance window you want to acknowledge. |
Request Query Parameters
Name | Type | Necessity | Description | Default | ||||||
---|---|---|---|---|---|---|---|---|---|---|
pretty | boolean | Optional | Flag indicating whether the response body should be in a prettyprint format. |
| ||||||
envelope | boolean | Optional | Flag that indicates whether or not to wrap the response in an envelope. Some API clients cannot access the HTTP response headers or status code. To remediate this, set envelope=true in the query. For endpoints that return one result, the response body includes:
|
|
Request Body Parameters
Body Parameter | Type | Necessity | Description |
---|---|---|---|
| string | Required | Timestamp in ISO 8601 date and time format in UTC through which you acknowledge this alert. After this time passes, Ops Manager reverts the alert to un-acknowledged. To prevent the alert from resuming any time soon, set the date and time to some point in the distant future. To un-acknowledge an alert, specify a time and date in the past. |
| string | Optional | Comment describing the alert acknowledgement. |
Response
Name | Type | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
| string | Timestamp in ISO 8601 date and time format in UTC through which the alert has been acknowledged. Ops Manager presents this field if a user acknowledged this alert. | ||||||||
| string | Comment that the user who acknowledged this alert left. Ops Manager presents this field if a user acknowledged this alert. | ||||||||
| string | Ops Manager username of the user who acknowledged the alert. Ops Manager presents this field if a user acknowledged this alert. | ||||||||
| string | Unique identifier of the global alert configuration that triggered this alert. | ||||||||
| string | Unique identifier of the cluster to which this alert applies. Ops Manager returns this field for global alerts in the categories of: | ||||||||
| string | Name the cluster to which this alert applies. Ops Manager returns this field for global alerts in the categories of: | ||||||||
| string | Timestamp in ISO 8601 date and time format in UTC when the alert was created. | ||||||||
| object | Current value of the metric that triggered the alert. Ops Manager returns this field for global alerts in the category of host. | ||||||||
| number | Current value of the metric. | ||||||||
| string | Units for Accepted values are:
For example, a metric that measures memory consumption can use | ||||||||
| string | Name of the event that triggered the alert. To review the types of events that generate alerts, see Alert Types. For a complete list of events included in the Ops Manager audit log, see Audit Events. | ||||||||
| string | Unique identifier of the project for which this alert was opened. | ||||||||
| string | Unique identifier of the host to which the metric pertains. Ops Manager returns this field for global alerts in the categories of: | ||||||||
| string | Hostname and port of each host to which the alert applies. The hostname can be only a hostname, an FQDN, an IPv4 address, or an IPv6 address. Ops Manager returns this field for global alerts in the categories of: | ||||||||
| string | Unique identifier of the alert. | ||||||||
| string | Timestamp in ISO 8601 date and time format in UTC when the last notification was sent for this alert. Ops Manager displays this if Ops Manager sent notifications. | ||||||||
| string | Name of the measurement whose value went outside the threshold.
Ops Manager returns this field if For possible values, see Measurement Types for Global Alerts. | ||||||||
| string | Name of the replica set. Ops Manager returns this field for global alerts in the categories of: | ||||||||
| string | Timestamp in ISO 8601 date and time format in UTC when the alert was closed. Ops Manager returns this field for global
alerts when | ||||||||
| string | Type of host being backed up. Ops Manager returns this field for global alerts in the category of backup. Possible values that can be returned include:
| ||||||||
| string | Current state of the alert. Possible values that can be returned include:
| ||||||||
| array of strings | Tags associated with this alert. | ||||||||
| string | This field is deprecated and will be ignored. | ||||||||
| string | Timestamp in ISO 8601 date and time format in UTC when this alert was last updated. |
Example Request
1 curl --user "{PUBLIC-KEY}:{PRIVATE-KEY}" --digest \ 2 --header "Accept: application/json" \ 3 --header "Content-Type: application/json" \ 4 --include \ 5 --request PATCH "https://<OpsManagerHost>:<Port>/api/public/v1.0/globalAlerts/{ALERT-ID}" \ 6 --data '{ 7 "acknowledgedUntil":"2020-04-10T20:21:31Z", 8 "acknowledgementComment":"test" 9 }'
Example Response
Response Header
401 Unauthorized Content-Type: application/json;charset=ISO-8859-1 Date: {dateInUnixFormat} WWW-Authenticate: Digest realm="MMS Public API", domain="", nonce="{nonce}", algorithm=MD5, op="auth", stale=false Content-Length: {requestLengthInBytes} Connection: keep-alive
201 Created Vary: Accept-Encoding Content-Type: application/json Strict-Transport-Security: max-age=300 Date: {dateInUnixFormat} Connection: keep-alive Content-Length: {requestLengthInBytes} X-MongoDB-Service-Version: gitHash={gitHash}; versionString={ApplicationVersion}
Response Body
1 { 2 "acknowledgedUntil": "2020-04-10T20:20:38Z", 3 "acknowledgementComment": "test", 4 "acknowledgingUsername": "rwqvzark", 5 "alertConfigId": "{ALERT-CONFIG-ID}", 6 "created": "2019-12-02T20:39:54Z", 7 "eventTypeName": "BACKUP_AGENT_DOWN", 8 "groupId": "{PROJECT-ID}", 9 "id": "{ALERT-ID}", 10 "lastNotified": "2020-04-09T20:21:31Z", 11 "links": [ 12 ], 13 "status": "OPEN", 14 "tags": [], 15 "typeName": "AGENT", 16 "updated": "2020-04-10T19:14:38Z" 17 }