Navigation
This version of the documentation is archived and no longer supported. To learn how to upgrade your version of MongoDB Ops Manager, refer to the upgrade documentation.
You were redirected from a different version of the documentation. Click here to go back.

Acknowledge an Alert

Base URL: https://<ops-manager-host>

Syntax

PATCH /api/public/v1.0/groups/{GROUP-ID}/alerts/{ALERT-ID}

Request Path Parameters

Parameter Required/Optional Description
GROUP-ID Required Group identifier.
ALERT-ID Required Alert identifier.

Request Query Parameters

Field Required/Optional Description
pageNum Optional. The page to return.
itemsPerPage Optional. Maximum number of items to return per page. Default is 100.
envelope Optional. A boolean that specifies whether or not to wrap the response in an envelope.

Request Body Parameters

Field Required/Optional Description
acknowledgedUntil

Required.

To acknowledge an alert “forever”, set the field value to 100 years in the future.

To unacknowledge a previously acknowledged alert, set the field value to the past.

The page to return.
acknowledgementComment Optional. If you add a comment, MongoDB Atlas displays the comment next to the message that the alert has been acknowledged.

Response Elements

The fields in the return document depend on the alert type:

Name Type Description
id string Unique identifier.
groupId string ID of the group that this alert was opened for.
alertConfigId string ID of the alert configuration that triggered this alert.
eventTypeName string

The name of the event that triggered the alert.

  • Host alerts support these values:
    • HOST_DOWN
    • HOST_RECOVERING
    • VERSION_BEHIND
    • HOST_EXPOSED
    • OUTSIDE_METRIC_THRESHOLD
  • Agent alerts support these values:
    • MONITORING_AGENT_DOWN
    • MONITORING_AGENT_VERSION_BEHIND
    • BACKUP_AGENT_DOWN
    • BACKUP_AGENT_VERSION_BEHIND
    • BACKUP_AGENT_CONF_CALL_FAILURE
  • Backup alerts support these values:
    • OPLOG_BEHIND
    • CLUSTER_MONGOS_IS_MISSING
    • RESYNC_REQUIRED
    • BAD_CLUSTERSHOTS
    • RS_BIND_ERROR (x alerts only)
    • BACKUP_TOO_MANY_RETRIES (global alerts only)
    • BACKUP_IN_UNEXPECTED_STATE (global alerts only)
    • LATE_SNAPSHOT (global alerts only)
    • SYNC_SLICE_HAS_NOT_PROGRESSED (global alerts only)
    • BACKUP_JOB_TOO_BUSY (global alerts only)
    • GROUP_TAGS_CHANGED (global alerts only)
  • Group alerts support these values:
    • USERS_AWAITING_APPROVAL
    • USERS_WITHOUT_MULTI_FACTOR_AUTH
  • Replica set alerts support these values:
    • CONFIGURATION_CHANGED
    • PRIMARY_ELECTED
    • TOO_FEW_HEALTHY_MEMBERS
    • TOO_MANY_UNHEALTHY_MEMBERS
    • NO_PRIMARY
  • Sharded cluster alerts support this value:
    • CLUSTER_MONGOS_IS_MISSING
  • User alerts support these values:
    • JOINED_GROUP
    • REMOVED_FROM_GROUP
typeName string This field is deprecated and will be ignored.
status string

The current state of the alert. Possible values are:

  • TRACKING

    The alert condition exists but has not persisted beyond the defined notification delay. For details, see Request Query Parameters.

  • OPEN

  • CLOSED

  • CANCELLED

acknowledgedUntil date The date through which the alert has been acknowledged. Will not be present if the alert has never been acknowledged.
acknowledgementComment string The comment left by the user who acknowledged the alert. Will not be present if the alert has never been acknowledged.
acknowledgingUsername string The username of the user who acknowledged the alert. Will not be present if the alert has never been acknowledged.
created date When the alert was opened.
updated date When the alert was last updated.
resolved date When the alert was closed. Only present if the status is CLOSED.
lastNotified date When the last notification was sent for this alert. Only present if notifications have been sent.
hostnameAndPort string The hostname and port of each host to which the alert applies. Only present for alerts of type HOST, HOST_METRIC, and REPLICA_SET.
hostId string ID of the host to which the metric pertains. Only present for alerts of type HOST, HOST_METRIC, and REPLICA_SET.
replicaSetName string Name of the replica set. Only present for alerts of type HOST, HOST_METRIC, BACKUP, and REPLICA_SET.
metricName string

The name of the measurement whose value went outside the threshold. Only present if eventTypeName is set to OUTSIDE_METRIC_THRESHOLD.

For possible values, see below.

currentValue object The current value of the metric that triggered the alert. Only present for alerts of type HOST_METRIC.
currentValue.number number The value of the metric.
currentValue.units string

The units for the value. Depends on the type of metric. For example, a metric that measures memory consumption would have a byte measurement, while a metric that measures time would have a time unit. Possible values are:

  • RAW
  • BITS
  • BYTES
  • KILOBITS
  • KILOBYTES
  • MEGABITS
  • MEGABYTES
  • GIGABITS
  • GIGABYTES
  • TERABYTES
  • PETABYTES
  • MILLISECONDS
  • SECONDS
  • MINUTES
  • HOURS
  • DAYS
clusterId string The ID of the cluster to which this alert applies. Only present for alerts of type BACKUP, REPLICA_SET, and CLUSTER.
clusterName string The name the cluster to which this alert applies. Only present for alerts of type BACKUP, REPLICA_SET, and CLUSTER.
sourceTypeName string

For alerts of the type BACKUP, the type of server being backed up. Possible values are:

  • REPLICA_SET
  • SHARDED_CLUSTER
  • CONFIG_SERVER

Example Request

curl -X PATCH -u "username:apiKey"  --digest -H "Content-Type: application/json" "https://<ops-manager-host>/api/public/v1.0/groups/5196d3628d022db4cbc26d9e/alerts/533dc45ee4b00835ff81ec2a" --data '
{
  "acknowledgedUntil": "2016-04-15T00:00:00-0400",
  "acknowledgementComment": "This is normal. Please ignore."
}'

Example Response

{
  "id" : "533dc45ee4b00835ff81ec2a",
  "groupId" : "5196d3628d022db4cbc26d9e",
  "eventTypeName" : "OUTSIDE_METRIC_THRESHOLD",
  "status" : "OPEN",
  "acknowledgedUntil" : "2014-04-15T04:00:00Z",
  "acknowledgementComment" : "This is normal. Please ignore.",
  "acknowledgingUsername" : "someuser@example.com",
  "created" : "2014-04-03T20:28:14Z",
  "updated" : "2014-04-03T20:33:14Z",
  "lastNotified" : "2014-04-03T20:33:23Z",
  "metricName": "ASSERTS_REGULAR",
  "currentValue" : {
    "number" : 0.0,
    "units" : "RAW"
  },
  "links" : [ ... ]
}