Navigation

Install the MongoDB Agent to Manage Deployments

    You have a project and want to install the MongoDB Agent to manage your MongoDB deployments. You can also monitor and back up your MongoDB deployments following this workflow.

    Review the Prerequisites First

    Please review the MongoDB Agent Prerequisites before installing the MongoDB Agent.

    Use this procedure to install the MongoDB Agent on x86_64 architecture running Microsoft Windows:

    1

    Log in to the Ops Manager Application.

    2

    Begin or Manage a Deployment.

    Your project has with no deployments and you see a prompt to get started.

    1. From the Build New Deployment menu, select the type of deployment you wish to add:

    2. If, on the Create New <Deployment> page, Ops Manager cannot detect any hosts with the MongoDB Agent installed, you see a banner displayed at the top of the Create New <Deployment> page.

      Click the see instructions link.

    3. From the Select Your Server’s Operating System menu, click Windows - MSI.

    4. Click Next.

    1. Click Manage your existing deployment.
    2. From the Install Agent menu, click Windows - MSI.
    3

    Download the MongoDB Agent.

    The MongoDB Agent Installation Instructions box displays the following information:

    • Base URL

      (Required for either binding to a project or adding the host to a server pool)

      Server Pools deprecated as of Ops Manager 4.0

      As of Ops Manager 4.0, server pools are deprecated and disabled by default.

    • Project ID (Required for binding to a project)

    • API Key

      If you do not have an API Key, click plus icon Generate Key.

    Some or all of these values are required in a later step. Copy these values then store them where you can access them later.

    4

    Install the MongoDB Agent.

    1. After the MSI downloads, double-click:

      mongodb-mms-automation-agent-10.2.7.5898.windows_x86_64.msi

    2. If a security warning appears, click Run.

    3. At the Configuration/Log Folder step

      Provide the directory into which these files are saved.

    4. At the Key Type step, select:

      • Agent API Key to bind to a specific project or
      • Server Pool Key to add the host to a server pool.
    5. Enter the appropriate agent keys.

      Note

      These keys are provided in the MongoDB Agent Installation Instructions modal described in the previous step.

      If you selected Agent API Key, type the:

      • Base URL
      • Project ID
      • Agent API Key

      If you selected Server Pool Key, type the:

      • Base URL
      • Project ID
      • Server Pool Key.

      To find the server pool key, in the Admin menu, go to Server Pool view and click on the Agent Configuration tab.

    6. At the MongoDB Paths step, specify the Log and Backup directories

    7. At the Windows Firewall Configuration step, click your preferred firewall configuration.

      If you click Configure firewall rules allowing access from only the specified |ipaddr| addresses., type the necessary IPv4 addresses into the provided box.

    8. (Conditional) Windows enables Stealth Mode for the Windows Firewall by default. If you have not disabled it on the MongoDB host on which you are installing the MongoDB Agent, you are asked to disable it. Stealth Mode significantly degrades the performance and capability of the MongoDB Agent. Click Disable Stealth Mode.

    9. (Conditional) Windows does not enable Disk Performance Counters by default. If you have not enabled Disk Performance Counters for the MongoDB host, click Enable Disk Performance Counters. The MongoDB Agent uses these counters for some of its hardware monitoring activities.

    10. Click Install.

    11. Click Finish once setup is complete.

    After the MSI downloads, you can run an unattended install. You run an unattended install from the command line in either the command interpreter or PowerShell. To learn more about unattended installs, see Microsoft’s documentation on Standard Installer Command-Line Options

    To run the MSI installer unattended from the command line, you invoke msiexec.exe with the /q and /i flags and a combination of required and optional parameters:

    Parameter Necessity Value
    MMSAPIKEY Required Agent API key of your Ops Manager project.
    MMSBASEURL Required URL of the Ops Manager host.
    MMSGROUPID Required Unique Identifier of your Ops Manager project.
    CONFIGLOGDIR Optional Absolute file path to which Ops Manager should write the MongoDB Agent configuration file.
    LOGFILE Optional Absolute file path to which Ops Manager should write the MongoDB Agent log
    MMSCONFIGBACKUP Optional Absolute file path to the Ops Manager automation configuration backup JSON file.

    Example

    To install the MongoDB Agent unattended, you would invoke msiexec.exe with the following options:

    msiexec.exe /q /i "C:\PATH\TO\mongodb-mms-automation-agent-<VERSION>.windows_x86_64.msi" MMSGROUPID=<GROUP.ID> MMSAPIKEY=<AGENT.API.ID> MMSBASEURL="<http://opsmanager.example.com:8080>" LOGFILE="C:\MMSData\Server\Log\automation-agent.log" MMSCONFIGBACKUP="C:\MMSData\MongoDB\mms-cluster-config-backup.json"
    
    5

    Finish the installation of the MongoDB Agent.

    In the Install Agent Instructions modal:

    1. Click Verify Agent to make sure the MongoDB Agent can connect to Ops Manager.
    2. Click Done.
    6

    (Optional) Change the location of the MongoDB Agent binaries and configuration backup files.

    By default, the MongoDB binaries and Ops Manager configuration backup file are located in %SystemDrive%\MMSMongoDB\versions.

    Note

    Windows sets the %SystemDrive% environment variable to the drive on which you installed Windows. By default, you would be directed to install Windows on the C: drive. To find your %SystemDrive%, issue with following command from PowerShell:

    get-childitem env:SystemDrive
    

    If you want to store these files in a different directory, follow these procedures:

    To change the location of the MongoDB Agent Binaries

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

    2. Below the Download Directory heading, click edit icon to the right of the path shown in Download Directory (Windows).

    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 MongoDB Agent. Use Windows Explorer to move the file or issue the following command from a Command Prompt or PowerShell:

      md \<newPath>
      

      Important

      Make sure the system user that runs the MongoDB Agent can write to this new directory. This is usually the SYSTEM user, which requires no additional configuration unless you changed the user.

    To change the location of the MongoDB Agent configuration backup

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

    2. Change the mmsConfigBackup setting to the new path for the configuration backup file. Replace X with the drive letter on which your backup is stored.

      mmsConfigBackup=X:\<newPath>\mms-cluster-config-backup.json
      
    3. Save the MongoDB Agent configuration file.

    4. Move the configuration backup file to the new directory. Use Windows Explorer to move the file or issue the following command from a Command Prompt or PowerShell:

      move %SystemDrive%\MMSMongoDB\versions\mms-cluster-config-backup.json \<newPath>
      
    7

    Repeat the installation procedure for each MongoDB host.

    Use this procedure to install the MongoDB Agent on x86_64 architecture running macOS 10.8 or later:

    1

    Log in to the Ops Manager Application.

    2

    Begin or Manage a Deployment.

    Your project has with no deployments and you see a prompt to get started.

    1. From the Build New Deployment menu, select the type of deployment you wish to add:

    2. If, on the Create New <Deployment> page, Ops Manager cannot detect any hosts with the MongoDB Agent installed, you see a banner displayed at the top of the Create New <Deployment> page.

      Click the see instructions link.

    3. From the Select Your Server’s Operating System menu, click Mac OSX (10.8 and above) - TAR.

    4. Click Next.

    1. Click Manage your existing deployment.
    2. From the Install Agent menu, click Mac OSX (10.8 and above) - TAR.
    3

    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 macOS Terminal.

    From a system shell on the host that will run the MongoDB Agent, issue the following curl command to download the installer for macOS:

    curl -OL https://<OpsManagerHost>:<Port>/download/agent/automation/mongodb-mms-automation-agent-10.2.7.5898.osx_x86_64.tar.gz
    

    Note

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

    4

    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-10.5.0.5938-1.osx_x86_64.tar.gz
    
    5

    Change to the extracted binary directory.

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

    cd mongodb-mms-automation-agent-10.2.7.5898.osx_x86_64
    
    6

    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
    

    The changes you make depend whether or not you are using server pools.

    Update the following configuration keys:

    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>
    

    Important

    Do not configure the Server Pool settings:

    Server Pools deprecated as of Ops Manager 4.0

    As of Ops Manager 4.0, server pools are deprecated and disabled by default.

    Update the following configuration keys:

    Key Value
    mmsBaseUrl URL (hostname and port) of the Ops Manager Application.
    serverPoolKey

    Server Pool Key.

    To find the server pool key, in the Admin menu, go to Server Pool view and click on the Agent Configuration tab.

    serverPoolPropertiesFile

    Absolute filepath of a file that contains server properties. Ensure the MongoDB Agent can read the file.

    The properties file contains key/value pairs of the form <property>=<value>. The Ops Manager Administrator decides on both the property names and values.

    Note

    Ensure that the properties file contains the desired property names and values before starting the Automation on the server.

    Once the server is registered with the pool, changes to the properties file do not take effect until the server is first removed and the Automation restarted.

    serverPoolStateFile

    Absolute filepath of the file to be used by the MongoDB Agent.

    Ensure that the directory path to the file exists and the agent has read and write access to the directory. The file itself need not exist; however, if it does exist, the agent must have read and write access to the file.

    The resulting changes to the local.config file should look like the following:

    mmsBaseUrl=<application URL>
    serverPoolKey=somekeyabc123
    serverPoolPropertiesFile=<path to server properties file>
    serverPoolStateFile=<path to server state file>
    

    Important

    Do not configure the Project settings:

    7

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

    Create the binary, log, and data directories.

    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>
      
    9

    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
    
    10

    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 &
    
    11

    Finish the installation of the MongoDB Agent.

    In the Install Agent Instructions modal:

    1. Click Verify Agent to make sure the MongoDB Agent can connect to Ops Manager.
    2. Click Done.
    12

    Repeat the installation procedure for each MongoDB host.

    Use this procedure to install Linux systems that do not use deb or rpm packages.

    1

    Log in to the Ops Manager Application.

    2

    Begin or Manage a Deployment.

    Your project has with no deployments and you see a prompt to get started.

    1. From the Build New Deployment menu, select the type of deployment you wish to add:

    2. If, on the Create New <Deployment> page, Ops Manager cannot detect any hosts with the MongoDB Agent installed, you see a banner displayed at the top of the Create New <Deployment> page.

      Click the see instructions link.

    3. From the Select Your Server’s Operating System menu, click Other Linux - TAR.

    4. Click Next.

    1. Click Manage your existing deployment.
    2. From the Install Agent menu, click Other Linux - TAR.
    3

    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-10.2.7.5898.linux_x86_64.tar.gz
    

    Note

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

    4

    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-10.5.0.5938-1.linux_x86_64.tar.gz
    
    5

    Change to the extracted binary directory.

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

    cd mongodb-mms-automation-agent-10.2.7.5898.linux_x86_64
    
    6

    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
    

    The changes you make depend whether or not you are using server pools.

    Update the following configuration keys:

    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>
    

    Important

    Do not configure the Server Pool settings:

    Server Pools deprecated as of Ops Manager 4.0

    As of Ops Manager 4.0, server pools are deprecated and disabled by default.

    Update the following configuration keys:

    Key Value
    mmsBaseUrl URL (hostname and port) of the Ops Manager Application.
    serverPoolKey

    Server Pool Key.

    To find the server pool key, in the Admin menu, go to Server Pool view and click on the Agent Configuration tab.

    serverPoolPropertiesFile

    Absolute filepath of a file that contains server properties. Ensure the MongoDB Agent can read the file.

    The properties file contains key/value pairs of the form <property>=<value>. The Ops Manager Administrator decides on both the property names and values.

    Note

    Ensure that the properties file contains the desired property names and values before starting the Automation on the server.

    Once the server is registered with the pool, changes to the properties file do not take effect until the server is first removed and the Automation restarted.

    serverPoolStateFile

    Absolute filepath of the file to be used by the MongoDB Agent.

    Ensure that the directory path to the file exists and the agent has read and write access to the directory. The file itself need not exist; however, if it does exist, the agent must have read and write access to the file.

    The resulting changes to the local.config file should look like the following:

    mmsBaseUrl=<application URL>
    serverPoolKey=somekeyabc123
    serverPoolPropertiesFile=<path to server properties file>
    serverPoolStateFile=<path to server state file>
    

    Important

    Do not configure the Project settings:

    7

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

    Create the binary, log, and data directories.

    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>
      
    9

    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
    
    10

    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 &
    
    11

    Finish the installation of the MongoDB Agent.

    In the Install Agent Instructions modal:

    1. Click Verify Agent to make sure the MongoDB Agent can connect to Ops Manager.
    2. Click Done.
    12

    Repeat the installation procedure for each MongoDB host.

    Use this procedure to install the MongoDB Agent:

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

    1

    Log in to the Ops Manager Application.

    2

    Begin or Manage a Deployment.

    Your project has with no deployments and you see a prompt to get started.

    1. From the Build New Deployment menu, select the type of deployment you wish to add:

    2. If, on the Create New <Deployment> page, Ops Manager cannot detect any hosts with the MongoDB Agent installed, you see a banner displayed at the top of the Create New <Deployment> page.

      Click the see instructions link.

    3. From the Select Your Server’s Operating System menu, click Debian 8/9, Ubuntu 16.X/18.X - DEB.

    4. Click Next.

    1. Click Manage your existing deployment.
    2. From the Install Agent menu, click Debian 8/9, Ubuntu 16.X/18.X - DEB.
    3

    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 16.04/18.04 or Debian 8/9 for 64-bit x86:

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

    Note

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

    4

    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
    

    The changes you make depend whether or not you are using server pools.

    Update the following configuration keys:

    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>
    

    Important

    Do not configure the Server Pool settings:

    Server Pools deprecated as of Ops Manager 4.0

    As of Ops Manager 4.0, server pools are deprecated and disabled by default.

    Update the following configuration keys:

    Key Value
    mmsBaseUrl URL (hostname and port) of the Ops Manager Application.
    serverPoolKey

    Server Pool Key.

    To find the server pool key, in the Admin menu, go to Server Pool view and click on the Agent Configuration tab.

    serverPoolPropertiesFile

    Absolute filepath of a file that contains server properties. Ensure the MongoDB Agent can read the file.

    The properties file contains key/value pairs of the form <property>=<value>. The Ops Manager Administrator decides on both the property names and values.

    Note

    Ensure that the properties file contains the desired property names and values before starting the Automation on the server.

    Once the server is registered with the pool, changes to the properties file do not take effect until the server is first removed and the Automation restarted.

    serverPoolStateFile

    Absolute filepath of the file to be used by the MongoDB Agent.

    Ensure that the directory path to the file exists and the agent has read and write access to the directory. The file itself need not exist; however, if it does exist, the agent must have read and write access to the file.

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

    mmsBaseUrl=<application URL>
    serverPoolKey=somekeyabc123
    serverPoolPropertiesFile=<path to server properties file>
    serverPoolStateFile=<path to server state file>
    

    Important

    Do not configure the Project settings:

    5

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

    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
    
    7

    Start the MongoDB Agent.

    Issue the following command:

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

    Finish the installation of the MongoDB Agent.

    In the Install Agent Instructions modal:

    1. Click Verify Agent to make sure the MongoDB Agent can connect to Ops Manager.
    2. Click Done.
    9

    Repeat the installation procedure for each MongoDB host.

    On PowerPC architecture running Ubuntu 16.x (managing MongoDB 3.4 or later deployments only):

    Using a deb package:

    1

    Log in to the Ops Manager Application.

    2

    Begin or Manage a Deployment.

    Your project has with no deployments and you see a prompt to get started.

    1. From the Build New Deployment menu, select the type of deployment you wish to add:

    2. If, on the Create New <Deployment> page, Ops Manager cannot detect any hosts with the MongoDB Agent installed, you see a banner displayed at the top of the Create New <Deployment> page.

      Click the see instructions link.

    3. From the Select Your Server’s Operating System menu, click Ubuntu 16.X Power (ppc64le) - DEB.

    4. Click Next.

    1. Click Manage your existing deployment.
    2. From the Install Agent menu, click Ubuntu 16.X Power (ppc64le) - DEB.
    3

    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 16.04:

    curl -OL https://<OpsManagerHost>:<Port>/download/agent/automation/mongodb-mms-automation-agent-10.2.7.5898.ppc64e1.ubuntu1604.deb
    

    Note

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

    4

    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
    

    The changes you make depend whether or not you are using server pools.

    Update the following configuration keys:

    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>
    

    Important

    Do not configure the Server Pool settings:

    Server Pools deprecated as of Ops Manager 4.0

    As of Ops Manager 4.0, server pools are deprecated and disabled by default.

    Update the following configuration keys:

    Key Value
    mmsBaseUrl URL (hostname and port) of the Ops Manager Application.
    serverPoolKey

    Server Pool Key.

    To find the server pool key, in the Admin menu, go to Server Pool view and click on the Agent Configuration tab.

    serverPoolPropertiesFile

    Absolute filepath of a file that contains server properties. Ensure the MongoDB Agent can read the file.

    The properties file contains key/value pairs of the form <property>=<value>. The Ops Manager Administrator decides on both the property names and values.

    Note

    Ensure that the properties file contains the desired property names and values before starting the Automation on the server.

    Once the server is registered with the pool, changes to the properties file do not take effect until the server is first removed and the Automation restarted.

    serverPoolStateFile

    Absolute filepath of the file to be used by the MongoDB Agent.

    Ensure that the directory path to the file exists and the agent has read and write access to the directory. The file itself need not exist; however, if it does exist, the agent must have read and write access to the file.

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

    mmsBaseUrl=<application URL>
    serverPoolKey=somekeyabc123
    serverPoolPropertiesFile=<path to server properties file>
    serverPoolStateFile=<path to server state file>
    

    Important

    Do not configure the Project settings:

    5

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

    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
    
    7

    Start the MongoDB Agent.

    Issue the following command:

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

    Finish the installation of the MongoDB Agent.

    In the Install Agent Instructions modal:

    1. Click Verify Agent to make sure the MongoDB Agent can connect to Ops Manager.
    2. Click Done.
    9

    Repeat the installation procedure for each MongoDB host.

    Using a tar archive:

    1

    Log in to the Ops Manager Application.

    2

    Begin or Manage a Deployment.

    Your project has with no deployments and you see a prompt to get started.

    1. From the Build New Deployment menu, select the type of deployment you wish to add:

    2. If, on the Create New <Deployment> page, Ops Manager cannot detect any hosts with the MongoDB Agent installed, you see a banner displayed at the top of the Create New <Deployment> page.

      Click the see instructions link.

    3. From the Select Your Server’s Operating System menu, click Ubuntu 16.X Power (ppc64le) - TAR.

    4. Click Next.

    1. Click Manage your existing deployment.
    2. From the Install Agent menu, click Ubuntu 16.X Power (ppc64le) - TAR.
    3

    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 16.04 for PowerPC:

    curl -OL https://<OpsManagerHost>:<Port>/download/agent/automation/mongodb-mms-automation-agent-10.2.7.5898.ubuntu1604_ppc64le.tar.gz
    

    Note

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

    4

    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-10.5.0.5938-1.ubuntu1604_ppc64le.tar.gz
    
    5

    Change to the extracted binary directory.

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

    cd mongodb-mms-automation-agent-10.2.7.5898.ubuntu1604_ppc64le
    
    6

    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
    

    The changes you make depend whether or not you are using server pools.

    Update the following configuration keys:

    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>
    

    Important

    Do not configure the Server Pool settings:

    Server Pools deprecated as of Ops Manager 4.0

    As of Ops Manager 4.0, server pools are deprecated and disabled by default.

    Update the following configuration keys:

    Key Value
    mmsBaseUrl URL (hostname and port) of the Ops Manager Application.
    serverPoolKey

    Server Pool Key.

    To find the server pool key, in the Admin menu, go to Server Pool view and click on the Agent Configuration tab.

    serverPoolPropertiesFile

    Absolute filepath of a file that contains server properties. Ensure the MongoDB Agent can read the file.

    The properties file contains key/value pairs of the form <property>=<value>. The Ops Manager Administrator decides on both the property names and values.

    Note

    Ensure that the properties file contains the desired property names and values before starting the Automation on the server.

    Once the server is registered with the pool, changes to the properties file do not take effect until the server is first removed and the Automation restarted.

    serverPoolStateFile

    Absolute filepath of the file to be used by the MongoDB Agent.

    Ensure that the directory path to the file exists and the agent has read and write access to the directory. The file itself need not exist; however, if it does exist, the agent must have read and write access to the file.

    The resulting changes to the local.config file should look like the following:

    mmsBaseUrl=<application URL>
    serverPoolKey=somekeyabc123
    serverPoolPropertiesFile=<path to server properties file>
    serverPoolStateFile=<path to server state file>
    

    Important

    Do not configure the Project settings:

    7

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

    Create the binary, log, and data directories.

    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>
      
    9

    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
    
    10

    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 &
    
    11

    Finish the installation of the MongoDB Agent.

    In the Install Agent Instructions modal:

    1. Click Verify Agent to make sure the MongoDB Agent can connect to Ops Manager.
    2. Click Done.
    12

    Repeat the installation procedure for each MongoDB host.

    On zSeries architecture running Ubuntu 16.x using a deb package:

    1

    Log in to the Ops Manager Application.

    2

    Begin or Manage a Deployment.

    Your project has with no deployments and you see a prompt to get started.

    1. From the Build New Deployment menu, select the type of deployment you wish to add:

    2. If, on the Create New <Deployment> page, Ops Manager cannot detect any hosts with the MongoDB Agent installed, you see a banner displayed at the top of the Create New <Deployment> page.

      Click the see instructions link.

    3. From the Select Your Server’s Operating System menu, click Ubuntu 18.X Z-Series (s390x) - DEB.

    4. Click Next.

    1. Click Manage your existing deployment.
    2. From the Install Agent menu, click Ubuntu 18.X Z-Series (s390x) - DEB.
    3

    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-10.2.7.5898.s390x.ubuntu1804.deb
    

    Note

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

    4

    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
    

    The changes you make depend whether or not you are using server pools.

    Update the following configuration keys:

    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>
    

    Important

    Do not configure the Server Pool settings:

    Server Pools deprecated as of Ops Manager 4.0

    As of Ops Manager 4.0, server pools are deprecated and disabled by default.

    Update the following configuration keys:

    Key Value
    mmsBaseUrl URL (hostname and port) of the Ops Manager Application.
    serverPoolKey

    Server Pool Key.

    To find the server pool key, in the Admin menu, go to Server Pool view and click on the Agent Configuration tab.

    serverPoolPropertiesFile

    Absolute filepath of a file that contains server properties. Ensure the MongoDB Agent can read the file.

    The properties file contains key/value pairs of the form <property>=<value>. The Ops Manager Administrator decides on both the property names and values.

    Note

    Ensure that the properties file contains the desired property names and values before starting the Automation on the server.

    Once the server is registered with the pool, changes to the properties file do not take effect until the server is first removed and the Automation restarted.

    serverPoolStateFile

    Absolute filepath of the file to be used by the MongoDB Agent.

    Ensure that the directory path to the file exists and the agent has read and write access to the directory. The file itself need not exist; however, if it does exist, the agent must have read and write access to the file.

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

    mmsBaseUrl=<application URL>
    serverPoolKey=somekeyabc123
    serverPoolPropertiesFile=<path to server properties file>
    serverPoolStateFile=<path to server state file>
    

    Important

    Do not configure the Project settings:

    5

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

    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
    
    7

    Start the MongoDB Agent.

    Issue the following command:

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

    Finish the installation of the MongoDB Agent.

    In the Install Agent Instructions modal:

    1. Click Verify Agent to make sure the MongoDB Agent can connect to Ops Manager.
    2. Click Done.
    9

    Repeat the installation procedure for each MongoDB host.

    Use this procedure to install the MongoDB Agent:

    On x86_64 architecture:

    Running RHEL / CentOS 6.x or Amazon Linux 1 using an rpm package:

    1

    Log in to the Ops Manager Application.

    2

    Begin or Manage a Deployment.

    Your project has with no deployments and you see a prompt to get started.

    1. From the Build New Deployment menu, select the type of deployment you wish to add:

    2. If, on the Create New <Deployment> page, Ops Manager cannot detect any hosts with the MongoDB Agent installed, you see a banner displayed at the top of the Create New <Deployment> page.

      Click the see instructions link.

    3. From the Select Your Server’s Operating System menu, click RHEL/CentOS 6.X, Amazon Linux - RPM.

    4. Click Next.

    1. Click Manage your existing deployment.
    2. From the Install Agent menu, click RHEL/CentOS 6.X, Amazon Linux - RPM.
    3

    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 64-bit x86:

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

    Note

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

    4

    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
    

    The changes you make depend whether or not you are using server pools.

    Update the following configuration keys:

    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>
    

    Important

    Do not configure the Server Pool settings:

    Server Pools deprecated as of Ops Manager 4.0

    As of Ops Manager 4.0, server pools are deprecated and disabled by default.

    Update the following configuration keys:

    Key Value
    mmsBaseUrl URL (hostname and port) of the Ops Manager Application.
    serverPoolKey

    Server Pool Key.

    To find the server pool key, in the Admin menu, go to Server Pool view and click on the Agent Configuration tab.

    serverPoolPropertiesFile

    Absolute filepath of a file that contains server properties. Ensure the MongoDB Agent can read the file.

    The properties file contains key/value pairs of the form <property>=<value>. The Ops Manager Administrator decides on both the property names and values.

    Note

    Ensure that the properties file contains the desired property names and values before starting the Automation on the server.

    Once the server is registered with the pool, changes to the properties file do not take effect until the server is first removed and the Automation restarted.

    serverPoolStateFile

    Absolute filepath of the file to be used by the MongoDB Agent.

    Ensure that the directory path to the file exists and the agent has read and write access to the directory. The file itself need not exist; however, if it does exist, the agent must have read and write access to the file.

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

    mmsBaseUrl=<application URL>
    serverPoolKey=somekeyabc123
    serverPoolPropertiesFile=<path to server properties file>
    serverPoolStateFile=<path to server state file>
    

    Important

    Do not configure the Project settings:

    5

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

    Prepare the data directory.

    The data directory stores MongoDB data and must be owned by the mongod user. For an existing MongoDB deployment, ensure the directory has the mongod user as owner. If no MongoDB deployment exists, create the directory and set the owner.

    The following commands create a data directory and set the owner as the mongod user:

    sudo mkdir /data; sudo chown mongod:mongod /data
    
    7

    Start the MongoDB Agent.

    Issue the following command:

    sudo service mongodb-mms-automation-agent start
    
    8

    Finish the installation of the MongoDB Agent.

    In the Install Agent Instructions modal:

    1. Click Verify Agent to make sure the MongoDB Agent can connect to Ops Manager.
    2. Click Done.
    9

    Repeat the installation procedure for each MongoDB host.

    Running RHEL / CentOS 7.x, SUSE 12, or Amazon Linux 2:

    Using an rpm package:

    1

    Log in to the Ops Manager Application.

    2

    Begin or Manage a Deployment.

    Your project has with no deployments and you see a prompt to get started.

    1. From the Build New Deployment menu, select the type of deployment you wish to add:

    2. If, on the Create New <Deployment> page, Ops Manager cannot detect any hosts with the MongoDB Agent installed, you see a banner displayed at the top of the Create New <Deployment> page.

      Click the see instructions link.

    3. From the Select Your Server’s Operating System menu, click RHEL/CentOS (7.X/8.X), SUSE12, Amazon Linux2 - RPM.

    4. Click Next.

    1. Click Manage your existing deployment.
    2. From the Install Agent menu, click RHEL/CentOS (7.X/8.X), SUSE12, Amazon Linux2 - RPM.
    3

    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-10.2.7.5898.x86_64.rhel7.rpm
    

    Note

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

    4

    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
    

    The changes you make depend whether or not you are using server pools.

    Update the following configuration keys:

    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>
    

    Important

    Do not configure the Server Pool settings:

    Server Pools deprecated as of Ops Manager 4.0

    As of Ops Manager 4.0, server pools are deprecated and disabled by default.

    Update the following configuration keys:

    Key Value
    mmsBaseUrl URL (hostname and port) of the Ops Manager Application.
    serverPoolKey

    Server Pool Key.

    To find the server pool key, in the Admin menu, go to Server Pool view and click on the Agent Configuration tab.

    serverPoolPropertiesFile

    Absolute filepath of a file that contains server properties. Ensure the MongoDB Agent can read the file.

    The properties file contains key/value pairs of the form <property>=<value>. The Ops Manager Administrator decides on both the property names and values.

    Note

    Ensure that the properties file contains the desired property names and values before starting the Automation on the server.

    Once the server is registered with the pool, changes to the properties file do not take effect until the server is first removed and the Automation restarted.

    serverPoolStateFile

    Absolute filepath of the file to be used by the MongoDB Agent.

    Ensure that the directory path to the file exists and the agent has read and write access to the directory. The file itself need not exist; however, if it does exist, the agent must have read and write access to the file.

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

    mmsBaseUrl=<application URL>
    serverPoolKey=somekeyabc123
    serverPoolPropertiesFile=<path to server properties file>
    serverPoolStateFile=<path to server state file>
    

    Important

    Do not configure the Project settings:

    5

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

    Prepare the data directory.

    The data directory stores MongoDB data and must be owned by the mongod user. For an existing MongoDB deployment, ensure the directory has the mongod user as owner. If no MongoDB deployment exists, create the directory and set the owner.

    The following commands create a data directory and set the owner as the mongod user:

    sudo mkdir /data; sudo chown mongod:mongod /data
    
    7

    Start the MongoDB Agent.

    Issue the following command:

    sudo service mongodb-mms-automation-agent start
    
    8

    Finish the installation of the MongoDB Agent.

    In the Install Agent Instructions modal:

    1. Click Verify Agent to make sure the MongoDB Agent can connect to Ops Manager.
    2. Click Done.
    9

    Repeat the installation procedure for each MongoDB host.

    Using a tar archive:

    1

    Log in to the Ops Manager Application.

    2

    Begin or Manage a Deployment.

    Your project has with no deployments and you see a prompt to get started.

    1. From the Build New Deployment menu, select the type of deployment you wish to add:

    2. If, on the Create New <Deployment> page, Ops Manager cannot detect any hosts with the MongoDB Agent installed, you see a banner displayed at the top of the Create New <Deployment> page.

      Click the see instructions link.

    3. From the Select Your Server’s Operating System menu, click RHEL/CentOS (7.X/8.X), SUSE12, Amazon Linux 2 - TAR.

    4. Click Next.

    1. Click Manage your existing deployment.
    2. From the Install Agent menu, click RHEL/CentOS (7.X/8.X), SUSE12, Amazon Linux 2 - TAR.
    3

    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 for 64-bit x86:

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

    Note

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

    4

    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-10.5.0.5938-1.rhel7_x86_64.tar.gz
    
    5

    Change to the extracted binary directory.

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

    cd mongodb-mms-automation-agent-10.2.7.5898.rhel7_x86_64
    
    6

    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
    

    The changes you make depend whether or not you are using server pools.

    Update the following configuration keys:

    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>
    

    Important

    Do not configure the Server Pool settings:

    Server Pools deprecated as of Ops Manager 4.0

    As of Ops Manager 4.0, server pools are deprecated and disabled by default.

    Update the following configuration keys:

    Key Value
    mmsBaseUrl URL (hostname and port) of the Ops Manager Application.
    serverPoolKey

    Server Pool Key.

    To find the server pool key, in the Admin menu, go to Server Pool view and click on the Agent Configuration tab.

    serverPoolPropertiesFile

    Absolute filepath of a file that contains server properties. Ensure the MongoDB Agent can read the file.

    The properties file contains key/value pairs of the form <property>=<value>. The Ops Manager Administrator decides on both the property names and values.

    Note

    Ensure that the properties file contains the desired property names and values before starting the Automation on the server.

    Once the server is registered with the pool, changes to the properties file do not take effect until the server is first removed and the Automation restarted.

    serverPoolStateFile

    Absolute filepath of the file to be used by the MongoDB Agent.

    Ensure that the directory path to the file exists and the agent has read and write access to the directory. The file itself need not exist; however, if it does exist, the agent must have read and write access to the file.

    The resulting changes to the local.config file should look like the following:

    mmsBaseUrl=<application URL>
    serverPoolKey=somekeyabc123
    serverPoolPropertiesFile=<path to server properties file>
    serverPoolStateFile=<path to server state file>
    

    Important

    Do not configure the Project settings:

    7

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

    Create the binary, log, and data directories.

    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>
      
    9

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

    Run the following commands:

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

    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 &
    
    11

    Finish the installation of the MongoDB Agent.

    In the Install Agent Instructions modal:

    1. Click Verify Agent to make sure the MongoDB Agent can connect to Ops Manager.
    2. Click Done.
    12

    Repeat the installation procedure for each MongoDB host.

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

    Using an rpm package:

    1

    Log in to the Ops Manager Application.

    2

    Begin or Manage a Deployment.

    Your project has with no deployments and you see a prompt to get started.

    1. From the Build New Deployment menu, select the type of deployment you wish to add:

    2. If, on the Create New <Deployment> page, Ops Manager cannot detect any hosts with the MongoDB Agent installed, you see a banner displayed at the top of the Create New <Deployment> page.

      Click the see instructions link.

    3. From the Select Your Server’s Operating System menu, click RHEL/CentOS (7.X) Power (ppc64le) - RPM.

    4. Click Next.

    1. Click Manage your existing deployment.
    2. From the Install Agent menu, click RHEL/CentOS (7.X) Power (ppc64le) - RPM.
    3

    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-10.2.7.5898.ppc641e.rhel7.rpm
    

    Note

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

    4

    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
    

    The changes you make depend whether or not you are using server pools.

    Update the following configuration keys:

    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>
    

    Important

    Do not configure the Server Pool settings:

    Server Pools deprecated as of Ops Manager 4.0

    As of Ops Manager 4.0, server pools are deprecated and disabled by default.

    Update the following configuration keys:

    Key Value
    mmsBaseUrl URL (hostname and port) of the Ops Manager Application.
    serverPoolKey

    Server Pool Key.

    To find the server pool key, in the Admin menu, go to Server Pool view and click on the Agent Configuration tab.

    serverPoolPropertiesFile

    Absolute filepath of a file that contains server properties. Ensure the MongoDB Agent can read the file.

    The properties file contains key/value pairs of the form <property>=<value>. The Ops Manager Administrator decides on both the property names and values.

    Note

    Ensure that the properties file contains the desired property names and values before starting the Automation on the server.

    Once the server is registered with the pool, changes to the properties file do not take effect until the server is first removed and the Automation restarted.

    serverPoolStateFile

    Absolute filepath of the file to be used by the MongoDB Agent.

    Ensure that the directory path to the file exists and the agent has read and write access to the directory. The file itself need not exist; however, if it does exist, the agent must have read and write access to the file.

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

    mmsBaseUrl=<application URL>
    serverPoolKey=somekeyabc123
    serverPoolPropertiesFile=<path to server properties file>
    serverPoolStateFile=<path to server state file>
    

    Important

    Do not configure the Project settings:

    5

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

    Prepare the data directory.

    The data directory stores MongoDB data and must be owned by the mongod user. For an existing MongoDB deployment, ensure the directory has the mongod user as owner. If no MongoDB deployment exists, create the directory and set the owner.

    The following commands create a data directory and set the owner as the mongod user:

    sudo mkdir /data; sudo chown mongod:mongod /data
    
    7

    Start the MongoDB Agent.

    Issue the following command:

    sudo service mongodb-mms-automation-agent start
    
    8

    Finish the installation of the MongoDB Agent.

    In the Install Agent Instructions modal:

    1. Click Verify Agent to make sure the MongoDB Agent can connect to Ops Manager.
    2. Click Done.
    9

    Repeat the installation procedure for each MongoDB host.

    Using a tar archive:

    1

    Log in to the Ops Manager Application.

    2

    Begin or Manage a Deployment.

    Your project has with no deployments and you see a prompt to get started.

    1. From the Build New Deployment menu, select the type of deployment you wish to add:

    2. If, on the Create New <Deployment> page, Ops Manager cannot detect any hosts with the MongoDB Agent installed, you see a banner displayed at the top of the Create New <Deployment> page.

      Click the see instructions link.

    3. From the Select Your Server’s Operating System menu, click RHEL/CentOS (7.X) Power (ppc64le) - TAR.

    4. Click Next.

    1. Click Manage your existing deployment.
    2. From the Install Agent menu, click RHEL/CentOS (7.X) Power (ppc64le) - TAR.
    3

    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-10.2.7.5898.rhel7_ppc64le.tar.gz
    

    Note

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

    4

    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-10.5.0.5938-1.rhel7_ppc64le.tar.gz
    
    5

    Change to the extracted binary directory.

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

    cd mongodb-mms-automation-agent-10.2.7.5898.rhel7_ppc64le
    
    6

    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
    

    The changes you make depend whether or not you are using server pools.

    Update the following configuration keys:

    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>
    

    Important

    Do not configure the Server Pool settings:

    Server Pools deprecated as of Ops Manager 4.0

    As of Ops Manager 4.0, server pools are deprecated and disabled by default.

    Update the following configuration keys:

    Key Value
    mmsBaseUrl URL (hostname and port) of the Ops Manager Application.
    serverPoolKey

    Server Pool Key.

    To find the server pool key, in the Admin menu, go to Server Pool view and click on the Agent Configuration tab.

    serverPoolPropertiesFile

    Absolute filepath of a file that contains server properties. Ensure the MongoDB Agent can read the file.

    The properties file contains key/value pairs of the form <property>=<value>. The Ops Manager Administrator decides on both the property names and values.

    Note

    Ensure that the properties file contains the desired property names and values before starting the Automation on the server.

    Once the server is registered with the pool, changes to the properties file do not take effect until the server is first removed and the Automation restarted.

    serverPoolStateFile

    Absolute filepath of the file to be used by the MongoDB Agent.

    Ensure that the directory path to the file exists and the agent has read and write access to the directory. The file itself need not exist; however, if it does exist, the agent must have read and write access to the file.

    The resulting changes to the local.config file should look like the following:

    mmsBaseUrl=<application URL>
    serverPoolKey=somekeyabc123
    serverPoolPropertiesFile=<path to server properties file>
    serverPoolStateFile=<path to server state file>
    

    Important

    Do not configure the Project settings:

    7

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

    Create the binary, log, and data directories.

    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>
      
    9

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

    Run the following commands:

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

    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 &
    
    11

    Finish the installation of the MongoDB Agent.

    In the Install Agent Instructions modal:

    1. Click Verify Agent to make sure the MongoDB Agent can connect to Ops Manager.
    2. Click Done.
    12

    Repeat the installation procedure for each MongoDB host.

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

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

    1

    Log in to the Ops Manager Application.

    2

    Begin or Manage a Deployment.

    Your project has with no deployments and you see a prompt to get started.

    1. From the Build New Deployment menu, select the type of deployment you wish to add:

    2. If, on the Create New <Deployment> page, Ops Manager cannot detect any hosts with the MongoDB Agent installed, you see a banner displayed at the top of the Create New <Deployment> page.

      Click the see instructions link.

    3. From the Select Your Server’s Operating System menu, click RHEL 6.X Z-Series (s390x) - RPM.

    4. Click Next.

    1. Click Manage your existing deployment.
    2. From the Install Agent menu, click RHEL 6.X Z-Series (s390x) - RPM.
    3

    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-10.2.7.5898.s390x.rhel6.rpm
    

    Note

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

    4

    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
    

    The changes you make depend whether or not you are using server pools.

    Update the following configuration keys:

    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>
    

    Important

    Do not configure the Server Pool settings:

    Server Pools deprecated as of Ops Manager 4.0

    As of Ops Manager 4.0, server pools are deprecated and disabled by default.

    Update the following configuration keys:

    Key Value
    mmsBaseUrl URL (hostname and port) of the Ops Manager Application.
    serverPoolKey

    Server Pool Key.

    To find the server pool key, in the Admin menu, go to Server Pool view and click on the Agent Configuration tab.

    serverPoolPropertiesFile

    Absolute filepath of a file that contains server properties. Ensure the MongoDB Agent can read the file.

    The properties file contains key/value pairs of the form <property>=<value>. The Ops Manager Administrator decides on both the property names and values.

    Note

    Ensure that the properties file contains the desired property names and values before starting the Automation on the server.

    Once the server is registered with the pool, changes to the properties file do not take effect until the server is first removed and the Automation restarted.

    serverPoolStateFile

    Absolute filepath of the file to be used by the MongoDB Agent.

    Ensure that the directory path to the file exists and the agent has read and write access to the directory. The file itself need not exist; however, if it does exist, the agent must have read and write access to the file.

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

    mmsBaseUrl=<application URL>
    serverPoolKey=somekeyabc123
    serverPoolPropertiesFile=<path to server properties file>
    serverPoolStateFile=<path to server state file>
    

    Important

    Do not configure the Project settings:

    5

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

    Prepare the data directory.

    The data directory stores MongoDB data and must be owned by the mongod user. For an existing MongoDB deployment, ensure the directory has the mongod user as owner. If no MongoDB deployment exists, create the directory and set the owner.

    The following commands create a data directory and set the owner as the mongod user:

    sudo mkdir /data; sudo chown mongod:mongod /data
    
    7

    Start the MongoDB Agent.

    Issue the following command:

    sudo service mongodb-mms-automation-agent start
    
    8

    Finish the installation of the MongoDB Agent.

    In the Install Agent Instructions modal:

    1. Click Verify Agent to make sure the MongoDB Agent can connect to Ops Manager.
    2. Click Done.
    9

    Repeat the installation procedure for each MongoDB host.

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

    1

    Log in to the Ops Manager Application.

    2

    Begin or Manage a Deployment.

    Your project has with no deployments and you see a prompt to get started.

    1. From the Build New Deployment menu, select the type of deployment you wish to add:

    2. If, on the Create New <Deployment> page, Ops Manager cannot detect any hosts with the MongoDB Agent installed, you see a banner displayed at the top of the Create New <Deployment> page.

      Click the see instructions link.

    3. From the Select Your Server’s Operating System menu, click RHEL 7.X Z-Series (s390x) - RPM.

    4. Click Next.

    1. Click Manage your existing deployment.
    2. From the Install Agent menu, click RHEL 7.X Z-Series (s390x) - RPM.
    3

    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-10.2.7.5898.s390x.rhel7.rpm
    

    Note

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

    4

    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
    

    The changes you make depend whether or not you are using server pools.

    Update the following configuration keys:

    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>
    

    Important

    Do not configure the Server Pool settings:

    Server Pools deprecated as of Ops Manager 4.0

    As of Ops Manager 4.0, server pools are deprecated and disabled by default.

    Update the following configuration keys:

    Key Value
    mmsBaseUrl URL (hostname and port) of the Ops Manager Application.
    serverPoolKey

    Server Pool Key.

    To find the server pool key, in the Admin menu, go to Server Pool view and click on the Agent Configuration tab.

    serverPoolPropertiesFile

    Absolute filepath of a file that contains server properties. Ensure the MongoDB Agent can read the file.

    The properties file contains key/value pairs of the form <property>=<value>. The Ops Manager Administrator decides on both the property names and values.

    Note

    Ensure that the properties file contains the desired property names and values before starting the Automation on the server.

    Once the server is registered with the pool, changes to the properties file do not take effect until the server is first removed and the Automation restarted.

    serverPoolStateFile

    Absolute filepath of the file to be used by the MongoDB Agent.

    Ensure that the directory path to the file exists and the agent has read and write access to the directory. The file itself need not exist; however, if it does exist, the agent must have read and write access to the file.

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

    mmsBaseUrl=<application URL>
    serverPoolKey=somekeyabc123
    serverPoolPropertiesFile=<path to server properties file>
    serverPoolStateFile=<path to server state file>
    

    Important

    Do not configure the Project settings:

    5

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

    Prepare the data directory.

    The data directory stores MongoDB data and must be owned by the mongod user. For an existing MongoDB deployment, ensure the directory has the mongod user as owner. If no MongoDB deployment exists, create the directory and set the owner.

    The following commands create a data directory and set the owner as the mongod user:

    sudo mkdir /data; sudo chown mongod:mongod /data
    
    7

    Start the MongoDB Agent.

    Issue the following command:

    sudo service mongodb-mms-automation-agent start
    
    8

    Finish the installation of the MongoDB Agent.

    In the Install Agent Instructions modal:

    1. Click Verify Agent to make sure the MongoDB Agent can connect to Ops Manager.
    2. Click Done.
    9

    Repeat the installation procedure for each MongoDB host.

    Use this procedure to install the MongoDB Agent on x86_64 architecture running Microsoft Windows:

    1

    Log in to the Ops Manager Application.

    2

    Begin or Manage a Deployment.

    Your project has with no deployments and you see a prompt to get started.

    1. From the Build New Deployment menu, select the type of deployment you wish to add:

    2. If, on the Create New <Deployment> page, Ops Manager cannot detect any hosts with the MongoDB Agent installed, you see a banner displayed at the top of the Create New <Deployment> page.

      Click the see instructions link.

    3. From the Select Your Server’s Operating System menu, click Windows - MSI.

    4. Click Next.

    1. Click Manage your existing deployment.
    2. From the Install Agent menu, click Windows - MSI.
    3

    Download the MongoDB Agent.

    The MongoDB Agent Installation Instructions box displays the following information:

    • Base URL

      (Required for either binding to a project or adding the host to a server pool)

      Server Pools deprecated as of Ops Manager 4.0

      As of Ops Manager 4.0, server pools are deprecated and disabled by default.

    • Project ID (Required for binding to a project)

    • API Key

      If you do not have an API Key, click plus icon Generate Key.

    Some or all of these values are required in a later step. Copy these values then store them where you can access them later.

    4

    Install the MongoDB Agent.

    1. After the MSI downloads, double-click:

      mongodb-mms-automation-agent-10.2.7.5898.windows_x86_64.msi

    2. If a security warning appears, click Run.

    3. At the Configuration/Log Folder step

      Provide the directory into which these files are saved.

    4. At the Key Type step, select:

      • Agent API Key to bind to a specific project or
      • Server Pool Key to add the host to a server pool.
    5. Enter the appropriate agent keys.

      Note

      These keys are provided in the MongoDB Agent Installation Instructions modal described in the previous step.

      If you selected Agent API Key, type the:

      • Base URL
      • Project ID
      • Agent API Key

      If you selected Server Pool Key, type the:

      • Base URL
      • Project ID
      • Server Pool Key.

      To find the server pool key, in the Admin menu, go to Server Pool view and click on the Agent Configuration tab.

    6. At the MongoDB Paths step, specify the Log and Backup directories

    7. At the Windows Firewall Configuration step, click your preferred firewall configuration.

      If you click Configure firewall rules allowing access from only the specified |ipaddr| addresses., type the necessary IPv4 addresses into the provided box.

    8. (Conditional) Windows enables Stealth Mode for the Windows Firewall by default. If you have not disabled it on the MongoDB host on which you are installing the MongoDB Agent, you are asked to disable it. Stealth Mode significantly degrades the performance and capability of the MongoDB Agent. Click Disable Stealth Mode.

    9. (Conditional) Windows does not enable Disk Performance Counters by default. If you have not enabled Disk Performance Counters for the MongoDB host, click Enable Disk Performance Counters. The MongoDB Agent uses these counters for some of its hardware monitoring activities.

    10. Click Install.

    11. Click Finish once setup is complete.

    After the MSI downloads, you can run an unattended install. You run an unattended install from the command line in either the command interpreter or PowerShell. To learn more about unattended installs, see Microsoft’s documentation on Standard Installer Command-Line Options

    To run the MSI installer unattended from the command line, you invoke msiexec.exe with the /q and /i flags and a combination of required and optional parameters:

    Parameter Necessity Value
    MMSAPIKEY Required Agent API key of your Ops Manager project.
    MMSBASEURL Required URL of the Ops Manager host.
    MMSGROUPID Required Unique Identifier of your Ops Manager project.
    CONFIGLOGDIR Optional Absolute file path to which Ops Manager should write the MongoDB Agent configuration file.
    LOGFILE Optional Absolute file path to which Ops Manager should write the MongoDB Agent log
    MMSCONFIGBACKUP Optional Absolute file path to the Ops Manager automation configuration backup JSON file.

    Example

    To install the MongoDB Agent unattended, you would invoke msiexec.exe with the following options:

    msiexec.exe /q /i "C:\PATH\TO\mongodb-mms-automation-agent-<VERSION>.windows_x86_64.msi" MMSGROUPID=<GROUP.ID> MMSAPIKEY=<AGENT.API.ID> MMSBASEURL="<http://opsmanager.example.com:8080>" LOGFILE="C:\MMSData\Server\Log\automation-agent.log" MMSCONFIGBACKUP="C:\MMSData\MongoDB\mms-cluster-config-backup.json"
    
    5

    Finish the installation of the MongoDB Agent.

    In the Install Agent Instructions modal:

    1. Click Verify Agent to make sure the MongoDB Agent can connect to Ops Manager.
    2. Click Done.
    6

    (Optional) Change the location of the MongoDB Agent binaries and configuration backup files.

    By default, the MongoDB binaries and Ops Manager configuration backup file are located in %SystemDrive%\MMSMongoDB\versions.

    Note

    Windows sets the %SystemDrive% environment variable to the drive on which you installed Windows. By default, you would be directed to install Windows on the C: drive. To find your %SystemDrive%, issue with following command from PowerShell:

    get-childitem env:SystemDrive
    

    If you want to store these files in a different directory, follow these procedures:

    To change the location of the MongoDB Agent Binaries

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

    2. Below the Download Directory heading, click edit icon to the right of the path shown in Download Directory (Windows).

    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 MongoDB Agent. Use Windows Explorer to move the file or issue the following command from a Command Prompt or PowerShell:

      md \<newPath>
      

      Important

      Make sure the system user that runs the MongoDB Agent can write to this new directory. This is usually the SYSTEM user, which requires no additional configuration unless you changed the user.

    To change the location of the MongoDB Agent configuration backup

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

    2. Change the mmsConfigBackup setting to the new path for the configuration backup file. Replace X with the drive letter on which your backup is stored.

      mmsConfigBackup=X:\<newPath>\mms-cluster-config-backup.json
      
    3. Save the MongoDB Agent configuration file.

    4. Move the configuration backup file to the new directory. Use Windows Explorer to move the file or issue the following command from a Command Prompt or PowerShell:

      move %SystemDrive%\MMSMongoDB\versions\mms-cluster-config-backup.json \<newPath>
      
    7

    Repeat the installation procedure for each MongoDB host.

    Use this procedure to install the MongoDB Agent on x86_64 architecture running macOS 10.8 or later:

    1

    Log in to the Ops Manager Application.

    2

    Begin or Manage a Deployment.

    Your project has with no deployments and you see a prompt to get started.

    1. From the Build New Deployment menu, select the type of deployment you wish to add:

    2. If, on the Create New <Deployment> page, Ops Manager cannot detect any hosts with the MongoDB Agent installed, you see a banner displayed at the top of the Create New <Deployment> page.

      Click the see instructions link.

    3. From the Select Your Server’s Operating System menu, click Mac OSX (10.8 and above) - TAR.

    4. Click Next.

    1. Click Manage your existing deployment.
    2. From the Install Agent menu, click Mac OSX (10.8 and above) - TAR.
    3

    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 macOS Terminal.

    From a system shell on the host that will run the MongoDB Agent, issue the following curl command to download the installer for macOS:

    curl -OL https://<OpsManagerHost>:<Port>/download/agent/automation/mongodb-mms-automation-agent-10.2.7.5898.osx_x86_64.tar.gz
    

    Note

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

    4

    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-10.5.0.5938-1.osx_x86_64.tar.gz
    
    5

    Change to the extracted binary directory.

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

    cd mongodb-mms-automation-agent-10.2.7.5898.osx_x86_64
    
    6

    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
    

    The changes you make depend whether or not you are using server pools.

    Update the following configuration keys:

    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>
    

    Important

    Do not configure the Server Pool settings:

    Server Pools deprecated as of Ops Manager 4.0

    As of Ops Manager 4.0, server pools are deprecated and disabled by default.

    Update the following configuration keys:

    Key Value
    mmsBaseUrl URL (hostname and port) of the Ops Manager Application.
    serverPoolKey

    Server Pool Key.

    To find the server pool key, in the Admin menu, go to Server Pool view and click on the Agent Configuration tab.

    serverPoolPropertiesFile

    Absolute filepath of a file that contains server properties. Ensure the MongoDB Agent can read the file.

    The properties file contains key/value pairs of the form <property>=<value>. The Ops Manager Administrator decides on both the property names and values.

    Note

    Ensure that the properties file contains the desired property names and values before starting the Automation on the server.

    Once the server is registered with the pool, changes to the properties file do not take effect until the server is first removed and the Automation restarted.

    serverPoolStateFile

    Absolute filepath of the file to be used by the MongoDB Agent.

    Ensure that the directory path to the file exists and the agent has read and write access to the directory. The file itself need not exist; however, if it does exist, the agent must have read and write access to the file.

    The resulting changes to the local.config file should look like the following:

    mmsBaseUrl=<application URL>
    serverPoolKey=somekeyabc123
    serverPoolPropertiesFile=<path to server properties file>
    serverPoolStateFile=<path to server state file>
    

    Important

    Do not configure the Project settings:

    7

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

    Create the binary, log, and data directories.

    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>
      
    9

    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
    
    10

    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 &
    
    11

    Finish the installation of the MongoDB Agent.

    In the Install Agent Instructions modal:

    1. Click Verify Agent to make sure the MongoDB Agent can connect to Ops Manager.
    2. Click Done.
    12

    Repeat the installation procedure for each MongoDB host.

    Use this procedure to install Linux systems that do not use deb or rpm packages.

    1

    Log in to the Ops Manager Application.

    2

    Begin or Manage a Deployment.

    Your project has with no deployments and you see a prompt to get started.

    1. From the Build New Deployment menu, select the type of deployment you wish to add:

    2. If, on the Create New <Deployment> page, Ops Manager cannot detect any hosts with the MongoDB Agent installed, you see a banner displayed at the top of the Create New <Deployment> page.

      Click the see instructions link.

    3. From the Select Your Server’s Operating System menu, click Other Linux - TAR.

    4. Click Next.

    1. Click Manage your existing deployment.
    2. From the Install Agent menu, click Other Linux - TAR.
    3

    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-10.2.7.5898.linux_x86_64.tar.gz
    

    Note

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

    4

    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-10.5.0.5938-1.linux_x86_64.tar.gz
    
    5

    Change to the extracted binary directory.

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

    cd mongodb-mms-automation-agent-10.2.7.5898.linux_x86_64
    
    6

    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
    

    The changes you make depend whether or not you are using server pools.

    Update the following configuration keys:

    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>
    

    Important

    Do not configure the Server Pool settings:

    Server Pools deprecated as of Ops Manager 4.0

    As of Ops Manager 4.0, server pools are deprecated and disabled by default.

    Update the following configuration keys:

    Key Value
    mmsBaseUrl URL (hostname and port) of the Ops Manager Application.
    serverPoolKey

    Server Pool Key.

    To find the server pool key, in the Admin menu, go to Server Pool view and click on the Agent Configuration tab.

    serverPoolPropertiesFile

    Absolute filepath of a file that contains server properties. Ensure the MongoDB Agent can read the file.

    The properties file contains key/value pairs of the form <property>=<value>. The Ops Manager Administrator decides on both the property names and values.

    Note

    Ensure that the properties file contains the desired property names and values before starting the Automation on the server.

    Once the server is registered with the pool, changes to the properties file do not take effect until the server is first removed and the Automation restarted.

    serverPoolStateFile

    Absolute filepath of the file to be used by the MongoDB Agent.

    Ensure that the directory path to the file exists and the agent has read and write access to the directory. The file itself need not exist; however, if it does exist, the agent must have read and write access to the file.

    The resulting changes to the local.config file should look like the following:

    mmsBaseUrl=<application URL>
    serverPoolKey=somekeyabc123
    serverPoolPropertiesFile=<path to server properties file>
    serverPoolStateFile=<path to server state file>
    

    Important

    Do not configure the Project settings:

    7

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

    Create the binary, log, and data directories.

    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>
      
    9

    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
    
    10

    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 &
    
    11

    Finish the installation of the MongoDB Agent.

    In the Install Agent Instructions modal:

    1. Click Verify Agent to make sure the MongoDB Agent can connect to Ops Manager.
    2. Click Done.
    12

    Repeat the installation procedure for each MongoDB host.

    Use this procedure to install the MongoDB Agent:

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

    1

    Log in to the Ops Manager Application.

    2

    Begin or Manage a Deployment.

    Your project has with no deployments and you see a prompt to get started.

    1. From the Build New Deployment menu, select the type of deployment you wish to add:

    2. If, on the Create New <Deployment> page, Ops Manager cannot detect any hosts with the MongoDB Agent installed, you see a banner displayed at the top of the Create New <Deployment> page.

      Click the see instructions link.

    3. From the Select Your Server’s Operating System menu, click Debian 8/9, Ubuntu 16.X/18.X - DEB.

    4. Click Next.

    1. Click Manage your existing deployment.
    2. From the Install Agent menu, click Debian 8/9, Ubuntu 16.X/18.X - DEB.
    3

    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 16.04/18.04 or Debian 8/9 for 64-bit x86:

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

    Note

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

    4

    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
    

    The changes you make depend whether or not you are using server pools.

    Update the following configuration keys:

    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>
    

    Important

    Do not configure the Server Pool settings:

    Server Pools deprecated as of Ops Manager 4.0

    As of Ops Manager 4.0, server pools are deprecated and disabled by default.

    Update the following configuration keys:

    Key Value
    mmsBaseUrl URL (hostname and port) of the Ops Manager Application.
    serverPoolKey

    Server Pool Key.

    To find the server pool key, in the Admin menu, go to Server Pool view and click on the Agent Configuration tab.

    serverPoolPropertiesFile

    Absolute filepath of a file that contains server properties. Ensure the MongoDB Agent can read the file.

    The properties file contains key/value pairs of the form <property>=<value>. The Ops Manager Administrator decides on both the property names and values.

    Note

    Ensure that the properties file contains the desired property names and values before starting the Automation on the server.

    Once the server is registered with the pool, changes to the properties file do not take effect until the server is first removed and the Automation restarted.

    serverPoolStateFile

    Absolute filepath of the file to be used by the MongoDB Agent.

    Ensure that the directory path to the file exists and the agent has read and write access to the directory. The file itself need not exist; however, if it does exist, the agent must have read and write access to the file.

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

    mmsBaseUrl=<application URL>
    serverPoolKey=somekeyabc123
    serverPoolPropertiesFile=<path to server properties file>
    serverPoolStateFile=<path to server state file>
    

    Important

    Do not configure the Project settings:

    5

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

    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
    
    7

    Start the MongoDB Agent.

    Issue the following command:

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

    Finish the installation of the MongoDB Agent.

    In the Install Agent Instructions modal:

    1. Click Verify Agent to make sure the MongoDB Agent can connect to Ops Manager.
    2. Click Done.
    9

    Repeat the installation procedure for each MongoDB host.

    On PowerPC architecture running Ubuntu 16.x (managing MongoDB 3.4 or later deployments only):

    Using a deb package:

    1

    Log in to the Ops Manager Application.

    2

    Begin or Manage a Deployment.

    Your project has with no deployments and you see a prompt to get started.

    1. From the Build New Deployment menu, select the type of deployment you wish to add:

    2. If, on the Create New <Deployment> page, Ops Manager cannot detect any hosts with the MongoDB Agent installed, you see a banner displayed at the top of the Create New <Deployment> page.

      Click the see instructions link.

    3. From the Select Your Server’s Operating System menu, click Ubuntu 16.X Power (ppc64le) - DEB.

    4. Click Next.

    1. Click Manage your existing deployment.
    2. From the Install Agent menu, click Ubuntu 16.X Power (ppc64le) - DEB.
    3

    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 16.04:

    curl -OL https://<OpsManagerHost>:<Port>/download/agent/automation/mongodb-mms-automation-agent-10.2.7.5898.ppc64e1.ubuntu1604.deb
    

    Note

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

    4

    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
    

    The changes you make depend whether or not you are using server pools.

    Update the following configuration keys:

    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>
    

    Important

    Do not configure the Server Pool settings:

    Server Pools deprecated as of Ops Manager 4.0

    As of Ops Manager 4.0, server pools are deprecated and disabled by default.

    Update the following configuration keys:

    Key Value
    mmsBaseUrl URL (hostname and port) of the Ops Manager Application.
    serverPoolKey

    Server Pool Key.

    To find the server pool key, in the Admin menu, go to Server Pool view and click on the Agent Configuration tab.

    serverPoolPropertiesFile

    Absolute filepath of a file that contains server properties. Ensure the MongoDB Agent can read the file.

    The properties file contains key/value pairs of the form <property>=<value>. The Ops Manager Administrator decides on both the property names and values.

    Note

    Ensure that the properties file contains the desired property names and values before starting the Automation on the server.

    Once the server is registered with the pool, changes to the properties file do not take effect until the server is first removed and the Automation restarted.

    serverPoolStateFile

    Absolute filepath of the file to be used by the MongoDB Agent.

    Ensure that the directory path to the file exists and the agent has read and write access to the directory. The file itself need not exist; however, if it does exist, the agent must have read and write access to the file.

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

    mmsBaseUrl=<application URL>
    serverPoolKey=somekeyabc123
    serverPoolPropertiesFile=<path to server properties file>
    serverPoolStateFile=<path to server state file>
    

    Important

    Do not configure the Project settings:

    5

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

    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
    
    7

    Start the MongoDB Agent.

    Issue the following command:

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

    Finish the installation of the MongoDB Agent.

    In the Install Agent Instructions modal:

    1. Click Verify Agent to make sure the MongoDB Agent can connect to Ops Manager.
    2. Click Done.
    9

    Repeat the installation procedure for each MongoDB host.

    Using a tar archive:

    1

    Log in to the Ops Manager Application.

    2

    Begin or Manage a Deployment.

    Your project has with no deployments and you see a prompt to get started.

    1. From the Build New Deployment menu, select the type of deployment you wish to add:

    2. If, on the Create New <Deployment> page, Ops Manager cannot detect any hosts with the MongoDB Agent installed, you see a banner displayed at the top of the Create New <Deployment> page.

      Click the see instructions link.

    3. From the Select Your Server’s Operating System menu, click Ubuntu 16.X Power (ppc64le) - TAR.

    4. Click Next.

    1. Click Manage your existing deployment.
    2. From the Install Agent menu, click Ubuntu 16.X Power (ppc64le) - TAR.
    3

    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 16.04 for PowerPC:

    curl -OL https://<OpsManagerHost>:<Port>/download/agent/automation/mongodb-mms-automation-agent-10.2.7.5898.ubuntu1604_ppc64le.tar.gz
    

    Note

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

    4

    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-10.5.0.5938-1.ubuntu1604_ppc64le.tar.gz
    
    5

    Change to the extracted binary directory.

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

    cd mongodb-mms-automation-agent-10.2.7.5898.ubuntu1604_ppc64le
    
    6

    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
    

    The changes you make depend whether or not you are using server pools.

    Update the following configuration keys:

    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>
    

    Important

    Do not configure the Server Pool settings:

    Server Pools deprecated as of Ops Manager 4.0

    As of Ops Manager 4.0, server pools are deprecated and disabled by default.

    Update the following configuration keys:

    Key Value
    mmsBaseUrl URL (hostname and port) of the Ops Manager Application.
    serverPoolKey

    Server Pool Key.

    To find the server pool key, in the Admin menu, go to Server Pool view and click on the Agent Configuration tab.

    serverPoolPropertiesFile

    Absolute filepath of a file that contains server properties. Ensure the MongoDB Agent can read the file.

    The properties file contains key/value pairs of the form <property>=<value>. The Ops Manager Administrator decides on both the property names and values.

    Note

    Ensure that the properties file contains the desired property names and values before starting the Automation on the server.

    Once the server is registered with the pool, changes to the properties file do not take effect until the server is first removed and the Automation restarted.

    serverPoolStateFile

    Absolute filepath of the file to be used by the MongoDB Agent.

    Ensure that the directory path to the file exists and the agent has read and write access to the directory. The file itself need not exist; however, if it does exist, the agent must have read and write access to the file.

    The resulting changes to the local.config file should look like the following:

    mmsBaseUrl=<application URL>
    serverPoolKey=somekeyabc123
    serverPoolPropertiesFile=<path to server properties file>
    serverPoolStateFile=<path to server state file>
    

    Important

    Do not configure the Project settings:

    7

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

    Create the binary, log, and data directories.

    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>
      
    9

    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
    
    10

    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 &
    
    11

    Finish the installation of the MongoDB Agent.

    In the Install Agent Instructions modal:

    1. Click Verify Agent to make sure the MongoDB Agent can connect to Ops Manager.
    2. Click Done.
    12

    Repeat the installation procedure for each MongoDB host.

    On zSeries architecture running Ubuntu 16.x using a deb package:

    1

    Log in to the Ops Manager Application.

    2

    Begin or Manage a Deployment.

    Your project has with no deployments and you see a prompt to get started.

    1. From the Build New Deployment menu, select the type of deployment you wish to add:

    2. If, on the Create New <Deployment> page, Ops Manager cannot detect any hosts with the MongoDB Agent installed, you see a banner displayed at the top of the Create New <Deployment> page.

      Click the see instructions link.

    3. From the Select Your Server’s Operating System menu, click Ubuntu 18.X Z-Series (s390x) - DEB.

    4. Click Next.

    1. Click Manage your existing deployment.
    2. From the Install Agent menu, click Ubuntu 18.X Z-Series (s390x) - DEB.
    3

    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-10.2.7.5898.s390x.ubuntu1804.deb
    

    Note

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

    4

    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
    

    The changes you make depend whether or not you are using server pools.

    Update the following configuration keys:

    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>
    

    Important

    Do not configure the Server Pool settings:

    Server Pools deprecated as of Ops Manager 4.0

    As of Ops Manager 4.0, server pools are deprecated and disabled by default.

    Update the following configuration keys:

    Key Value
    mmsBaseUrl URL (hostname and port) of the Ops Manager Application.
    serverPoolKey

    Server Pool Key.

    To find the server pool key, in the Admin menu, go to Server Pool view and click on the Agent Configuration tab.

    serverPoolPropertiesFile

    Absolute filepath of a file that contains server properties. Ensure the MongoDB Agent can read the file.

    The properties file contains key/value pairs of the form <property>=<value>. The Ops Manager Administrator decides on both the property names and values.

    Note

    Ensure that the properties file contains the desired property names and values before starting the Automation on the server.

    Once the server is registered with the pool, changes to the properties file do not take effect until the server is first removed and the Automation restarted.

    serverPoolStateFile

    Absolute filepath of the file to be used by the MongoDB Agent.

    Ensure that the directory path to the file exists and the agent has read and write access to the directory. The file itself need not exist; however, if it does exist, the agent must have read and write access to the file.

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

    mmsBaseUrl=<application URL>
    serverPoolKey=somekeyabc123
    serverPoolPropertiesFile=<path to server properties file>
    serverPoolStateFile=<path to server state file>
    

    Important

    Do not configure the Project settings:

    5

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

    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
    
    7

    Start the MongoDB Agent.

    Issue the following command:

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

    Finish the installation of the MongoDB Agent.

    In the Install Agent Instructions modal:

    1. Click Verify Agent to make sure the MongoDB Agent can connect to Ops Manager.
    2. Click Done.
    9

    Repeat the installation procedure for each MongoDB host.

    Use this procedure to install the MongoDB Agent:

    On x86_64 architecture:

    Running RHEL / CentOS 6.x or Amazon Linux 1 using an rpm package:

    1

    Log in to the Ops Manager Application.

    2

    Begin or Manage a Deployment.

    Your project has with no deployments and you see a prompt to get started.

    1. From the Build New Deployment menu, select the type of deployment you wish to add:

    2. If, on the Create New <Deployment> page, Ops Manager cannot detect any hosts with the MongoDB Agent installed, you see a banner displayed at the top of the Create New <Deployment> page.

      Click the see instructions link.

    3. From the Select Your Server’s Operating System menu, click RHEL/CentOS 6.X, Amazon Linux - RPM.

    4. Click Next.

    1. Click Manage your existing deployment.
    2. From the Install Agent menu, click RHEL/CentOS 6.X, Amazon Linux - RPM.
    3

    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 64-bit x86:

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

    Note

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

    4

    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
    

    The changes you make depend whether or not you are using server pools.

    Update the following configuration keys:

    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>
    

    Important

    Do not configure the Server Pool settings:

    Server Pools deprecated as of Ops Manager 4.0

    As of Ops Manager 4.0, server pools are deprecated and disabled by default.

    Update the following configuration keys:

    Key Value
    mmsBaseUrl URL (hostname and port) of the Ops Manager Application.
    serverPoolKey

    Server Pool Key.

    To find the server pool key, in the Admin menu, go to Server Pool view and click on the Agent Configuration tab.

    serverPoolPropertiesFile

    Absolute filepath of a file that contains server properties. Ensure the MongoDB Agent can read the file.

    The properties file contains key/value pairs of the form <property>=<value>. The Ops Manager Administrator decides on both the property names and values.

    Note

    Ensure that the properties file contains the desired property names and values before starting the Automation on the server.

    Once the server is registered with the pool, changes to the properties file do not take effect until the server is first removed and the Automation restarted.

    serverPoolStateFile

    Absolute filepath of the file to be used by the MongoDB Agent.

    Ensure that the directory path to the file exists and the agent has read and write access to the directory. The file itself need not exist; however, if it does exist, the agent must have read and write access to the file.

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

    mmsBaseUrl=<application URL>
    serverPoolKey=somekeyabc123
    serverPoolPropertiesFile=<path to server properties file>
    serverPoolStateFile=<path to server state file>
    

    Important

    Do not configure the Project settings:

    5

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

    Prepare the data directory.

    The data directory stores MongoDB data and must be owned by the mongod user. For an existing MongoDB deployment, ensure the directory has the mongod user as owner. If no MongoDB deployment exists, create the directory and set the owner.

    The following commands create a data directory and set the owner as the mongod user:

    sudo mkdir /data; sudo chown mongod:mongod /data
    
    7

    Start the MongoDB Agent.

    Issue the following command:

    sudo service mongodb-mms-automation-agent start
    
    8

    Finish the installation of the MongoDB Agent.

    In the Install Agent Instructions modal:

    1. Click Verify Agent to make sure the MongoDB Agent can connect to Ops Manager.
    2. Click Done.
    9

    Repeat the installation procedure for each MongoDB host.

    Running RHEL / CentOS 7.x, SUSE 12, or Amazon Linux 2:

    Using an rpm package:

    1

    Log in to the Ops Manager Application.

    2

    Begin or Manage a Deployment.

    Your project has with no deployments and you see a prompt to get started.

    1. From the Build New Deployment menu, select the type of deployment you wish to add:

    2. If, on the Create New <Deployment> page, Ops Manager cannot detect any hosts with the MongoDB Agent installed, you see a banner displayed at the top of the Create New <Deployment> page.

      Click the see instructions link.

    3. From the Select Your Server’s Operating System menu, click RHEL/CentOS (7.X/8.X), SUSE12, Amazon Linux2 - RPM.

    4. Click Next.

    1. Click Manage your existing deployment.
    2. From the Install Agent menu, click RHEL/CentOS (7.X/8.X), SUSE12, Amazon Linux2 - RPM.
    3

    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-10.2.7.5898.x86_64.rhel7.rpm
    

    Note

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

    4

    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
    

    The changes you make depend whether or not you are using server pools.

    Update the following configuration keys:

    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>
    

    Important

    Do not configure the Server Pool settings:

    Server Pools deprecated as of Ops Manager 4.0

    As of Ops Manager 4.0, server pools are deprecated and disabled by default.

    Update the following configuration keys:

    Key Value
    mmsBaseUrl URL (hostname and port) of the Ops Manager Application.
    serverPoolKey

    Server Pool Key.

    To find the server pool key, in the Admin menu, go to Server Pool view and click on the Agent Configuration tab.

    serverPoolPropertiesFile

    Absolute filepath of a file that contains server properties. Ensure the MongoDB Agent can read the file.

    The properties file contains key/value pairs of the form <property>=<value>. The Ops Manager Administrator decides on both the property names and values.

    Note

    Ensure that the properties file contains the desired property names and values before starting the Automation on the server.

    Once the server is registered with the pool, changes to the properties file do not take effect until the server is first removed and the Automation restarted.

    serverPoolStateFile

    Absolute filepath of the file to be used by the MongoDB Agent.

    Ensure that the directory path to the file exists and the agent has read and write access to the directory. The file itself need not exist; however, if it does exist, the agent must have read and write access to the file.

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

    mmsBaseUrl=<application URL>
    serverPoolKey=somekeyabc123
    serverPoolPropertiesFile=<path to server properties file>
    serverPoolStateFile=<path to server state file>
    

    Important

    Do not configure the Project settings:

    5

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

    Prepare the data directory.

    The data directory stores MongoDB data and must be owned by the mongod user. For an existing MongoDB deployment, ensure the directory has the mongod user as owner. If no MongoDB deployment exists, create the directory and set the owner.

    The following commands create a data directory and set the owner as the mongod user:

    sudo mkdir /data; sudo chown mongod:mongod /data
    
    7

    Start the MongoDB Agent.

    Issue the following command:

    sudo service mongodb-mms-automation-agent start
    
    8

    Finish the installation of the MongoDB Agent.

    In the Install Agent Instructions modal:

    1. Click Verify Agent to make sure the MongoDB Agent can connect to Ops Manager.
    2. Click Done.
    9

    Repeat the installation procedure for each MongoDB host.

    Using a tar archive:

    1

    Log in to the Ops Manager Application.

    2

    Begin or Manage a Deployment.

    Your project has with no deployments and you see a prompt to get started.

    1. From the Build New Deployment menu, select the type of deployment you wish to add:

    2. If, on the Create New <Deployment> page, Ops Manager cannot detect any hosts with the MongoDB Agent installed, you see a banner displayed at the top of the Create New <Deployment> page.

      Click the see instructions link.

    3. From the Select Your Server’s Operating System menu, click RHEL/CentOS (7.X/8.X), SUSE12, Amazon Linux 2 - TAR.

    4. Click Next.

    1. Click Manage your existing deployment.
    2. From the Install Agent menu, click RHEL/CentOS (7.X/8.X), SUSE12, Amazon Linux 2 - TAR.
    3

    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 for 64-bit x86:

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

    Note

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

    4

    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-10.5.0.5938-1.rhel7_x86_64.tar.gz
    
    5

    Change to the extracted binary directory.

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

    cd mongodb-mms-automation-agent-10.2.7.5898.rhel7_x86_64
    
    6

    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
    

    The changes you make depend whether or not you are using server pools.

    Update the following configuration keys:

    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>
    

    Important

    Do not configure the Server Pool settings:

    Server Pools deprecated as of Ops Manager 4.0

    As of Ops Manager 4.0, server pools are deprecated and disabled by default.

    Update the following configuration keys:

    Key Value
    mmsBaseUrl URL (hostname and port) of the Ops Manager Application.
    serverPoolKey

    Server Pool Key.

    To find the server pool key, in the Admin menu, go to Server Pool view and click on the Agent Configuration tab.

    serverPoolPropertiesFile

    Absolute filepath of a file that contains server properties. Ensure the MongoDB Agent can read the file.

    The properties file contains key/value pairs of the form <property>=<value>. The Ops Manager Administrator decides on both the property names and values.

    Note

    Ensure that the properties file contains the desired property names and values before starting the Automation on the server.

    Once the server is registered with the pool, changes to the properties file do not take effect until the server is first removed and the Automation restarted.

    serverPoolStateFile

    Absolute filepath of the file to be used by the MongoDB Agent.

    Ensure that the directory path to the file exists and the agent has read and write access to the directory. The file itself need not exist; however, if it does exist, the agent must have read and write access to the file.

    The resulting changes to the local.config file should look like the following:

    mmsBaseUrl=<application URL>
    serverPoolKey=somekeyabc123
    serverPoolPropertiesFile=<path to server properties file>
    serverPoolStateFile=<path to server state file>
    

    Important

    Do not configure the Project settings:

    7

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

    Create the binary, log, and data directories.

    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>
      
    9

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

    Run the following commands:

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

    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 &
    
    11

    Finish the installation of the MongoDB Agent.

    In the Install Agent Instructions modal:

    1. Click Verify Agent to make sure the MongoDB Agent can connect to Ops Manager.
    2. Click Done.
    12

    Repeat the installation procedure for each MongoDB host.

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

    Using an rpm package:

    1

    Log in to the Ops Manager Application.

    2

    Begin or Manage a Deployment.

    Your project has with no deployments and you see a prompt to get started.

    1. From the Build New Deployment menu, select the type of deployment you wish to add:

    2. If, on the Create New <Deployment> page, Ops Manager cannot detect any hosts with the MongoDB Agent installed, you see a banner displayed at the top of the Create New <Deployment> page.

      Click the see instructions link.

    3. From the Select Your Server’s Operating System menu, click RHEL/CentOS (7.X) Power (ppc64le) - RPM.

    4. Click Next.

    1. Click Manage your existing deployment.
    2. From the Install Agent menu, click RHEL/CentOS (7.X) Power (ppc64le) - RPM.
    3

    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-10.2.7.5898.ppc641e.rhel7.rpm
    

    Note

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

    4

    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
    

    The changes you make depend whether or not you are using server pools.

    Update the following configuration keys:

    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>
    

    Important

    Do not configure the Server Pool settings:

    Server Pools deprecated as of Ops Manager 4.0

    As of Ops Manager 4.0, server pools are deprecated and disabled by default.

    Update the following configuration keys:

    Key Value
    mmsBaseUrl URL (hostname and port) of the Ops Manager Application.
    serverPoolKey

    Server Pool Key.

    To find the server pool key, in the Admin menu, go to Server Pool view and click on the Agent Configuration tab.

    serverPoolPropertiesFile

    Absolute filepath of a file that contains server properties. Ensure the MongoDB Agent can read the file.

    The properties file contains key/value pairs of the form <property>=<value>. The Ops Manager Administrator decides on both the property names and values.

    Note

    Ensure that the properties file contains the desired property names and values before starting the Automation on the server.

    Once the server is registered with the pool, changes to the properties file do not take effect until the server is first removed and the Automation restarted.

    serverPoolStateFile

    Absolute filepath of the file to be used by the MongoDB Agent.

    Ensure that the directory path to the file exists and the agent has read and write access to the directory. The file itself need not exist; however, if it does exist, the agent must have read and write access to the file.

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

    mmsBaseUrl=<application URL>
    serverPoolKey=somekeyabc123
    serverPoolPropertiesFile=<path to server properties file>
    serverPoolStateFile=<path to server state file>
    

    Important

    Do not configure the Project settings:

    5

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

    Prepare the data directory.

    The data directory stores MongoDB data and must be owned by the mongod user. For an existing MongoDB deployment, ensure the directory has the mongod user as owner. If no MongoDB deployment exists, create the directory and set the owner.

    The following commands create a data directory and set the owner as the mongod user:

    sudo mkdir /data; sudo chown mongod:mongod /data
    
    7

    Start the MongoDB Agent.

    Issue the following command:

    sudo service mongodb-mms-automation-agent start
    
    8

    Finish the installation of the MongoDB Agent.

    In the Install Agent Instructions modal:

    1. Click Verify Agent to make sure the MongoDB Agent can connect to Ops Manager.
    2. Click Done.
    9

    Repeat the installation procedure for each MongoDB host.

    Using a tar archive:

    1

    Log in to the Ops Manager Application.

    2

    Begin or Manage a Deployment.

    Your project has with no deployments and you see a prompt to get started.

    1. From the Build New Deployment menu, select the type of deployment you wish to add:

    2. If, on the Create New <Deployment> page, Ops Manager cannot detect any hosts with the MongoDB Agent installed, you see a banner displayed at the top of the Create New <Deployment> page.

      Click the see instructions link.

    3. From the Select Your Server’s Operating System menu, click RHEL/CentOS (7.X) Power (ppc64le) - TAR.

    4. Click Next.

    1. Click Manage your existing deployment.
    2. From the Install Agent menu, click RHEL/CentOS (7.X) Power (ppc64le) - TAR.
    3

    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-10.2.7.5898.rhel7_ppc64le.tar.gz
    

    Note

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

    4

    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-10.5.0.5938-1.rhel7_ppc64le.tar.gz
    
    5

    Change to the extracted binary directory.

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

    cd mongodb-mms-automation-agent-10.2.7.5898.rhel7_ppc64le
    
    6

    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
    

    The changes you make depend whether or not you are using server pools.

    Update the following configuration keys:

    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>
    

    Important

    Do not configure the Server Pool settings:

    Server Pools deprecated as of Ops Manager 4.0

    As of Ops Manager 4.0, server pools are deprecated and disabled by default.

    Update the following configuration keys:

    Key Value
    mmsBaseUrl URL (hostname and port) of the Ops Manager Application.
    serverPoolKey

    Server Pool Key.

    To find the server pool key, in the Admin menu, go to Server Pool view and click on the Agent Configuration tab.

    serverPoolPropertiesFile

    Absolute filepath of a file that contains server properties. Ensure the MongoDB Agent can read the file.

    The properties file contains key/value pairs of the form <property>=<value>. The Ops Manager Administrator decides on both the property names and values.

    Note

    Ensure that the properties file contains the desired property names and values before starting the Automation on the server.

    Once the server is registered with the pool, changes to the properties file do not take effect until the server is first removed and the Automation restarted.

    serverPoolStateFile

    Absolute filepath of the file to be used by the MongoDB Agent.

    Ensure that the directory path to the file exists and the agent has read and write access to the directory. The file itself need not exist; however, if it does exist, the agent must have read and write access to the file.

    The resulting changes to the local.config file should look like the following:

    mmsBaseUrl=<application URL>
    serverPoolKey=somekeyabc123
    serverPoolPropertiesFile=<path to server properties file>
    serverPoolStateFile=<path to server state file>
    

    Important

    Do not configure the Project settings:

    7

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

    Create the binary, log, and data directories.

    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>
      
    9

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

    Run the following commands:

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

    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 &
    
    11

    Finish the installation of the MongoDB Agent.

    In the Install Agent Instructions modal:

    1. Click Verify Agent to make sure the MongoDB Agent can connect to Ops Manager.
    2. Click Done.
    12

    Repeat the installation procedure for each MongoDB host.

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

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

    1

    Log in to the Ops Manager Application.

    2

    Begin or Manage a Deployment.

    Your project has with no deployments and you see a prompt to get started.

    1. From the Build New Deployment menu, select the type of deployment you wish to add:

    2. If, on the Create New <Deployment> page, Ops Manager cannot detect any hosts with the MongoDB Agent installed, you see a banner displayed at the top of the Create New <Deployment> page.

      Click the see instructions link.

    3. From the Select Your Server’s Operating System menu, click RHEL 6.X Z-Series (s390x) - RPM.

    4. Click Next.

    1. Click Manage your existing deployment.
    2. From the Install Agent menu, click RHEL 6.X Z-Series (s390x) - RPM.
    3

    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-10.2.7.5898.s390x.rhel6.rpm
    

    Note

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

    4

    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
    

    The changes you make depend whether or not you are using server pools.

    Update the following configuration keys:

    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>
    

    Important

    Do not configure the Server Pool settings:

    Server Pools deprecated as of Ops Manager 4.0

    As of Ops Manager 4.0, server pools are deprecated and disabled by default.

    Update the following configuration keys:

    Key Value
    mmsBaseUrl URL (hostname and port) of the Ops Manager Application.
    serverPoolKey

    Server Pool Key.

    To find the server pool key, in the Admin menu, go to Server Pool view and click on the Agent Configuration tab.

    serverPoolPropertiesFile

    Absolute filepath of a file that contains server properties. Ensure the MongoDB Agent can read the file.

    The properties file contains key/value pairs of the form <property>=<value>. The Ops Manager Administrator decides on both the property names and values.

    Note

    Ensure that the properties file contains the desired property names and values before starting the Automation on the server.

    Once the server is registered with the pool, changes to the properties file do not take effect until the server is first removed and the Automation restarted.

    serverPoolStateFile

    Absolute filepath of the file to be used by the MongoDB Agent.

    Ensure that the directory path to the file exists and the agent has read and write access to the directory. The file itself need not exist; however, if it does exist, the agent must have read and write access to the file.

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

    mmsBaseUrl=<application URL>
    serverPoolKey=somekeyabc123
    serverPoolPropertiesFile=<path to server properties file>
    serverPoolStateFile=<path to server state file>
    

    Important

    Do not configure the Project settings:

    5

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

    Prepare the data directory.

    The data directory stores MongoDB data and must be owned by the mongod user. For an existing MongoDB deployment, ensure the directory has the mongod user as owner. If no MongoDB deployment exists, create the directory and set the owner.

    The following commands create a data directory and set the owner as the mongod user:

    sudo mkdir /data; sudo chown mongod:mongod /data
    
    7

    Start the MongoDB Agent.

    Issue the following command:

    sudo service mongodb-mms-automation-agent start
    
    8

    Finish the installation of the MongoDB Agent.

    In the Install Agent Instructions modal:

    1. Click Verify Agent to make sure the MongoDB Agent can connect to Ops Manager.
    2. Click Done.
    9

    Repeat the installation procedure for each MongoDB host.

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

    1

    Log in to the Ops Manager Application.

    2

    Begin or Manage a Deployment.

    Your project has with no deployments and you see a prompt to get started.

    1. From the Build New Deployment menu, select the type of deployment you wish to add:

    2. If, on the Create New <Deployment> page, Ops Manager cannot detect any hosts with the MongoDB Agent installed, you see a banner displayed at the top of the Create New <Deployment> page.

      Click the see instructions link.

    3. From the Select Your Server’s Operating System menu, click RHEL 7.X Z-Series (s390x) - RPM.

    4. Click Next.

    1. Click Manage your existing deployment.
    2. From the Install Agent menu, click RHEL 7.X Z-Series (s390x) - RPM.
    3

    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-10.2.7.5898.s390x.rhel7.rpm
    

    Note

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

    4

    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
    

    The changes you make depend whether or not you are using server pools.

    Update the following configuration keys:

    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>
    

    Important

    Do not configure the Server Pool settings:

    Server Pools deprecated as of Ops Manager 4.0

    As of Ops Manager 4.0, server pools are deprecated and disabled by default.

    Update the following configuration keys:

    Key Value
    mmsBaseUrl URL (hostname and port) of the Ops Manager Application.
    serverPoolKey

    Server Pool Key.

    To find the server pool key, in the Admin menu, go to Server Pool view and click on the Agent Configuration tab.

    serverPoolPropertiesFile

    Absolute filepath of a file that contains server properties. Ensure the MongoDB Agent can read the file.

    The properties file contains key/value pairs of the form <property>=<value>. The Ops Manager Administrator decides on both the property names and values.

    Note

    Ensure that the properties file contains the desired property names and values before starting the Automation on the server.

    Once the server is registered with the pool, changes to the properties file do not take effect until the server is first removed and the Automation restarted.

    serverPoolStateFile

    Absolute filepath of the file to be used by the MongoDB Agent.

    Ensure that the directory path to the file exists and the agent has read and write access to the directory. The file itself need not exist; however, if it does exist, the agent must have read and write access to the file.

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

    mmsBaseUrl=<application URL>
    serverPoolKey=somekeyabc123
    serverPoolPropertiesFile=<path to server properties file>
    serverPoolStateFile=<path to server state file>
    

    Important

    Do not configure the Project settings:

    5

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

    Prepare the data directory.

    The data directory stores MongoDB data and must be owned by the mongod user. For an existing MongoDB deployment, ensure the directory has the mongod user as owner. If no MongoDB deployment exists, create the directory and set the owner.

    The following commands create a data directory and set the owner as the mongod user:

    sudo mkdir /data; sudo chown mongod:mongod /data
    
    7

    Start the MongoDB Agent.

    Issue the following command:

    sudo service mongodb-mms-automation-agent start
    
    8

    Finish the installation of the MongoDB Agent.

    In the Install Agent Instructions modal:

    1. Click Verify Agent to make sure the MongoDB Agent can connect to Ops Manager.
    2. Click Done.
    9

    Repeat the installation procedure for each MongoDB host.