Skip to main content

Setting Up the MongoDB Tools

This guide will walk you through the steps to configure and authenticate the MongoDB tools and use them in agents. The instructions below should be followed to add the following 3 tools:

  1. MongoDB Find - to search for documents in your MongoDB collection
  2. MongoDB Aggregate - to carry out on any aggregation operations on a collection
  3. MongoDB Metadata - to retrieve schema metadata for your MongoDB database

All tools are required to properly query your MongoDB Database.

Adding and Configuring the MongoDB Find Tool

  1. Add the MongoDB Find Tool Navigate to the library and select the "MongoDB Find" tool to add it to your project.

Add MongoDB Find tool

  1. Provide your MongoDB credentials To add the MongoDB tool to your project, you will need the following details:

    • Hostname/Endpoint
    • Port (default 27017)
    • Database name
    • Basic Credentials
      • User name
      • Password

    These details can be retrieved from your MongoDB server.

  2. Provide MongoDB connection details to Tool To configure the tool, provide the values required. Your username and password should be set as a Basic authentication credential. Add MongoDB connection details

Adding and Configuring the other MongoDB tools

  1. Follow the instructions above to configure the MongoDB Aggregate tool, providing the same values to it as well. Add MongoDB Aggregate tool

  2. Similarly, find and setup the MongoDB Metadata tool. Add MongoDB Metadata tool

Now that the tools have been added, you can add it to an agent and use it to query your MongoDB Database. See these instructions on the page: [Use MongoDB tools](Using MongoDB tools in an Agent.md)

[!NOTE] Your MongoDB server must be accessible by Public IP. If you're having trouble connecting to your MongoDB server, you can reach out to us at [email protected] and we can provide you any IPs you may need to whitelist on your firewall to allow the tools to connect.