Documentation

MongoDB Setup

Start by setting up your MongoDB OpLog so that Alooma can use it to update your data destination, and then configuring OpLog to retain data for at least 4 days.

Note

Alooma supports MongoDB version 2.6 and higher.

Verify that your MongoDB cluster is writing to an OpLog by logging into your MongoDB cluster and typing db.getReplicationInfo(). If it is, the log’s size, latest event timestamp, and so on are displayed and you can skip to Connecting to MongoDB.

Otherwise, an error message is displayed, and you’ll need to set it up:

You'll need to create a role and add permissions to read the databases/collections to the user you'll use for accessing your MongoDB via Alooma. You can create a new user or use an existing user and add the role to the user. For MongoDB versions prior to 3.2.17: Use the following script to create an Alooma user with permission to read the database and its OpLog, This script needs to be executed on the Mongo admin database and you will need to fill in the correct value for db: '' and also specify a value for the password:

For MongoDB versions 3.2.17 and above, use the following script to create a new user and set permissions. This script needs to be executed on the Mongo admin database and you will need to fill in the correct values for db: '' and collection: '' and also specify a value for the password:

If you already have a user, you can set the permissions for the "alooma" role like this, substituting the values for <additional DB> and/or <additional collection>, and then make sure the "alooma" role is added to your user: