top of page
  • Brock Peterson

Send MongoDB Logs to Aria Operations for Logs

Want to send MongoDB logs to Aria Operations for logs? We can do it! In fact, we have a Content Pack for you.

Go to Content Packs - Marketplace - MongdoDB Database and install the Content Pack. Once installed you'll be given Setup Instructions.

Generally, Content Packs are packages of Dashboards, Queries, Alerts, Agent Groups, and Extracted Fields. We have to get the logs into Aria Operations for Logs, in this case we'll do that via Agents on the VMs hosting MongoDB. Let's explore the Setup Instructions in more detail.

First step is to install the Agent on the MongoDB VMs. We can do that via Management - Agents.

Select the Downlod link which gives four options.

I downloaded the Linux BIN, uploaded to my target VMs and ran it. The binary is self-aware, so once the agents started they logged into my Operations for Logs Cluster.

Step 2 of the instructions was to: Configure the mongodb.conf and mongod.conf to enable the desired verbosity level. More information on the confutation files here: I'm running MongoDB v4.4.25 on one VM and v7.0.2 on the other. Neither of them have mongodb.conf files, just mongod.conf files, let's configure them. I adjusted my mongod.conf files to be pretty chatty (verbosity: 5) as described here.

root@mongodb-70-c:/etc# cat mongod.conf
# mongod.conf

# for documentation of all options, see:

# Where and how to store data.
  dbPath: /var/lib/mongodb
#  engine:
#  wiredTiger:

# where to write logging data.
  verbosity: 5
  destination: file
  logAppend: true
  path: /var/log/mongodb/mongod.log

# network interfaces
  port: 27017
    mode: requireTLS
    certificateKeyFile: /etc/ssl/
    CAFile: /etc/ssl/vaultca.pem

# how the process runs
  timeZoneInfo: /usr/share/zoneinfo

I adjusted the MongoDB Agent Group to include these new VMs.

You'll notice these logs are also getting tagged with PRODUCT=MONGODB and PRODUCT_SUBTYPE=44+ upon ingestion. Here they are!

We now have visibility into MongoDB logs, we can control their verbosity, make Alerts on them, and more. Aria Operations for Logs Agents are powerful, use them!


bottom of page