Skip to main content
Version: v4.11

Track a MongoDB cluster or node

The first step in adding Cyral to a data repository is to create an entry for it in Cyral's inventory. Here are the instructions on how to do this.

First, in the Cyral management console, navigate to the Data Repos tab and click on "Add Repository". For "Repository type" choose "MongoDB". This will open a popup. Under Repository name, give the repository a meaningful name. Then, select the correct cluster type for your deployment: Standalone, Replica set cluster, or Sharded cluster. The remaining configuration parameters depend upon the chosen cluster type, as described below.

Standalone:

For this deployment type, all you need to specify is the Hostname and Port of your database.

Replica set cluster:

For a replica set cluster, specify the number of nodes, which must match the number of nodes in your MongoDB cluster, as well as the replica set name. If your cluster supports SRV names, select SRV Record as the connection format, otherwise select the Host/Port connection format. If SRV Record is selected, you need to only provide the host name that corresponds to the cluster's DNS SRV record. For the Host/Port connection format, specify one or more hostname and port pairs.

note

SRV record names must be compliant with standards on domain names.

Sharded cluster:

For a sharded cluster, specify the number of nodes, which must match the number of nodes in your MongoDB cluster. If your cluster supports SRV names, select SRV Record as the connection format, otherwise select the Host/Port connection format. If SRV Record is selected, you need to only provide the host name that corresponds to the cluster's DNS SRV record. For the Host/Port connection format, specify one or more hostname and port pairs.

note

SRV record names must be compliant with standards on domain names.

Fincally, click "Add"

Notes

Increasing the number of nodes

If you add nodes to your MongoDB deployment, you will need to do the following:

  1. Go to the Cyral management console, go to Data repos, click on the MongoDB repo in question, click on Settings and then Edit.

  2. Under Number of nodes, increase the number so that it matches the new number of nodes in the cluster.

  3. Create a binding for the new node.

Next steps

  • If a sidecar is deployed and available (one sidecar can protect many repositories) you can bind this repository to its sidecar now.
  • If you don't already have a sidecar deployed that can serve this repository, add it now as described in the Sidecar Deployment section.