Connecting to MongoDB
Connect your MongoDB Atlas account to CloudZero to bring your MongoDB cost and usage data into a unified view of all your cloud and SaaS spend. CloudZero organizes your MongoDB costs, along with your other costs, into categories (called Dimensions) that matter most to your business. For example: business unit, team, product, feature, environment, customer, or virtually anything else. Once connected and organized, you can quickly answer questions about your spend that matter to your stakeholders.
This guide covers creating a MongoDB API key and configuring the connection in CloudZero. All access is read-only.
CloudZero supports MongoDB Atlas only. For self-hosted MongoDB deployments, billing data is included in your cloud provider's billing connection.
What you need
- CloudZero user with data configuration permissions
- MongoDB Atlas account with permissions to create organization-level API keys
A MongoDB API key grants access only to the organization where it was created. To connect linked organizations, create a separate API key and CloudZero connection for each.
Step 1: Create a MongoDB API key and locate your Organization ID
For full details, see MongoDB's API access documentation.
- In MongoDB Atlas, create an organization-level API key with Organization Billing Viewer permissions.
- Copy the public key and private key. You need these in Step 2.
- Navigate to Organization Settings and copy your Organization ID.
Step 2: Configure the connection in CloudZero
-
In CloudZero, go to Settings > Cloud Connections.
-
Select Create Connection + and select the MongoDB tile.
-
Enter the connection details:
Field Value Connection Name A name for this connection. Appears throughout CloudZero. Public Key The public key from Step 1 Private Key The private key from Step 1 Organization ID The Organization ID from Step 1 Use Fixed IP Egress Enable if your account restricts API access by IP. See Fixed IP egress. -
Select Save.
What to expect
After you save the connection, CloudZero begins pulling your MongoDB billing data:
- New connection: CloudZero pulls up to 24 months of historical billing data if available.
- Re-enabled connection: CloudZero pulls up to 24 months of billing data, starting from the current period back to the last previously ingested period.
- Steady state: CloudZero pulls the current and previous billing periods.
Cost data appears in the Explorer within 24 hours.
Maintenance and configuration
Fixed IP egress
If your MongoDB account restricts API access by IP address:
- Enable Use Fixed IP Egress in the CloudZero connection settings.
- In MongoDB Atlas, navigate to Access Manager > Organization Access > API Keys.
- Edit the API key used for the CloudZero connection and select Next.
- Select Add Access List Entry and add
52.0.118.180. - Select Add Access List Entry again and add
52.0.33.111.
Have questions or feedback? Reach out to your account manager.
Updated 18 days ago
