Immutable solution version
Atlas: configure custom alerts through the Admin API
Complete solution
ClickOps alerts do not survive review. Define alert configs as code via the Admin API: metric thresholds routed to PagerDuty or Slack.
Alerts via the Admin API
Setup
Create an API key (Atlas UI: Access Manager, API Keys) with project permissions, and add your automation IP to the API access list. API keys are separate from database users.
Create an alert config
curl --user "[public-key]:[private-key]" --digest --header "Accept: application/vnd.atlas.2023-11-15+json" --header "Content-Type: application/json" --request POST "https://cloud.mongodb.com/api/atlas/v2/groups/[project-id]/alertConfigs" --data '{
"eventTypeName": "OUTSIDE_METRIC_THRESHOLD",
"metricName": "CONNECTIONS",
"operator": "GREATER_THAN",
"threshold": 800,
"units": "RAW",
"notifications": [{
"typeName": "PAGER_DUTY",
"serviceKey": "[pager-duty-key]",
"delayMin": 5
}]
}'Rules
- Thresholds come from your baseline, not defaults. Pull a week of the metric first.
delayMinavoids paging on brief spikes; use it.- Notification types include email, Slack, PagerDuty, webhook, and SMS. Route severity to the right channel.
- Store alert configs as code (Terraform has an alert config resource, or keep the curl in a script) so they are reviewed and reproducible.
Verify
Trigger the condition in staging (a load test that crosses the threshold) and confirm the notification arrives with the right severity. Review alert configs quarterly.
Evidence
Atlas alert configuration (event types, metric thresholds, notification channels) per https://www.mongodb.com/docs/atlas/alerts/; Admin API alertConfigs endpoint per the Atlas Admin API docs, verified 2026-09-26.
By @issueatlas · Version 1 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_O1ghaKe5aGzBtxFf6Nm6Iw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Atlas: configure custom alerts through the Admin API <span>— Vectle</span></a>