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 Automation Agent on Windows

Overview

Ops Manager Automation relies on an Automation Agent, which must be installed on every server that runs a monitored MongoDB deployment. The Automation Agents periodically poll Ops Manager to determine the goal configuration, deploy changes as needed, and report deployment status back to Ops Manager.

Automation Agents can run only on 64-bit architectures.

Prerequisites

Server Networking Access

The hosts that serve the MongoDB deployments must:

  • Have full networking access to each other through their fully qualified domain names (FQDNs). Each host must be able to reach every other host through the FQDN.

    To find the FQDN for each host:

    • On Linux / macOS hosts, run the following command in the shell:

      hostname -f
      
    • On Windows hosts, run the following command in Powershell:

      net config workstation | findstr /C:"Full Computer name"
      
  • Resolve each FQDN to a unique IP address.

    Run the following domain internet groper (dig) shell command to find the host’s IP address.

    dig +short myip.opendns.com @resolver1.opendns.com
    

    Note

    dig is available for Microsoft Windows. Download and install the BIND tools from http://www.isc.org/downloads/

  • Set the Common Name or Subject Alternative Name value of any SSL certificates to the MongoDB host’s FQDN.

The network configuration must allow each Automation Agent to make a direct connection to every MongoDB deployment listed on the Deployment page. Ops Manager does not support port forwarding.

Installing to a Server that Already Runs MongoDB

If you install the Automation Agent to a server that is already running a MongoDB process, the agent must have:

  • Permission to stop the MongoDB process. The Automation Agent will restart the process using the agent’s own set of MongoDB binaries. If you had installed MongoDB with a package manager, use the same package manager to install the Automation Agent. This gives the agent the same owner as MongoDB.
  • Read and Write permissions on the MongoDB data directory and log directory.
  • Permission to stop, start, and update any existing Monitoring and Backup Agents.

Installing to a Server Before Installing MongoDB

If you deploy the Automation Agent to a server that does not have MongoDB installed, ensure the user that owns the Automation Agent has Read and Write permissions on the MongoDB data and log directories you plan to use.

Important

Windows Firewall stealth mode should be disabled on the MongoDB servers on which the Automation Agent is installed for best performance.

Procedure

This section includes procedures for both installing and updating the Automation Agent.

Install the Automation Agent on Windows

You can also access install instructions in Ops Manager, including commands you can copy and paste: click Deployment, then Agents, then Downloads & Settings.

1

Login to Ops Manager.

2

Begin or Manage a Deployment

When you reach the Install an Automation Agent on each server page, each server is listed.

  1. Click on the Install Agent menu of the first MongoDB server.
  2. Select Windows - MSI.
3

Install the Automation Agent

  1. The Automation Agent Installation Instructions box displays the following information:

    • Base URL (Required for either binding to a group or adding the server to a server pool)
    • Group ID (Required for binding to a group)
    • API Key (Required for binding to a group)

    Some or all of these values are required in a later step, so keep this box open.

  2. After the MSI downloads, double-click the mongodb-mms-automation-agent-<version>.windows_x86_64.msi

  3. If a security warning appears, click Run.

  4. At the Configuration/Log Folder step, provide the directory into which these files are saved.

  5. At the Key Type Step, select Agent API Key to either bind to a specific group or select Server Pool Key to add the server to a server pool.

  6. Enter the appropriate keys.

    • If you selected Agent API Key, at the Ops Manager Base URL and Agent API Key step, enter the values from the dialog box in the corresponding fields.

    - or -

    • If you selected Server Pool Key, Ops Manager Base URL and Server API Key step, enter the base url value from the dialog box and enter the 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.

  1. Specify the Log and Backup directories.
  2. Click Finish once setup is complete.
4

Verify the Automation Agent is running.

The Automation Agent starts automatically after installation. This step verifies that it is running and can communicate with Ops Manager.

5

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

By default, the Automation Agent binaries and Ops Manager configuration backup file are located in %SystemDrive%\MMSAutomation\versions.

Note

Windows sets the %SystemDrive% environment variable to C: by default. To find your %SystemDrive%, issue with following command from a PowerShell prompt:

get-childitem env:SystemDrive

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

To change the location of the Automation Agent Binaries:

  1. Click Deployment; 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 (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 Automation Agent. You can do this using Windows Explorer or issue the following command from a PowerShell prompt:

    md \<newPath>
    

    Important

    Make sure the system user that runs the Automation 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 Automation Agent configuration backup:

  1. Open the Automation 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.

  3. Save the Automation Agent configuration file.

  4. Move the configuration backup file to the new directory. You can do this using Windows Explorer or issue the following command from a PowerShell prompt:

    move %SystemDrive%\MMSAutomation\versions\mms-cluster-config-backup.json \<newPath>
    
6

Repeat installation procedure for each MongoDB server.

Update the Automation Agent on Windows

Important

The preferred way to update the Automation Agent is through the Ops Manager UI. If an Automation Agent is out of date, Ops Manager displays a warning on the Deployment page and provides a link to perform the update automatically.

1
2

Shut down the Automation Agent.

  1. Click the Start button.
  2. Click Administrative Tools.
  3. Click Services.
  4. Right-click on the MMS Automation Agent and select Stop.
3

Download the latest agent.

From a Powershell prompt, issue the following command, where <OpsManagerHost> is the hostname of your Ops Manager installation (for example, onprem.example.net):

$client = new-object System.Net.WebClient
$client.DownloadFile("https://<OpsManagerHost>:<Port>/download/agent/automation/mongodb-mms-automation-agent-latest.windows_x86_64.msi,"C:\Temp\mongodb-mms-automation-agent-latest.windows_x86_64.msi")

The protocol can be http: or https: depending upon whether or not you have configured SSL connections to Ops Manager.

4

Install the Automation Agent

  1. After the MSI downloads, double-click the mongodb-mms-automation-agent-<version>.windows_x86_64.msi
  2. If a security warning appears, click Run.
  3. Verify that the Destination Folder installation path and Configuration/Log Folder paths are correct.
  4. At the Key Type and the following key values steps, verify the provided values.
  5. At the Automation Paths step, verify the provided paths.
  6. Click Install.
  7. Click Finish once installation is complete.
5

Login to Ops Manager.

6

Verify the Automation Agent is running.

The Deployment page should display after login.

  1. Click on the stacked box icon next to Servers.
  2. Verify that the Automation Agent is showing the correct version.
7

Repeat installation procedure for each MongoDB server.