Get All Alert Configurations for a Group
On this page
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
Syntax
GET /groups/{GROUP-ID}/alertConfigs
Request Path Parameters
Parameter | Required/Optional | Description |
---|---|---|
{GROUP-ID} | Required | Project identifier. |
Request Query Parameters
This endpoint may use any of the HTTP request query parameters available to all Atlas Administration API resources. These are all optional.
Name | Type | Necessity | Description | Default |
---|---|---|---|---|
pageNum | integer | Optional | Page number, starting with one, that Atlas returns of the
total number of objects. | 1 |
itemsPerPage | integer | Optional | Number of items that Atlas returns per page, up to a maximum
of 500. | 100 |
includeCount | boolean | Optional | Flag that indicates whether Atlas returns the totalCount
parameter in the response body. | true |
pretty | boolean | Optional | Flag that indicates whether Atlas returns the JSON
response in the
prettyprint format. | false |
envelope | boolean | Optional | 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 Endpoints that return a list of results use the results object as an envelope. Atlas adds the status parameter to the response body. | false |
Request Body Parameters
This endpoint does not use HTTP request body parameters.
Response Elements
The response includes the totalCount
of the alert configurations
and a results
array which lists all alert configurations for the
group. Each alert configuration details include:
Alert configurations vary. An alert configuration may only include a subset of these elements.
Name | Type | Description |
---|---|---|
id | string | Unique identifier of the alert configuration. |
groupId | string | Unique identifier of the project that owns this alert
configuration. |
eventTypeName | string | Human-readable label that indicates the type of event. Accepted values are: Important The complete list of event type values changes frequently. Backup
Billing
Encryption Key
Host
Project
Replica Set
Serverless
Sharded Cluster
User
X.509
|
created | string | Timestamp in ISO 8601 date and time format in UTC when this alert configuration was created. |
updated | string | Timestamp in ISO 8601 date and time format in UTC when this alert configuration was last
updated. |
enabled | boolean | If set to If |
matchers | object array | Rules to apply when matching an object against this alert configuration. Only entities that match all these rules are checked for an alert condition. You can filter using the |
matchers .fieldName | string | Name of the field in the target object to match on.
All other types of alerts do not support matchers. |
matchers .operator | string | Operator to test the field's value. Accepted values are:
|
matchers .value | string | Value to test with the specified operator. If
|
metricThreshold | object | Threshold that causes an alert to be triggered.
Populated if eventTypeName is set to
OUTSIDE_METRIC_THRESHOLD or
OUTSIDE_SERVERLESS_METRIC_THRESHOLD . |
metricThreshold .metricName | string | Name of the metric against which Atlas checks the
configured To learn more about the available metrics, see Host Metrics. Note If you set |
metricThreshold .operator | string | Operator to apply when checking the current metric value against the threshold value. Accepted values are:
|
metricThreshold .threshold | integer | Threshold value outside of which an alert will be triggered. |
metricThreshold .units | string | Units for the threshold value. Depends on the type of metric. Example A metric that measures memory consumption would have a byte measurement, while a metric that measures time would have a time unit. Accepted values are:
|
metricThreshold .mode | string | AVERAGE . Atlas computes the current metric value as
an average. |
notifications | object array | Notifications to send when an alert condition is detected. |
notifications .typeName | string | Type of alert notification. Accepted values are:
|
notifications .intervalMin | integer | Number of minutes to wait between successive notifications for unacknowledged alerts that are not resolved. Note PagerDuty, VictorOps, and OpsGenie notifications don't return this element. You must configure and manage the notification interval within each external service. |
notifications .delayMin | integer | Number of minutes to wait after an alert condition is
detected before sending out the first notification. |
notifications .emailEnabled | boolean | Flag indicating if email notifications should be sent.
Returned with ORG , GROUP , and USER notifications
types. |
notifications .smsEnabled | boolean | Flag indicating if text message notifications should be sent.
Returned with ORG , GROUP , and USER notifications
types. |
notifications .username | string | Name of the Atlas user to which to send notifications.
Only a user in the project that owns the alert configuration
is allowed here. Returned with the USER notifications
type. |
notifications .roles | array of strings | One or more project roles that receive the configured alert. Accepted values include:
|
notifications .teamId | string | Unique identifier of a team. |
notifications .emailAddress | string | Email address to which alert notifications are sent.
Returned with the EMAIL notifications type. |
notifications .mobileNumber | string | Mobile number to which alert notifications are sent.
Returned with the SMS notifications type. |
notifications .channelName | string | Slack channel name.
Returned with the SLACK notifications type. |
notifications .apiToken | string | Slack API token or Bot token.
Returned with the SLACK notifications type.
If the token later becomes invalid, Atlas sends an email
to the project owner and eventually removes the token. |
notifications .orgName | string | Flowdock organization name in lower-case letters. This is the
name that appears after www.flowdock.com/app/ in the URL
string. Returned with the FLOWDOCK notifications type. |
notifications .flowName | string | Flowdock flow name in lower-case letters. The flow name appears after the organization name in the URL string:
Returned with the |
notifications .flowdockApiToken | string | Flowdock personal API token. Returned with the
FLOWDOCK notifications type. If the token later becomes
invalid, Atlas sends an email to the project owner and
eventually removes the token. |
notifications .serviceKey | string | PagerDuty service key. Returned with the PAGER_DUTY
notifications type. If the key later becomes invalid,
Atlas sends an email to the project owner and eventually
removes the key. |
notifications .victorOpsApiKey | string | VictorOps API key.
Returned with the VICTOR_OPS notifications type.
If the key later becomes invalid, Atlas sends an email
to the project owner and eventually removes the key. |
notifications .victorOpsRoutingKey | string | VictorOps routing key.
Returned with the VICTOR_OPS notifications type.
If the key later becomes invalid, Atlas sends an email
to the project owner and eventually removes the key. |
notifications .opsGenieApiKey | string | Opsgenie API Key. Returned with the OPS_GENIE
notifications type. If the key later becomes invalid,
Atlas sends an email to the project owner and eventually
removes the token. |
notifications .opsGenieRegion | string | Region that indicates which API URL to use. Accepted regions are:
The default Opsgenie region is |
notifications .datadogApiKey | string | Datadog API Key. Found in the Datadog dashboard. Populated
for the DATADOG notifications type. |
notifications .datadogRegion | string | Region that indicates which API URL to use. Accepted regions are:
The default Datadog region is |
notifications .microsoftTeamsWebhookUrl | string | Microsoft Teams channel incoming webhook URL.
Returned with the MICROSOFT_TEAMS notifications type. |
Serverless Measurements
Metric Name | Description |
---|---|
SERVERLESS_CONNECTIONS | Number of active connections to the serverless instance
meets the specified average. |
SERVERLESS_CONNECTIONS_PERCENT | Number of open connections to the serverless instance
exceeds the specified percentage threshold. |
SERVERLESS_DATA_SIZE_TOTAL | Approximate size of all documents (and their paddings) meets
the specified threshold. |
SERVERLESS_NETWORK_BYTES_IN | Number of bytes sent to MongoDB meets the specified threshold. |
SERVERLESS_NETWORK_BYTES_OUT | Number of bytes sent from MongoDB meets the specified
threshold. |
SERVERLESS_NETWORK_NUM_REQUESTS | Number of requests sent to MongoDB meets the specified average. |
SERVERLESS_OPCOUNTER_CMD | Rate of commands performed meets the specified threshold. |
SERVERLESS_OPCOUNTER_DELETE | Rate of deletes meets the specified threshold. |
SERVERLESS_OPCOUNTER_GETMORE | Rate of getmore operations to retrieve the next cursor
batch meets the specified threshold. |
SERVERLESS_OPCOUNTER_INSERT | Rate of inserts meets the specified threshold. |
SERVERLESS_OPCOUNTER_QUERY | Rate of queries meets the specified threshold. |
SERVERLESS_OPCOUNTER_UPDATE | Rate of updates meets the specified threshold. |
SERVERLESS_TOTAL_READ_UNITS | Total read units meet the specified threshold. |
Example Request
curl -X GET -u "{PUBLIC-KEY}:{PRIVATE-KEY}" --digest "https://cloud.mongodb.com/api/atlas/v1.0/groups/535683b3794d371327b/alertConfigs"
Example Response
{ "results": [ { "id" : "533dc40ae4b00835ff81eaee", "groupId" : "535683b3794d371327b", "eventTypeName" : "OUTSIDE_METRIC_THRESHOLD", "created" : "2016-08-23T20:26:50Z", "updated" : "2016-08-23T20:26:50Z", "enabled" : true, "matchers" : [ { "field" : "HOSTNAME_AND_PORT", "operator" : "EQUALS", "value" : "mongo.example.com:27017" } ], "notifications" : [ { "typeName" : "SMS", "intervalMin" : 5, "delayMin" : 0, "mobileNumber" : "2343454567" } ], "metricThreshold" : { "metricName" : "ASSERT_REGULAR", "operator" : "LESS_THAN", "threshold" : 99.0, "units" : "RAW", "mode" : "AVERAGE" }, "links" : [ ... ] }, ... ], "totalCount": 3, "links" : [ ... ] }