Connections > MongoDB V2 connection properties > Connect to MongoDB
  

Connect to MongoDB

Let's configure the MongoDB V2 connection properties to connect to MongoDB.

Before you begin

Before you configure a MongoDB V2 connection, ensure that you have a MongoDB user account with admin privileges. You also need to copy the host name of the primary node in MongoDB and keep it handy for your connection configuration.

Connection details

The following table describes the basic connection properties:
Property
Description
Connection Name
Name of the connection.
Each connection name must be unique within the organization. Connection names can contain alphanumeric characters, spaces, and the following special characters: _ . + -,
Maximum length is 255 characters.
Description
Description of the connection. Maximum length is 4000 characters.
Type
MongoDB V2
Use Secret Vault
Stores sensitive credentials for this connection in the secrets manager that is configured for your organization.
This property appears only if secrets manager is set up for your organization.
This property is not supported by Data Ingestion and Replication.
When you enable the secret vault in the connection, you can select which credentials that the Secure Agent retrieves from the secrets manager. If you don't enable this option, the credentials are stored in the repository or on a local Secure Agent, depending on how your organization is configured.
For information about how to configure and use a secrets manager, see Secrets manager configuration.
Runtime Environment
Name of the runtime environment where you want to run tasks.
Select a Secure Agent or a serverless runtime environment¹.
Host
Node name or IP address of the primary shard in the MongoDB cluster.
Service Record Lookup Enabled
Allows the connector to query the DNS to discover all the available MongoDB servers in the MongoDB cluster. You can enable this property when the host name is associated with a DNS SRV record.
With this property enabled, you do not need to specify a port, as the DNS record provides all the required details.
If you don't enable this property, manually specify the host name and port for the MongoDB server in your connection properties.
Port
MongoDB server port number.
Default is 27017.
¹ Applies only to mappings in advanced mode.

Authentication types

You can configure username and password and X.509 authentication types to access MongoDB.
Select the required authentication type and then configure the authentication-specific parameters.

Related links