Navigation

Get an Alert

Info With Circle IconCreated with Sketch.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.

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

The Atlas API authenticates using HTTP Digest Authentication. Provide a programmatic API public key and corresponding private key as the username and password when constructing the HTTP request.

To learn how to configure API access for an Atlas project, see Configure Atlas API Access.

GET /api/atlas/v1.0/groups/{GROUP-ID}/alerts/{ALERT-ID}
ParameterRequired/OptionalDescription
{GROUP-ID}RequiredProject identifier.
{ALERT-ID}RequiredAlert identifier.

The following query parameters are optional:

NameTypeNecessityDescriptionDefault
pageNumintegerOptionalPage number, starting with one, that Atlas returns of the total number of objects.1
itemsPerPageintegerOptionalNumber of items that Atlas returns per page, up to a maximum of 500.100
includeCountbooleanOptionalFlag that indicates whether Atlas returns the totalCount parameter in the response body.true
prettybooleanOptionalFlag that indicates whether Atlas returns the JSON response in the prettyprint format.false
envelopebooleanOptional

Flag that indicates whether Atlas wraps 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.

Endpoints that return a list of results use the results object as an envelope. Atlas adds the status parameter to the response body.

false

This endpoint does not use HTTP request body parameters.

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

NameTypeDescription
acknowledgedUntilstringTimestamp in ISO 8601 date and time format in UTC through which the alert has been acknowledged. Returned if the alert has been acknowledged.
acknowledgementCommentstringComment left by the user who acknowledged the alert. Returned if the alert has been acknowledged.
acknowledgingUsernamestringUsername of the user who acknowledged the alert. Returned if the alert has been acknowledged.
alertConfigIdstringUnique identifier of the alert configuration that triggered this alert.
clusterNamestringName the cluster to which this alert applies.
createdstringTimestamp in ISO 8601 date and time format in UTC when the alert was opened.
currentValueobjectCurrent value of the metric that triggered the alert.
currentValue.numbernumberValue.
currentValue.unitsstring

Units for the value. Possible units are:

  • RAW
  • BITS
  • BYTES
  • KILOBITS
  • KILOBYTES
  • MEGABITS
  • MEGABYTES
  • GIGABITS
  • GIGABYTES
  • TERABYTES
  • PETABYTES
  • MILLISECONDS
  • SECONDS
  • MINUTES
  • HOURS
  • DAYS
eventTypeNamestringName of the event that triggered the alert.
idstringUnique identifier for the alert.
groupIdstringUnique identifier of the project that this alert was opened for.
hostnameAndPortstringHostname and port of the host to which the alert applies.
lastNotifiedstringTimestamp in ISO 8601 date and time format in UTC when the last notification was sent for this alert. Returned if notifications have been sent.
metricNamestring

Name of the metric whose value went outside the threshold.

Possible values are:

  • ASSERT_MSG
  • ASSERT_REGULAR
  • ASSERT_USER
  • ASSERT_WARNING
  • AVG_COMMAND_EXECUTION_TIME
  • AVG_READ_EXECUTION_TIME
  • AVG_WRITE_EXECUTION_TIME
  • CACHE_BYTES_READ_INTO
  • CACHE_BYTES_WRITTEN_FROM
  • CACHE_DIRTY_BYTES
  • CACHE_USED_BYTES
  • COMPUTED_MEMORY
  • CONNECTIONS
  • CONNECTIONS_PERCENT
  • CURSORS_TOTAL_OPEN
  • CURSORS_TOTAL_TIMED_OUT
  • DB_DATA_SIZE_TOTAL
  • DB_INDEX_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
  • DOCUMENT_DELETED
  • DOCUMENT_INSERTED
  • DOCUMENT_RETURNED
  • DOCUMENT_UPDATED
  • EXTRA_INFO_PAGE_FAULTS
  • FTS_MEMORY_RESIDENT
  • FTS_MEMORY_SHARED
  • FTS_MEMORY_VIRTUAL
  • FTS_PROCESS_CPU_KERNEL
  • FTS_PROCESS_CPU_USER
  • FTS_PROCESS_DISK
  • GLOBAL_LOCK_CURRENT_QUEUE_READERS
  • GLOBAL_LOCK_CURRENT_QUEUE_TOTAL
  • GLOBAL_LOCK_CURRENT_QUEUE_WRITERS
  • LOGICAL_SIZE
  • MEMORY_RESIDENT
  • MEMORY_VIRTUAL
  • NETWORK_BYTES_IN
  • NETWORK_BYTES_OUT
  • NETWORK_NUM_REQUESTS
  • NORMALIZED_FTS_PROCESS_CPU_KERNEL
  • NORMALIZED_FTS_PROCESS_CPU_USER
  • NORMALIZED_SYSTEM_CPU_STEAL
  • NORMALIZED_SYSTEM_CPU_USER
  • OPCOUNTER_CMD
  • OPCOUNTER_DELETE
  • OPCOUNTER_GETMORE
  • OPCOUNTER_INSERT
  • OPCOUNTER_QUERY
  • OPCOUNTER_REPL_CMD
  • OPCOUNTER_REPL_DELETE
  • OPCOUNTER_REPL_INSERT
  • OPCOUNTER_REPL_UPDATE
  • OPCOUNTER_UPDATE
  • OPERATIONS_SCAN_AND_ORDER
  • OPLOG_MASTER_LAG_TIME_DIFF
  • OPLOG_MASTER_TIME
  • OPLOG_RATE_GB_PER_HOUR
  • OPLOG_SLAVE_LAG_MASTER_TIME
  • QUERY_EXECUTOR_SCANNED
  • QUERY_EXECUTOR_SCANNED_OBJECTS
  • QUERY_TARGETING_SCANNED_OBJECTS_PER_RETURNED
  • QUERY_TARGETING_SCANNED_PER_RETURNED
  • RESTARTS_IN_LAST_HOUR
  • TICKETS_AVAILABLE_READS
  • TICKETS_AVAILABLE_WRITES
replicaSetNamestringName of the replica set, if applicable.
resolvedstringTimestamp in ISO 8601 date and time format in UTC when the alert was closed. Returned if "status" : "CLOSED".
statusstring

Current state of the alert. Possible values are:

  • TRACKING

    Alert condition exists but hasn't persisted beyond the defined notification delay.

    Bulb IconTip
    See Also:
  • OPEN
  • CLOSED
  • CANCELLED
updatedstringTimestamp in ISO 8601 date and time format in UTC when the alert was last updated.
curl -X GET -u "{PUBLIC-KEY}:{PRIVATE-KEY}" --digest "https://cloud.mongodb.com/api/atlas/v1.0/groups/535683b3794d371327b/alerts/533cb4b8e4b0f1820cdabc7f"
{
"alertConfigId" : "5b43d04087d9d6357de591aa",
"created" : "2019-07-26T21:12:19Z",
"currentValue" : {
"number" : 100,
"units" : "RAW"
},
"eventTypeName" : "OUTSIDE_METRIC_THRESHOLD",
"groupId" : "535683b3794d371327b",
"hostnameAndPort" : "cluster0-shard-00-00-19mce.mongodb.net:27017",
"id" : "533cb4b8e4b0f1820cdabc7f",
"lastNotified" : "2019-07-26T21:13:48Z",
"metricName" : "CONNECTIONS",
"replicaSetName" : "cluster0-shard-0",
"resolved" : "2019-07-26T21:13:42Z",
"status" : "CLOSED",
"typeName" : "HOST_METRIC",
"updated" : "2019-07-26T21:13:42Z",
"links" : [ ... ]
}
Give Feedback