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

    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.

    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 zSeries architecture running Ubuntu 18.04 using a deb package:

    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 Ubuntu 18.X Z-Series (s390x) - 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 for IBM zSeries:

    curl -OL https://<OpsManagerHost>:<Port>/download/agent/automation/mongodb-mms-automation-agent-manager-latest.s390x.ubuntu1804.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.

    Use this procedure to enable monitoring on an application database:

    On x86_64 architecture:

    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.

    Running RHEL / CentOS 6.x using an rpm package:

    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 Amazon Linux - RPM.
    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 64-bit x86:

    curl -OL https://<OpsManagerHost>:<Port>/download/agent/automation/mongodb-mms-automation-agent-manager-latest.x86_64.rpm
    

    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

    Start the MongoDB Agent.

    Issue the following command:

    sudo service mongodb-mms-automation-agent start
    
    8

    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.

    9

    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.

    10

    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.

    11

    Confirm the Backing Databases setup.

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

    12

    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.
    13

    Install Automation Agent on each of your servers.

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

    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.

    RHEL / CentOS 7.x, SUSE12, SUSE15 or Amazon Linux 2:

    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.

    Using an rpm package:

    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 RHEL/CentOS (7.X/8.X), SUSE12, SUSE15, Amazon Linux2 - RPM.
    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 RHEL 7 for 64-bit x86:

    curl -OL https://<OpsManagerHost>:<Port>/download/agent/automation/mongodb-mms-automation-agent-manager-latest.x86_64.rhel7.rpm
    

    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

    Start the MongoDB Agent.

    Issue the following command:

    sudo service mongodb-mms-automation-agent start
    
    8

    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.

    9

    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.

    10

    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.

    11

    Confirm the Backing Databases setup.

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

    12

    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.
    13

    Install Automation Agent on each of your servers.

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

    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.

    Using a tar archive:

    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 RHEL/CentOS (7.X/8.X), SUSE12, SUSE15, Amazon Linux 2 - TAR.
    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 .

    From a system shell on the host that will run the MongoDB Agent, issue the following curl command to download the installer for RHEL for 64-bit x86:

    curl -OL https://<OpsManagerHost>:<Port>/download/agent/automation/mongodb-mms-automation-agent-manager-latest.rhel7_x86_64.tar.gz
    

    Note

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

    5

    Extract the MongoDB Agent.

    You can install the MongoDB Agent in any directory. If you want to move the archive to another directory before extracting, you may do so.

    To install the MongoDB Agent, extract the archive:

    tar -xvzf mongodb-mms-automation-agent-<VERSION>.rhel7_x86_64.tar.gz
    
    6

    Change to the extracted binary directory.

    Change into the directory that was created after extracting the MongoDB Agent binary:

    cd mongodb-mms-automation-agent-<VERSION>.rhel7_x86_64
    
    7

    Edit the MongoDB Agent configuration file.

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

    vi <install-path>/local.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 local.config file should look like the following:

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

    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 local.config file in your preferred text editor.

    vi <install-path>/local.config
    

    Add the following configuration key:

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

    Optional: Create the binary, log, and data directories.

    If you have an existing Monitoring Agent user and do not plan on activating Automation, you only need to create the log directory.

    Create the following directories to store files that the MongoDB Agent needs.

    Note

    The use of mongodb-mms-automation in the file path is a legacy artifact and does not mean that the MongoDB Agent is being installed with Automation configured.

    Component Default Directory Description
    Binaries /var/lib/mongodb-mms-automation These are the binaries that the MongoDB Agent manages. They include the MongoDB Agent, BI Connector, and MongoDB binaries.
    MongoDB Agent logs /var/log/mongodb-mms-automation These are the log files that the MongoDB Agent creates.
    MongoDB databases /data These are the databases that the MongoDB Agent creates and manages.

    Run the following commands to create the directories:

    sudo mkdir -m 755 -p /var/lib/mongodb-mms-automation
    sudo mkdir -m 755 -p /var/log/mongodb-mms-automation
    sudo mkdir -m 755 -p /data
    

    Using a Different Path than /var/lib

    By default, the Agent binaries and Ops Manager configuration backup file are located in /var/lib/mongodb-mms-automation. If you want to store these files in a different directory, follow these procedures:

    To change the location of the Agent Binaries:

    1. Click Deployment, then Agents, and then Downloads & Settings.

    2. Below the Download Directory heading, click the pencil icon to the right of the path shown in Download Directory (Linux/MacOS).

    3. Change the path to the new path you want.

    4. Click Save.

    5. Create the new directory you specified on each host that runs an Agent.

      sudo mkdir -m 755 -p /<newPath>
      

    To change the location of the Agent configuration backup:

    1. Open the Agent configuration file in your preferred text editor.

    2. Change the mmsConfigBackup setting to the new path for the configuration backup file.

      mmsConfigBackup=/<newPath>/mms-cluster-config-backup.json
      
    3. Save the Agent configuration file.

    4. Move the configuration backup file to the new directory.

      sudo mv /var/lib/mongodb-mms-automation/mms-cluster-config-backup.json /<newPath>
      
    10

    Assign permissions to the system user that runs the MongoDB Agent.

    Run the following commands:

    # Create mongodb user and group if they do not exist
    
    if ! sudo /usr/bin/id -g mongodb &>/dev/null; then
      sudo /usr/sbin/groupadd -r mongodb
    fi
    
    # Create mongodb user if they do not exist and assign
    # them to the mongodb group
    
    if ! sudo /usr/bin/id mongodb &>/dev/null; then
      sudo /usr/sbin/useradd -M -r -g mongodb \
        -d /var/lib/mongo -s /bin/false \
        -c mongodb mongodb > /dev/null 2>&1
    fi
    
    # Grant the mongodb:mongodb user and group permissions
    # to manage deployments.
    
    sudo chown mongodb:mongodb /var/lib/mongodb-mms-automation
    sudo chown mongodb:mongodb /var/log/mongodb-mms-automation
    sudo chown mongodb:mongodb /data
    
    11

    Start the MongoDB Agent.

    From the directory in which you installed the MongoDB Agent and as the system user you created in the last step, issue the following command:

    nohup ./mongodb-mms-automation-agent \
      --config=local.config \
      >> /var/log/mongodb-mms-automation/automation-agent-fatal.log 2>&1 &
    
    12

    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.

    13

    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.

    14

    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.

    15

    Confirm the Backing Databases setup.

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

    16

    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.
    17

    Install Automation Agent on each of your servers.

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

    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.

    On RHEL / CentOS (7.x) on PowerPC architecture (managing MongoDB 3.4 or later deployments):

    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.

    Using an rpm package:

    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 RHEL/CentOS (7.X/8.X), SUSE12, SUSE15, Amazon Linux2 - RPM.
    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 RHEL 7 for PowerPC:

    curl -OL https://<OpsManagerHost>:<Port>/download/agent/automation/mongodb-mms-automation-agent-manager-latest.ppc641e.rhel7.rpm
    

    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

    Start the MongoDB Agent.

    Issue the following command:

    sudo service mongodb-mms-automation-agent start
    
    8

    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.

    9

    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.

    10

    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.

    11

    Confirm the Backing Databases setup.

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

    12

    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.
    13

    Install Automation Agent on each of your servers.

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

    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.

    Using a tar archive:

    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 RHEL/CentOS (7.X) Power (ppc64le) - TAR.
    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 RHEL 7 for PowerPC:

    curl -OL https://<OpsManagerHost>:<Port>/download/agent/automation/mongodb-mms-automation-agent-manager-latest.rhel7_ppc64le.tar.gz
    

    Note

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

    5

    Extract the MongoDB Agent.

    You can install the MongoDB Agent in any directory. If you want to move the archive to another directory before extracting, you may do so.

    To install the MongoDB Agent, extract the archive:

    tar -xvzf mongodb-mms-automation-agent-<VERSION>.rhel7_ppc64le.tar.gz
    
    6

    Change to the extracted binary directory.

    Change into the directory that was created after extracting the MongoDB Agent binary:

    cd mongodb-mms-automation-agent-<VERSION>.rhel7_ppc64le
    
    7

    Edit the MongoDB Agent configuration file.

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

    vi <install-path>/local.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 local.config file should look like the following:

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

    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 local.config file in your preferred text editor.

    vi <install-path>/local.config
    

    Add the following configuration key:

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

    Optional: Create the binary, log, and data directories.

    If you have an existing Monitoring Agent user and do not plan on activating Automation, you only need to create the log directory.

    Create the following directories to store files that the MongoDB Agent needs.

    Note

    The use of mongodb-mms-automation in the file path is a legacy artifact and does not mean that the MongoDB Agent is being installed with Automation configured.

    Component Default Directory Description
    Binaries /var/lib/mongodb-mms-automation These are the binaries that the MongoDB Agent manages. They include the MongoDB Agent, BI Connector, and MongoDB binaries.
    MongoDB Agent logs /var/log/mongodb-mms-automation These are the log files that the MongoDB Agent creates.
    MongoDB databases /data These are the databases that the MongoDB Agent creates and manages.

    Run the following commands to create the directories:

    sudo mkdir -m 755 -p /var/lib/mongodb-mms-automation
    sudo mkdir -m 755 -p /var/log/mongodb-mms-automation
    sudo mkdir -m 755 -p /data
    

    Using a Different Path than /var/lib

    By default, the Agent binaries and Ops Manager configuration backup file are located in /var/lib/mongodb-mms-automation. If you want to store these files in a different directory, follow these procedures:

    To change the location of the Agent Binaries:

    1. Click Deployment, then Agents, and then Downloads & Settings.

    2. Below the Download Directory heading, click the pencil icon to the right of the path shown in Download Directory (Linux/MacOS).

    3. Change the path to the new path you want.

    4. Click Save.

    5. Create the new directory you specified on each host that runs an Agent.

      sudo mkdir -m 755 -p /<newPath>
      

    To change the location of the Agent configuration backup:

    1. Open the Agent configuration file in your preferred text editor.

    2. Change the mmsConfigBackup setting to the new path for the configuration backup file.

      mmsConfigBackup=/<newPath>/mms-cluster-config-backup.json
      
    3. Save the Agent configuration file.

    4. Move the configuration backup file to the new directory.

      sudo mv /var/lib/mongodb-mms-automation/mms-cluster-config-backup.json /<newPath>
      
    10

    Assign permissions to the system user that runs the MongoDB Agent.

    Run the following commands:

    # Create mongodb user and group if they do not exist
    
    if ! sudo /usr/bin/id -g mongodb &>/dev/null; then
      sudo /usr/sbin/groupadd -r mongodb
    fi
    
    # Create mongodb user if they do not exist and assign
    # them to the mongodb group
    
    if ! sudo /usr/bin/id mongodb &>/dev/null; then
      sudo /usr/sbin/useradd -M -r -g mongodb \
        -d /var/lib/mongo -s /bin/false \
        -c mongodb mongodb > /dev/null 2>&1
    fi
    
    # Grant the mongodb:mongodb user and group permissions
    # to manage deployments.
    
    sudo chown mongodb:mongodb /var/lib/mongodb-mms-automation
    sudo chown mongodb:mongodb /var/log/mongodb-mms-automation
    sudo chown mongodb:mongodb /data
    
    11

    Start the MongoDB Agent.

    From the directory in which you installed the MongoDB Agent and as the system user you created in the last step, issue the following command:

    nohup ./mongodb-mms-automation-agent \
      --config=local.config \
      >> /var/log/mongodb-mms-automation/automation-agent-fatal.log 2>&1 &
    
    12

    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.

    13

    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.

    14

    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.

    15

    Confirm the Backing Databases setup.

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

    16

    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.
    17

    Install Automation Agent on each of your servers.

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

    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.

    On zSeries architecture (managing MongoDB 3.4 or later deployments):

    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.

    Running RHEL / CentOS 6.x using the rpm package manager:

    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 Amazon Linux - RPM.
    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 RHEL 6 for IBM zSeries:

    curl -OL https://<OpsManagerHost>:<Port>/download/agent/automation/mongodb-mms-automation-agent-manager-latest.s390x.rhel6.rpm
    

    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

    Start the MongoDB Agent.

    Issue the following command:

    sudo service mongodb-mms-automation-agent start
    
    8

    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.

    9

    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.

    10

    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.

    11

    Confirm the Backing Databases setup.

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

    12

    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.
    13

    Install Automation Agent on each of your servers.

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

    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.

    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.

    Running RHEL / CentOS 7.x using the rpm package manager:

    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 RHEL 7.X Z-Series (s390x) - RPM.
    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 RHEL 7 for IBM zSeries:

    curl -OL https://<OpsManagerHost>:<Port>/download/agent/automation/mongodb-mms-automation-agent-manager-latest.s390x.rhel7.rpm
    

    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

    Start the MongoDB Agent.

    Issue the following command:

    sudo service mongodb-mms-automation-agent start
    
    8

    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.

    9

    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.

    10

    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.

    11

    Confirm the Backing Databases setup.

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

    12

    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.
    13

    Install Automation Agent on each of your servers.

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

    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.

    Use this procedure to install enable monitoring on an application database on Linux systems that do not use deb or rpm packages.

    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 Other Linux - TAR.
    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 Generic 64-bit Linux:

    curl -OL https://<OpsManagerHost>:<Port>/download/agent/automation/mongodb-mms-automation-agent-manager-latest.linux_x86_64.tar.gz
    

    Note

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

    5

    Extract the MongoDB Agent.

    You can install the MongoDB Agent in any directory. If you want to move the archive to another directory before extracting, you may do so.

    To install the MongoDB Agent, extract the archive:

    tar -xvzf mongodb-mms-automation-agent-<VERSION>.linux_x86_64.tar.gz
    
    6

    Change to the extracted binary directory.

    Change into the directory that was created after extracting the MongoDB Agent binary:

    cd mongodb-mms-automation-agent-<VERSION>.linux_x86_64
    
    7

    Edit the MongoDB Agent configuration file.

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

    vi <install-path>/local.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 local.config file should look like the following:

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

    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 local.config file in your preferred text editor.

    vi <install-path>/local.config
    

    Add the following configuration key:

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

    Optional: Create the binary, log, and data directories.

    If you have an existing Monitoring Agent user and do not plan on activating Automation, you only need to create the log directory.

    Create the following directories to store files that the MongoDB Agent needs.

    Note

    The use of mongodb-mms-automation in the file path is a legacy artifact and does not mean that the MongoDB Agent is being installed with Automation configured.

    Component Default Directory Description
    Binaries /var/lib/mongodb-mms-automation These are the binaries that the MongoDB Agent manages. They include the MongoDB Agent, BI Connector, and MongoDB binaries.
    MongoDB Agent logs /var/log/mongodb-mms-automation These are the log files that the MongoDB Agent creates.
    MongoDB databases /data These are the databases that the MongoDB Agent creates and manages.

    Run the following commands to create the directories:

    sudo mkdir -m 755 -p /var/lib/mongodb-mms-automation
    sudo mkdir -m 755 -p /var/log/mongodb-mms-automation
    sudo mkdir -m 755 -p /data
    

    Using a Different Path than /var/lib

    By default, the Agent binaries and Ops Manager configuration backup file are located in /var/lib/mongodb-mms-automation. If you want to store these files in a different directory, follow these procedures:

    To change the location of the Agent Binaries:

    1. Click Deployment, then Agents, and then Downloads & Settings.

    2. Below the Download Directory heading, click the pencil icon to the right of the path shown in Download Directory (Linux/MacOS).

    3. Change the path to the new path you want.

    4. Click Save.

    5. Create the new directory you specified on each host that runs an Agent.

      sudo mkdir -m 755 -p /<newPath>
      

    To change the location of the Agent configuration backup:

    1. Open the Agent configuration file in your preferred text editor.

    2. Change the mmsConfigBackup setting to the new path for the configuration backup file.

      mmsConfigBackup=/<newPath>/mms-cluster-config-backup.json
      
    3. Save the Agent configuration file.

    4. Move the configuration backup file to the new directory.

      sudo mv /var/lib/mongodb-mms-automation/mms-cluster-config-backup.json /<newPath>
      
    10

    Assign permissions to the system user that runs the MongoDB Agent.

    Run the following commands:

    # Create mongodb user and group if they do not exist
    
    if ! sudo /usr/bin/id -g mongodb &>/dev/null; then
      sudo /usr/sbin/groupadd -r mongodb
    fi
    
    # Create mongodb user if they do not exist and assign
    # them to the mongodb group
    
    if ! sudo /usr/bin/id mongodb &>/dev/null; then
      sudo /usr/sbin/useradd -M -r -g mongodb \
        -d /var/lib/mongo -s /bin/false \
        -c mongodb mongodb > /dev/null 2>&1
    fi
    
    # Grant the mongodb:mongodb user and group permissions
    # to manage deployments.
    
    sudo chown mongodb:mongodb /var/lib/mongodb-mms-automation
    sudo chown mongodb:mongodb /var/log/mongodb-mms-automation
    sudo chown mongodb:mongodb /data
    
    11

    Start the MongoDB Agent.

    From the directory in which you installed the MongoDB Agent and as the system user you created in the last step, issue the following command:

    nohup ./mongodb-mms-automation-agent \
      --config=local.config \
      >> /var/log/mongodb-mms-automation/automation-agent-fatal.log 2>&1 &
    
    12

    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.

    13

    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.

    14

    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.

    15

    Confirm the Backing Databases setup.

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

    16

    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.
    17

    Install Automation Agent on each of your servers.

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

    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.