MongoDB Connection
  • 23 Jun 2022
  • 1 Minute to read
  • Dark
    Light
  • PDF

MongoDB Connection

  • Dark
    Light
  • PDF

Connection Procedure

  1. In Rivery, go to Connections - > New Connection .
  2. Search for MongoDB.
  3. Give a Name to your Connection.
  4. Set the Host , Port (Default: 27017), Authentication Database, Username, and Password.
  5. Enter Your URI.
  6. Test your credentials by pressing Test Connection.
  7. Save your connection.

image.png

URI Connection

This section describes the standard format of the MongoDB connection Uniform Resource Identifier (URI) used to connect to a MongoDB deployment: Standalone and Replica set.
For more information on configuring your URI, see the MongoDB URI Documentation.

You can set your URI Connection by selecting Edit, entering your URI, and then pressing the V icon.
Use the X option to reverse the modifications.
To reset the URI to the default form, press Reset.
image

Please Note:

  • MongoDB must be run on a Standalone or a Replica Set

    • If you're using a Replica Set, you'll need to add it in the connection URI; here's an example.
  • it's best to explicitly mention all nodes in the connection URI.

  • If you're using Log-Based with MongoDB Atlas, leave the analytics node out of the connection URI.

  • Connecting to Primary with MongoDB Atlas is supported. We'll be able to connect to the Analytics Node, but we won't be able to get any messages from it due to Atlas' implementation.


SSL (Optional)

A Secure Sockets Layer (SSL) certificate is a digital certificate that verifies identities and enables secure communication between servers.
Although the use of an SSL connection is optional, some Mongo database hosts may require an SSL certificate to validate and enable the connection.

You'll need to upload an SSL certificate, and you can use the Allow Invalid Certificate/Hostnames options to bypass hostname validation checks.

image.png


SSH (Optional)

Secure Shell Protocol (SSH) is used to provide secure and encrypted access to internal databases from Rivery servers in order to retrieve data.

Configure your SSH Tunnel server in your network to use SSH Tunneling via Rivery. This server will be able to connect to your database server via the internal IP or address, and will accept SSH connections from Rivery IPs. Rivery uses a key file to connect to the SSH server.

After you've configured SSH tunneling, you can set it up in the Rivery Connection:

image.png


Was this article helpful?