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

Install the MongoDB Agent to Manage Deployments

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

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

3

Download the MongoDB Agent.

The MongoDB Agent Installation Instructions box displays the following information:

  • Base URL

    Required for binding to a project.

  • 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-<VERSION>.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.

  5. Enter the appropriate agent keys.

    Note

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

    • Type your Base URL into the Base URL field.
    • Type your Project ID into the Project ID field.
    • Type your Agent API Key into the Agent API Key field.
  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.

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.

Was this page helpful?