Overview
OpenSRE uses the Atlas Admin API (not a MongoDB connection string) to inspect cluster health, performance metrics, slow-query recommendations, and operational events when alerts fire. For direct MongoDB wire-protocol diagnostics, see MongoDB.Prerequisites
- MongoDB Atlas API Public Key
- MongoDB Atlas API Private Key
- Atlas Project ID
- Permissions to view cluster metrics and configuration (Project Read Only or higher)
Setup
Option 1: Interactive CLI
Option 2: Environment variables
Option 3: Persistent store
Credentials
- Log in to MongoDB Atlas
- Navigate to Access Manager → API Keys
- Create a Project API Key
- Copy the Public Key and Private Key
- Copy the Project ID from Atlas project settings
This integration uses the Atlas Admin API, not a MongoDB connection string. Create a Project API key with read access to cluster metrics and alerts.
Investigation tools
Verify
Troubleshooting
Security
- Create a dedicated Atlas API key for OpenSRE with the minimum project role required.
- Rotate API keys periodically and revoke unused keys.
- Never commit API keys to source control — use
.envor the integration store.