Navigation
This version of the documentation is archived and no longer supported. To learn how to upgrade your version of MongoDB Ops Manager, refer to the upgrade documentation.
You were redirected from a different version of the documentation. Click here to go back.

Enable Application Database Monitoring

On this page

  • Ubuntu/Debian
  • RHEL/CentOS/SLES/AMZ
  • Linux

Prerequisites

To enable application database monitoring, including dbStats and database profiling information, the database account connecting to AppDB must authenticate as a user with the following minimum role:

Required Role Database
clusterMonitor admin

Use this procedure to enable monitoring on an application database:

Important

Starting with version 11.0.5.6967-1, when you install the MongoDB Agent using deb or rpm packages, the package doesn’t add MongoDB binaries to the PATH environment variable.

If your deployment depends on the presence of MongoDB binaries in the PATH, you must manually add the paths to MongoDB binaries to the PATH. To learn how to update environment variables, refer to your operating system’s documentation.

On x86_64 architecture running Debian 8, Debian 9, Ubuntu 18.04, or Ubuntu 20.04:

1

Log in to the Ops Manager Application.

2

Enable Application Database Monitoring.

To enable application database monitoring:

  1. Click the Admin link in the upper-right corner of the Ops Manager console.
  2. Click Enable from either:
    1. The banner introducing the monitoring capability or
    2. The Enable Monitoring setting.
3

Install the MongoDB Agent.

  1. Click View Agent Install Instructions. The Install Agent Instructions modal opens.
  2. From the Select Your Server’s Operating System menu, select Debian 8/9/10/11, Ubuntu 16.X/18.X/20.x - DEB.
  3. Click Next. The Install New MongoDB Agent modal opens.
4

Download the latest version of the MongoDB Agent.

Note

Starting with this step, follow the MongoDB Agent installation modal and copy the commands provided into the Linux shell.

From a system shell on the host that will run the MongoDB Agent, issue the following curl command to download the installer for Ubuntu 18.04/20.04 or Debian 9/10 for 64-bit x86:

curl -OL https://<OpsManagerHost>:<Port>/download/agent/automation/mongodb-mms-automation-agent-manager-latest.amd64.ubuntu1604.deb

Note

Replace <OpsManagerHost>:<Port> with the hostname and port of your Ops Manager Application.

5

Edit the MongoDB Agent configuration file.

In the directory where you installed the MongoDB Agent, open the automation-agent.config file in your preferred text editor:

sudo vi /etc/mongodb-mms/automation-agent.config

Update the following configuration options:

Key Value
mmsGroupId ProjectID of your project.
mmsApiKey
Agent API key of your
project.
mmsBaseUrl URL (hostname and port) of the Ops Manager Application.

The resulting changes to the automation-agent.config file should look like the following:

mmsGroupId=<Project ID>
mmsApiKey=<agent API key>
mmsBaseUrl=<application URL>
6

Optional: Configure the MongoDB Agent to use a proxy server.

To configure the MongoDB Agent to connect to Ops Manager via a proxy server, you must specify the server in the httpProxy environment variable.

In the directory where you installed the MongoDB Agent, open the automation-agent.config file in your preferred text editor.

sudo vi /etc/mongodb-mms/automation-agent.config

Add the following configuration key:

Key Value
httpProxy URL (hostname and port) of to your proxy server.
7

Prepare the data directory.

The data directory stores MongoDB data. For an existing MongoDB deployment, ensure that the directory is owned by the mongodb user. If no MongoDB deployment exists, create the directory and set the owner.

To create a data directory and set the owner as the mongodb user:

sudo mkdir -p /data; sudo chown mongodb:mongodb /data
8

Start the MongoDB Agent.

Issue the following command:

sudo systemctl start mongodb-mms-automation-agent.service
9

Verify that the MongoDB Agent is running.

In the Install Agent Instructions modal, wait for each deployment to show Verified in the Install the MongoDB Agent step.

Click Continue.

10

Enable monitoring of the Backing Databases.

In the Set Up Ops Manager Monitoring modal, wait for the agent to show Monitoring as enabled.

Click Continue.

11

Provide the Connection Details for the Backing Databases.

Complete the following fields:

Hostname Provide the hostname of the host that serves the backing database.
Port Provide the port of the backing database.
Enable Authentication Toggle this to enable authentication.
Use TLS/SSL Toggle to enable TLS.

After Ops Manager displays Deployment found, click Continue.

12

Confirm the Backing Databases setup.

Ops Manager displays the host serving the backing databases and the running agent. Click Continue.

13

Enable operational monitoring for the Application Database.

Operational monitoring allows you to track CPU, memory, and disk capacity of the Application Database servers and set up alert notification when a specified alert condition occurs.

To disable operational monitoring, click No, Just Monitor.

To enable operational monitoring:

  1. Review the requirements to add Automation in read-only mode for operational monitoring on each server in your deployment.
  2. Select the checkbox to confirm that you have read the requirements and risks listed in the page.
  3. Click Continue.
14

Install Automation Agent on each of your servers.

  1. Select Automation from the Install Agent dropdown list.
  2. Click Initialize Automation.
15

Review and confirm your deployment for operational monitoring.

The MongoDB Agent gathers detailed information about the MongoDB processes for operational monitoring.

  1. To review the information gathered by the MongoDB Agent, click Review Deployment.
  2. Review the settings in the AppDB: Review Your Changes modal and click Confirm & Deploy.

Note

If you can’t view monitoring data, verify that at least one host has monitoring enabled.

Was this page helpful?