Skip to main content

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

Enter your Atlas API credentials when prompted.

Option 2: Environment variables

Option 3: Persistent store

Credentials

  1. Log in to MongoDB Atlas
  2. Navigate to Access Manager → API Keys
  3. Create a Project API Key
  4. Copy the Public Key and Private Key
  5. 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

Expected output:

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 .env or the integration store.