Skip to content

feat: add MongoDB Atlas provider - #6658

Open
BaesTheorem wants to merge 1 commit into
keephq:mainfrom
BaesTheorem:feat/mongodb-atlas-provider
Open

feat: add MongoDB Atlas provider#6658
BaesTheorem wants to merge 1 commit into
keephq:mainfrom
BaesTheorem:feat/mongodb-atlas-provider

Conversation

@BaesTheorem

Copy link
Copy Markdown

Closes #1839

Adds a MongoDB Atlas provider with both directions:

  • Pull: lists project alerts from the Atlas Administration API v2 (GET /api/atlas/v2/groups/{groupId}/alerts, digest auth, versioned 2023-01-01 Accept header) with pagination.
  • Push: receives Atlas alert webhooks. Atlas webhooks can't set custom headers, so the setup instructions use the api_key query parameter.

A few mapping decisions worth flagging for review:

  • Atlas alerts have a status (OPEN/TRACKING/CLOSED) but no severity, so alerts land as warning and keep eventTypeName available for mapping rules downstream. TRACKING maps to pending, and acknowledgedUntil marks an open alert acknowledged.
  • The fingerprint is the Atlas alert id, which is stable across an alert's open/close lifecycle.
  • Webhook payloads use the same schema as the API alert resource, so one formatter covers both paths.

Verification: black 24.10.0 / isort 5.13.2 / ruff 0.11.4 (the repo pins) pass; docs snippet regenerated with scripts/docs_render_provider_snippets.py and --validate passes; the formatter is exercised against AlertDto with the sample payload from Atlas's webhook docs (OPEN/CLOSED/TRACKING/acknowledged transitions and a minimal payload). I don't have an Atlas project with live alerts to test the pull path end to end, so that part is written against the API reference and would benefit from a check by someone who does.

@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. Feature A new feature Provider Providers related issues labels Jul 30, 2026
@CLAassistant

CLAassistant commented Jul 30, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@shahargl

Copy link
Copy Markdown
Member

hey @BaesTheorem , do you use Keep?

@BaesTheorem

Copy link
Copy Markdown
Author

hey @BaesTheorem , do you use Keep?

Heya! I do not. I run a fair amount of self-hosted monitoring and automation at home, but not Keep yet. I went looking for a well-maintained project in a space I know so I could start contributing, and this one was tagged "Good First Issue" and still open, so I went for it.

If it helps, I can stand up Keep with docker-compose and a free-tier Atlas cluster and run the pull path end to end. The webhook path is already tested against the sample payload from the Atlas docs, and the PR notes what I couldn't exercise. :)

Happy to make whatever changes you want either way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature A new feature Provider Providers related issues size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[🔌 Provider]: Add Mongo Atlas provider

3 participants