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:https://docs.mongodb.com/manual/reference/configuration-options/. 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:
# http://docs.mongodb.org/manual/reference/configuration-options/
# Where and how to store data.
storage:
dbPath: /var/lib/mongodb
# engine:
# wiredTiger:
# where to write logging data.
systemLog:
verbosity: 5
destination: file
logAppend: true
path: /var/log/mongodb/mongod.log
# network interfaces
net:
port: 27017
bindIp: 127.0.0.1
tls:
mode: requireTLS
certificateKeyFile: /etc/ssl/mongodb-70-c.tvs.vmware.com.pem
CAFile: /etc/ssl/vaultca.pem
# how the process runs
processManagement:
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!
Comments