Skip to content
  • There are no suggestions because the search field is empty.

Integrate MongoDB with Databox

Connect MongoDB with Databox and create tailored datasets to monitor and improve your business outcomes.


Availability

  Exclusive to select subscription plans



MongoDB is a widely used NoSQL database designed to store and manage large volumes of unstructured or semi-structured data. Unlike traditional relational databases, MongoDB uses a flexible, document-oriented data model that allows users to store data in JSON-like formats, making it ideal for applications that require dynamic, scalable data structures. It supports powerful querying and indexing capabilities, enabling fast retrieval of complex data. MongoDB is commonly used in modern web and mobile applications and integrates easily with various development and analytics tools.

Connection

Step 1: Prepare your MongoDB connection credentials

Before you connect MongoDB to Databox, gather the required connection details from your MongoDB setup or administrator. Here’s where you can find each piece of information:

  • Host This is the server address where your MongoDB instance is hosted. For MongoDB Atlas (cloud service), you can find the hostname in your cluster dashboard under Clusters > Connect > Connect to your application > Drivers. For self-hosted MongoDB, ask your database admin or check your server configuration.
  • PortThe port MongoDB listens on, usually 27017 by default. You can confirm this in your MongoDB configuration file (mongod.conf) or ask your admin.
  • MongoDB Protocol Typically mongodb for standard connections or mongodb+srv if you’re using a DNS seedlist (common with Atlas). This info is part of the connection string provided by MongoDB Atlas or your admin.
  • MongoDB Auth Source The database that holds user credentials for authentication. Often this is admin, but it can also be the database name. Check your MongoDB user settings or connection string.
  • Username and Password Credentials created in MongoDB with the necessary permissions. If you don’t have these, request them from your database administrator.
  • Database Name — The specific database you want to pull data from. This can be found in your MongoDB management tool or by asking your admin.
  • SSL and Certificate Details — If your MongoDB requires SSL/TLS encryption, your admin should provide the SSL certificate files (ssl-cert, ssl-key, and optionally ssl-ca) and specify whether SSL verification is needed.

Step 2: Whitelist Databox IP address

To allow Databox to securely connect to your MongoDB database, you need to whitelist the IP address that Databox uses. This grants permission for that IP to access your MongoDB instance.

For MongoDB Atlas users:

  1. Log in to your MongoDB Atlas account.
  2. Navigate to Network Access in the left sidebar.
  3. Click Add IP Address.
  4. Enter the IP address 52.4.198.118 (the IP address used by Databox).
  5. Save the changes.

For self-hosted MongoDB: You’ll need to update your server’s firewall or network settings to allow incoming connections from the IP address 52.4.198.118. Contact your network administrator if you’re unsure how to do this.

Step 3: Enter your MongoDB connection details in Databox

Once you have gathered all the necessary information (see Step 1), enter the following details into Databox to set up your connection:

  • Host (required)
  • Port (required)
  • MongoDB Protocol (required)
  • MongoDB Auth Source
  • Username
  • Password
  • Database Name (required)
  • Name of the data source (required)
  • SSL: Enable or disable SSL encryption.
  • Time zone (required)

If SSL is enabled, make sure to provide the required SSL certificate files:

  • SSL Certificate (ssl-cert) (required)
  • SSL Certificate Key (ssl-key) (required)

Optional SSL fields include:

  • Verify SSL Certificate
  • SSL CA (ssl-ca)

Make sure all required fields are filled correctly to establish a successful connection.

If you’ve already established a connection, you can reuse it to add new accounts, as long as those accounts are accessible with the existing connection's credentials.

Datasets

The MongoDB integration supports the creation of datasets, which allow you to structure and format your MongoDB data for more flexible reporting in Databox. By organizing your data into a tabular format, datasets make it easier to filter, segment, and visualize key metrics across projects, clients, and team members.

Steps to create a dataset:

  1. Select a collection: Choose the MongoDB collection that contains the data you want to analyze. This collection acts as the source table for your dataset.
  2. Select a query method: Databox supports two query methods to retrieve data:
    1. Find: Retrieves documents matching your query filter. Use this to return specific documents or entire collections.
    2. Aggregate: Runs aggregation pipeline queries for advanced filtering, grouping, and data transformation.
  3. Enter your query
    • To return all documents in the selected collection, choose the Find method and enter an empty query {}.
    • For filtered searches or complex data manipulations, enter a valid MongoDB query or aggregation pipeline in JSON format. Make sure your query matches the syntax requirements of the chosen method.

Additional resources

pinTip: Test your query in a MongoDB client or shell to ensure it returns the expected results before entering it in Databox.

Resources

For comprehensive details on metrics, data availability, templates, specifications, usage guidelines, and other key information, refer to the resources listed below.


Technical Details

Behavior & Usage

Notes

Frequently Asked Questions

Can I connect MongoDB to Databox using a VPC peering connection?

No, Databox currently does not support connections to MongoDB via VPC peering. You’ll need to whitelist Databox’s public IP addresses to allow access.

Can I use projections or query options (like sort, limit, or skip) in my MongoDB queries within Databox?

No, the MongoDB integration currently does not support query projections or additional query options such as sort, limit, or skip. Queries should return the full documents or aggregated results as needed. For more refined control over data, consider using aggregation pipelines.

Does Databox support MongoDB private endpoint connections?

No, private endpoint connections (such as AWS PrivateLink or Azure Private Endpoint) are not supported at this time. Please ensure your MongoDB instance is accessible over the public internet from the Databox IPs you whitelist.

Still need help?

Visit our community, send us an email, or start a chat in Databox.