Logs Collected

The logs collected for MongoDB, when utilized by the Google Stackdriver's Log-based metrics, can provide the ability to monitor all users attempting to access the database. Divulging who made the attempt, when the attempt was made, and whether the attempt was successful.

MongoDB Logs ExampleMongoDB Logs Example

MongoDB Logs Example

Supported Versions

MongoDB: 3.x, 4.0

Log Collection Setup

Follow these steps to set up log collection from MongoDB.

Pre-requisites

Locate the local MongoDB log file location.

📘

MongoDB Log Location

The MongoDB log location is set by your mongod.conf file.

For more information, click here.

Configure a MongoDB Source

  1. Install the BindPlane Log Agent on the host system.
  2. Login to BindPlane and select the Logs tab.
Logs TabLogs Tab

Logs Tab

  1. Select the Sources tab.
Sources TabSources Tab

Sources Tab

  1. In the top-right portion of the screen, click on the Add Source Configuration button
Add Source Configuration ButtonAdd Source Configuration Button

Add Source Configuration Button

  1. Choose MongoDB
  2. Fill out the MongoDB log configuration options.
MongoDB Log Configuration FormMongoDB Log Configuration Form

MongoDB Log Configuration Form