Navigation

Acknowledge an Alert

Note

Groups and projects are synonymous terms. Your {GROUP-ID} is the same as your project ID. For existing groups, your group/project ID remains the same. The resource and corresponding endpoints use the term groups.

Base URL: https://cloud.mongodb.com/api/atlas/v1.0

The Atlas API uses HTTP Digest Authentication. Provide your Atlas username and API key as the username and password when constructing the HTTP request.

For complete documentation on configuring API access for an Atlas project, see Configure Atlas API Access.

Syntax

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

Request Path Parameters

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

Request Query Parameters

This endpoint may use any of the HTTP request query parameters available to all Atlas API resources. These are all optional.

Name Type Description Default
pageNum integer Page number (1-based). 1
itemsPerPage integer Maximum number of items to return, up to a maximum of 100. 100
pretty boolean Display response in a prettyprint format. false
envelope boolean Specifies whether or not to wrap the response in an envelope. false

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, 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 for the alert.
groupId string ID of the project 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. The possible values depend on the alert type.

Alert type Possible values
Host OUTSIDE_METRIC_THRESHOLD HOST_RESTARTED HOST_UPGRADED HOST_NOW_SECONDARY HOST_NOW_PRIMARY
Replica set NO_PRIMARY TOO_MANY_ELECTIONS
Sharded cluster CLUSTER_MONGOS_IS_MISSING
User JOINED_GROUP REMOVED_FROM_GROUP USER_ROLES_CHANGED_AUDIT
Project USERS_AWAITING_APPROVAL USERS_WITHOUT_MULTI_FACTOR_AUTH GROUP_CREATED
Team JOINED_TEAM REMOVED_FROM_TEAM
Organization INVITED_TO_ORG JOINED_ORG
Billing CREDIT_CARD_ABOUT_TO_EXPIRE CHARGE_SUCCEEDED INVOICE_CLOSED
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

created date When the alert was opened.
updated date When the alert was last updated.
lastNotified date When the last notification was sent for this alert. Only present if notifications have been sent.
resolved date When the alert was closed. Only present if the status is CLOSED.
acknowledgedUntil date The date through which the alert has been acknowledged. This is not present if the alert has never been acknowledged.
acknowledgementComment string The comment left by the user who acknowledged the alert. This is not present if the alert has never been acknowledged.
acknowledgingUsername string The username of the user who acknowledged the alert. This is not present if the alert has never been acknowledged.
hostnameAndPort string The hostname and port of the host to which the alert applies.
metricName string

The name of the metric whose value went outside the threshold. Only present if eventTypeName is 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_USAGE_DIRTY
  • CACHE_USAGE_USED
  • 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
currentValue object The current value of the metric that triggered the alert. Only present if eventTypeName is OUTSIDE_METRIC_THRESHOLD.
currentValue.number float The value.
currentValue.units string

The units for the value. Possible units are:

  • RAW
  • BITS
  • BYTES
  • KILOBITS
  • KILOBYTES
  • MEGABITS
  • MEGABYTES
  • GIGABITS
  • GIGABYTES
  • TERABYTES
  • PETABYTES
  • MILLISECONDS
  • SECONDS
  • MINUTES
  • HOURS
  • DAYS
replicaSetName string Name of the replica set, if applicable.
clusterName string The name the cluster to which this alert applies.

Example Request

curl -u "username:apiKey" -H "Content-Type: application/json" --digest -X PATCH "https://cloud.mongodb.com/api/atlas/v1.0/groups/535683b3794d371327b/alerts/524dc45ee4b835ff81ec2a" --data '
{
  "acknowledgedUntil" : "2016-10-01T00:00:00-0400",
  "acknowledgementComment" : "This is normal. Please ignore."
}'

Example Response

{
  "id" : "524dc45ee4b835ff81ec2a",
  "groupId" : "535683b3794d371327b",
  "eventTypeName" : "OUTSIDE_METRIC_THRESHOLD",
  "status" : "OPEN",
  "acknowledgedUntil" : "2016-10-01T04:00:00Z",
  "acknowledgementComment" : "This is normal. Please ignore.",
  "acknowledgingUsername" : "someuser@example.com",
  "created" : "2016-08-23T20:28:14Z",
  "updated" : "2016-08-23T20:33:14Z",
  "lastNotified" : "2016-08-23T20:33:23Z",
  "metricName" : "ASSERTS_REGULAR",
  "currentValue" : {
    "number" : 0.0,
    "units" : "RAW"
  },
  "links" : [ ... ]
}