Docs Menu
Docs Home
/
MongoDB Cloud Manager
/ /

Update from the legacy Monitoring Agent

You have a project with monitored MongoDB deployments that Automation does not manage and want to update to the MongoDB Agent.

Note

Review the Prerequisites First

If you want to start or continue using Automation to manage your MongoDB deployments, please review the MongoDB Agent Prerequisites before updating to the MongoDB Agent.

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

1
2

The Update to MongoDB Agent page opens to start the update process. The Introducing the MongoDB Agent step displays. When you have finished reading this step, click Next.

3

If Automation did not manage your Monitoring Agent, you can add any Monitoring settings you had before at the Add Custom Configuration Options for your MongoDB Agent (Optional) step.

To add options that you had for your Monitoring Agent, under the Monitoring Configurations section:

  1. Type the desired setting in the Setting box and the corresponding value in the Value box.

  2. To add more than one Setting, click the + Add Setting link. Another row appears.

  3. Repeat until all settings have been added.

  4. Once you have added all the settings necessary for your deployment, click Next.

You can click the to remove any settings that you have added.

Important

Cloud Manager does not validate any of these settings. Make sure that the settings and values are correct.

4
  1. Click View Agent Install Instructions. The Install Agent Instructions modal opens.

  2. From the Select Your Server's Operating System menu, select Windows - MSI.

  3. Click Next. The Install New MongoDB Agent modal opens.

5

The MongoDB Agent Installation Instructions box displays the following information:

  • Project ID (Required for binding to a project)

  • API Key

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

Warning

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

6
  1. After the MSI downloads, double-click:

    mongodb-mms-automation-agent-<VERSION>.windows_x86_64.msi

    Note

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

  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 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, disable it now. 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 Prompt 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, 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 Cloud Manager project.
MMSGROUPID
Required
Unique Identifier of your Cloud Manager project.
CONFIGLOGDIR
Optional
Absolute file path to which Cloud Manager should write the MongoDB Agent configuration file.
LOGFILE
Optional
Absolute file path to which Cloud Manager should write the MongoDB Agent log
MMSCONFIGBACKUP
Optional
Absolute file path to the Cloud Manager automation configuration backup JSON file.

Example

To install the MongoDB Agent unattended, 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"
7

Finish the installation of the MongoDB Agent. In the Install Agent Instructions modal, click Done.

8

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

Important

All authentication SCRAM, LDAP, and Kerberos credentials from legacy Agents are retained after the update. All .pem key files are retained as well.

Click Next.

9

Your system policies or practices may require the MongoDB binaries and Cloud Manager configuration backup file to be located somewhere other than the default location of %SystemDrive%\MMSMongoDB\versions.

Note

Windows sets the %SystemDrive% environment variable to the drive on which you installed Windows. By default, you are 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. In MongoDB Cloud Manager, go to the Deployment page for your project.

    1. If it is not already displayed, select the organization that contains your desired project from the Organizations menu in the navigation bar.

    2. If it's not already displayed, select your desired project from the Projects menu in the navigation bar.

    3. If the Deployment page is not already displayed, click Deployment in the sidebar.

      The Deployment page displays.

  2. Click the Agents tab for your deployment.

    The Agents page displays.

  3. Click the Downloads & Settings tab.

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

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

  6. Click Save.

  7. 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 that 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 in the following example 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>
10

Use this procedure to update to the MongoDB Agent:

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

1
2

The Update to MongoDB Agent page opens to start the update process. The Introducing the MongoDB Agent step displays. When you have finished reading this step, click Next.

3

If Automation did not manage your Monitoring Agent, you can add any Monitoring settings you had before at the Add Custom Configuration Options for your MongoDB Agent (Optional) step.

To add options that you had for your Monitoring Agent, under the Monitoring Configurations section:

  1. Type the desired setting in the Setting box and the corresponding value in the Value box.

  2. To add more than one Setting, click the + Add Setting link. Another row appears.

  3. Repeat until all settings have been added.

  4. Once you have added all the settings necessary for your deployment, click Next.

You can click the to remove any settings that you have added.

Important

Cloud Manager does not validate any of these settings. Make sure that the settings and values are correct.

4
  1. Click View Agent Install Instructions. The Install Agent Instructions modal opens.

  2. From the Select Your Server's Operating System menu, select Debian 8/9, Ubuntu 16.X/18.X - DEB.

  3. Click Next. The Install New MongoDB Agent modal opens.

5

Note

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

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

curl -OL https://cloud.mongodb.com/download/agent/automation/mongodb-mms-automation-agent-manager-latest.amd64.ubuntu1604.deb
6

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

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

Update the following configuration options:

Key
Value
ProjectID of your project.
Agent API key of your project.
7

To configure the MongoDB Agent to connect to Cloud 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 theautomation-agent.config file in your preferred text editor.

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

Add the following configuration key:

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

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
9

Issue the following command:

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

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

Important

All authentication SCRAM, LDAP, and Kerberos credentials from legacy Agents are retained after the update. All .pem key files are retained as well.

Click Next.

11

In the Install Agent Instructions modal, click Done.

12

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

1
2

The Update to MongoDB Agent page opens to start the update process. The Introducing the MongoDB Agent step displays. When you have finished reading this step, click Next.

3

If Automation did not manage your Monitoring Agent, you can add any Monitoring settings you had before at the Add Custom Configuration Options for your MongoDB Agent (Optional) step.

To add options that you had for your Monitoring Agent, under the Monitoring Configurations section:

  1. Type the desired setting in the Setting box and the corresponding value in the Value box.

  2. To add more than one Setting, click the + Add Setting link. Another row appears.

  3. Repeat until all settings have been added.

  4. Once you have added all the settings necessary for your deployment, click Next.

You can click the to remove any settings that you have added.

Important

Cloud Manager does not validate any of these settings. Make sure that the settings and values are correct.

4
  1. Click View Agent Install Instructions. The Install Agent Instructions modal opens.

  2. From the Select Your Server's Operating System menu, select Ubuntu 18.X Z-Series (s390x) - DEB.

  3. Click Next. The Install New MongoDB Agent modal opens.

5

Note

Starting with this step, follow the MongoDB Agent installation modal and copy the provided commands 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://cloud.mongodb.com/download/agent/automation/mongodb-mms-automation-agent-manager-latest.s390x.ubuntu1804.deb
6

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

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

Update the following configuration options:

Key
Value
ProjectID of your project.
Agent API key of your project.
7

To configure the MongoDB Agent to connect to Cloud 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 theautomation-agent.config file in your preferred text editor.

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

Add the following configuration key:

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

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
9

Issue the following command:

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

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

Important

All authentication SCRAM, LDAP, and Kerberos credentials from legacy Agents are retained after the update. All .pem key files are retained as well.

Click Next.

11

In the Install Agent Instructions modal, click Done.

12

Use this procedure to update to the MongoDB Agent:

On x86_64 architecture:

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

1
2

The Update to MongoDB Agent page opens to start the update process. The Introducing the MongoDB Agent step displays. When you have finished reading this step, click Next.

3

If Automation did not manage your Monitoring Agent, you can add any Monitoring settings you had before at the Add Custom Configuration Options for your MongoDB Agent (Optional) step.

To add options that you had for your Monitoring Agent, under the Monitoring Configurations section:

  1. Type the desired setting in the Setting box and the corresponding value in the Value box.

  2. To add more than one Setting, click the + Add Setting link. Another row appears.

  3. Repeat until all settings have been added.

  4. Once you have added all the settings necessary for your deployment, click Next.

You can click the to remove any settings that you have added.

Important

Cloud Manager does not validate any of these settings. Make sure that the settings and values are correct.

4
  1. Click View Agent Install Instructions. The Install Agent Instructions modal opens.

  2. From the Select Your Server's Operating System menu, select Amazon Linux - RPM.

  3. Click Next. The Install New MongoDB Agent modal opens.

5

Note

Starting with this step, follow the MongoDB Agent installation modal and copy the provided commands 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://cloud.mongodb.com/download/agent/automation/mongodb-mms-automation-agent-manager-latest.x86_64.rpm
6

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

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

Update the following configuration options:

Key
Value
ProjectID of your project.
Agent API key of your project.
7

To configure the MongoDB Agent to connect to Cloud 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 theautomation-agent.config file in your preferred text editor.

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

Add the following configuration key:

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

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
9

Issue the following command:

sudo service mongodb-mms-automation-agent start
10

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

Important

All authentication SCRAM, LDAP, and Kerberos credentials from legacy Agents are retained after the update. All .pem key files are retained as well.

Click Next.

11

In the Install Agent Instructions modal, click Done.

12

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

Using an rpm package:

1
2

The Update to MongoDB Agent page opens to start the update process. The Introducing the MongoDB Agent step displays. When you have finished reading this step, click Next.

3

If Automation did not manage your Monitoring Agent, you can add any Monitoring settings you had before at the Add Custom Configuration Options for your MongoDB Agent (Optional) step.

To add options that you had for your Monitoring Agent, under the Monitoring Configurations section:

  1. Type the desired setting in the Setting box and the corresponding value in the Value box.

  2. To add more than one Setting, click the + Add Setting link. Another row appears.

  3. Repeat until all settings have been added.

  4. Once you have added all the settings necessary for your deployment, click Next.

You can click the to remove any settings that you have added.

Important

Cloud Manager does not validate any of these settings. Make sure that the settings and values are correct.

4
  1. Click View Agent Install Instructions. The Install Agent Instructions modal opens.

  2. From the Select Your Server's Operating System menu, select RHEL/CentOS (7.X), SUSE12, Amazon Linux2 - RPM.

  3. Click Next. The Install New MongoDB Agent modal opens.

5

Note

Starting with this step, follow the MongoDB Agent installation modal and copy the provided commands 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://cloud.mongodb.com/download/agent/automation/mongodb-mms-automation-agent-manager-latest.x86_64.rhel7.rpm
6

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

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

Update the following configuration options:

Key
Value
ProjectID of your project.
Agent API key of your project.
7

To configure the MongoDB Agent to connect to Cloud 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 theautomation-agent.config file in your preferred text editor.

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

Add the following configuration key:

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

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
9

Issue the following command:

sudo service mongodb-mms-automation-agent start
10

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

Important

All authentication SCRAM, LDAP, and Kerberos credentials from legacy Agents are retained after the update. All .pem key files are retained as well.

Click Next.

11

In the Install Agent Instructions modal, click Done.

12

Using a tar archive:

1
2

The Update to MongoDB Agent page opens to start the update process. The Introducing the MongoDB Agent step displays. When you have finished reading this step, click Next.

3

If Automation did not manage your Monitoring Agent, you can add any Monitoring settings you had before at the Add Custom Configuration Options for your MongoDB Agent (Optional) step.

To add options that you had for your Monitoring Agent, under the Monitoring Configurations section:

  1. Type the desired setting in the Setting box and the corresponding value in the Value box.

  2. To add more than one Setting, click the + Add Setting link. Another row appears.

  3. Repeat until all settings have been added.

  4. Once you have added all the settings necessary for your deployment, click Next.

You can click the to remove any settings that you have added.

Important

Cloud Manager does not validate any of these settings. Make sure that the settings and values are correct.

4
  1. Click View Agent Install Instructions. The Install Agent Instructions modal opens.

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

  3. Click Next. The Install New MongoDB Agent modal opens.

5

Note

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

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

curl -OL https://cloud.mongodb.com/download/agent/automation/mongodb-mms-automation-agent-manager-latest.rhel7_x86_64.tar.gz
6

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

To install the MongoDB Agent, extract the archive:

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

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

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

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

vi <install-path>/local.config

Update the following configuration options:

Key
Value
ProjectID of your project.
Agent API key of your project.
9

To configure the MongoDB Agent to connect to Cloud 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 thelocal.config file in your preferred text editor.

vi <install-path>/local.config

Add the following configuration key:

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

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

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

Note

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

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

Run the following commands to create the directories:

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

By default, the Agent binaries and Cloud 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. In MongoDB Cloud Manager, go to the Deployment page for your project.

    1. If it is not already displayed, select the organization that contains your desired project from the Organizations menu in the navigation bar.

    2. If it's not already displayed, select your desired project from the Projects menu in the navigation bar.

    3. If the Deployment page is not already displayed, click Deployment in the sidebar.

      The Deployment page displays.

  2. Click the Agents tab for your deployment.

    The Agents page displays.

  3. Change the path.

    1. Click Downloads & Settings.

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

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

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
12

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

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

Important

All authentication SCRAM, LDAP, and Kerberos credentials from legacy Agents are retained after the update. All .pem key files are retained as well.

Click Next.

14

In the Install Agent Instructions modal, click Done.

15

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

Using an rpm package:

1
2

The Update to MongoDB Agent page opens to start the update process. The Introducing the MongoDB Agent step displays. When you have finished reading this step, click Next.

3

If Automation did not manage your Monitoring Agent, you can add any Monitoring settings you had before at the Add Custom Configuration Options for your MongoDB Agent (Optional) step.

To add options that you had for your Monitoring Agent, under the Monitoring Configurations section:

  1. Type the desired setting in the Setting box and the corresponding value in the Value box.

  2. To add more than one Setting, click the + Add Setting link. Another row appears.

  3. Repeat until all settings have been added.

  4. Once you have added all the settings necessary for your deployment, click Next.

You can click the to remove any settings that you have added.

Important

Cloud Manager does not validate any of these settings. Make sure that the settings and values are correct.

4
  1. Click View Agent Install Instructions. The Install Agent Instructions modal opens.

  2. From the Select Your Server's Operating System menu, select RHEL/CentOS (7.X), SUSE12, Amazon Linux2 - RPM.

  3. Click Next. The Install New MongoDB Agent modal opens.

5

Note

Starting with this step, follow the MongoDB Agent installation modal and copy the provided commands 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://cloud.mongodb.com/download/agent/automation/mongodb-mms-automation-agent-manager-latest.ppc641e.rhel7.rpm
6

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

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

Update the following configuration options:

Key
Value
ProjectID of your project.
Agent API key of your project.
7

To configure the MongoDB Agent to connect to Cloud 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 theautomation-agent.config file in your preferred text editor.

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

Add the following configuration key:

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

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
9

Issue the following command:

sudo service mongodb-mms-automation-agent start
10

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

Important

All authentication SCRAM, LDAP, and Kerberos credentials from legacy Agents are retained after the update. All .pem key files are retained as well.

Click Next.

11

In the Install Agent Instructions modal, click Done.

12

Using a tar archive:

1
2

The Update to MongoDB Agent page opens to start the update process. The Introducing the MongoDB Agent step displays. When you have finished reading this step, click Next.

3

If Automation did not manage your Monitoring Agent, you can add any Monitoring settings you had before at the Add Custom Configuration Options for your MongoDB Agent (Optional) step.

To add options that you had for your Monitoring Agent, under the Monitoring Configurations section:

  1. Type the desired setting in the Setting box and the corresponding value in the Value box.

  2. To add more than one Setting, click the + Add Setting link. Another row appears.

  3. Repeat until all settings have been added.

  4. Once you have added all the settings necessary for your deployment, click Next.

You can click the to remove any settings that you have added.

Important

Cloud Manager does not validate any of these settings. Make sure that the settings and values are correct.

4
  1. Click View Agent Install Instructions. The Install Agent Instructions modal opens.

  2. From the Select Your Server's Operating System menu, select RHEL/CentOS (7.X) Power (ppc64le) - TAR.

  3. Click Next. The Install New MongoDB Agent modal opens.

5

Note

Starting with this step, follow the MongoDB Agent installation modal and copy the provided commands 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://cloud.mongodb.com/download/agent/automation/mongodb-mms-automation-agent-manager-latest.rhel7_ppc64le.tar.gz
6

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

To install the MongoDB Agent, extract the archive:

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

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

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

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

vi <install-path>/local.config

Update the following configuration options:

Key
Value
ProjectID of your project.
Agent API key of your project.
9

To configure the MongoDB Agent to connect to Cloud 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 thelocal.config file in your preferred text editor.

vi <install-path>/local.config

Add the following configuration key:

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

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

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

Note

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

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

Run the following commands to create the directories:

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

By default, the Agent binaries and Cloud 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. In MongoDB Cloud Manager, go to the Deployment page for your project.

    1. If it is not already displayed, select the organization that contains your desired project from the Organizations menu in the navigation bar.

    2. If it's not already displayed, select your desired project from the Projects menu in the navigation bar.

    3. If the Deployment page is not already displayed, click Deployment in the sidebar.

      The Deployment page displays.

  2. Click the Agents tab for your deployment.

    The Agents page displays.

  3. Change the path.

    1. Click Downloads & Settings.

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

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

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
12

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

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

Important

All authentication SCRAM, LDAP, and Kerberos credentials from legacy Agents are retained after the update. All .pem key files are retained as well.

Click Next.

14

In the Install Agent Instructions modal, click Done.

15

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

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

1
2

The Update to MongoDB Agent page opens to start the update process. The Introducing the MongoDB Agent step displays. When you have finished reading this step, click Next.

3

If Automation did not manage your Monitoring Agent, you can add any Monitoring settings you had before at the Add Custom Configuration Options for your MongoDB Agent (Optional) step.

To add options that you had for your Monitoring Agent, under the Monitoring Configurations section:

  1. Type the desired setting in the Setting box and the corresponding value in the Value box.

  2. To add more than one Setting, click the + Add Setting link. Another row appears.

  3. Repeat until all settings have been added.

  4. Once you have added all the settings necessary for your deployment, click Next.

You can click the to remove any settings that you have added.

Important

Cloud Manager does not validate any of these settings. Make sure that the settings and values are correct.

4
  1. Click View Agent Install Instructions. The Install Agent Instructions modal opens.

  2. From the Select Your Server's Operating System menu, select RHEL 7.X/8X Z-Series (s390x) - RPM.

  3. Click Next. The Install New MongoDB Agent modal opens.

5

Note

Starting with this step, follow the MongoDB Agent installation modal and copy the provided commands 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.X/8.X for IBM zSeries:

curl -OL https://cloud.mongodb.com/download/agent/automation/mongodb-mms-automation-agent-manager-latest.s390x.rhel7.rpm
6

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

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

Update the following configuration options:

Key
Value
ProjectID of your project.
Agent API key of your project.
7

To configure the MongoDB Agent to connect to Cloud 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 theautomation-agent.config file in your preferred text editor.

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

Add the following configuration key:

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

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
9

Issue the following command:

sudo service mongodb-mms-automation-agent start
10

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

Important

All authentication SCRAM, LDAP, and Kerberos credentials from legacy Agents are retained after the update. All .pem key files are retained as well.

Click Next.

11

In the Install Agent Instructions modal, click Done.

12

Use this procedure to install update to the MongoDB Agent on Linux systems that do not use deb or rpm packages.

1
2

The Update to MongoDB Agent page opens to start the update process. The Introducing the MongoDB Agent step displays. When you have finished reading this step, click Next.

3

If Automation did not manage your Monitoring Agent, you can add any Monitoring settings you had before at the Add Custom Configuration Options for your MongoDB Agent (Optional) step.

To add options that you had for your Monitoring Agent, under the Monitoring Configurations section:

  1. Type the desired setting in the Setting box and the corresponding value in the Value box.

  2. To add more than one Setting, click the + Add Setting link. Another row appears.

  3. Repeat until all settings have been added.

  4. Once you have added all the settings necessary for your deployment, click Next.

You can click the to remove any settings that you have added.

Important

Cloud Manager does not validate any of these settings. Make sure that the settings and values are correct.

4
  1. Click View Agent Install Instructions. The Install Agent Instructions modal opens.

  2. From the Select Your Server's Operating System menu, select Other Linux - TAR.

  3. Click Next. The Install New MongoDB Agent modal opens.

5

Note

Starting with this step, follow the MongoDB Agent installation modal and copy the provided commands 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://cloud.mongodb.com/download/agent/automation/mongodb-mms-automation-agent-manager-latest.linux_x86_64.tar.gz
6

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

To install the MongoDB Agent, extract the archive:

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

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

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

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

vi <install-path>/local.config

Update the following configuration options:

Key
Value
ProjectID of your project.
Agent API key of your project.
9

To configure the MongoDB Agent to connect to Cloud 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 thelocal.config file in your preferred text editor.

vi <install-path>/local.config

Add the following configuration key:

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

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

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

Note

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

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

Run the following commands to create the directories:

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

By default, the Agent binaries and Cloud 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. In MongoDB Cloud Manager, go to the Deployment page for your project.

    1. If it is not already displayed, select the organization that contains your desired project from the Organizations menu in the navigation bar.

    2. If it's not already displayed, select your desired project from the Projects menu in the navigation bar.

    3. If the Deployment page is not already displayed, click Deployment in the sidebar.

      The Deployment page displays.

  2. Click the Agents tab for your deployment.

    The Agents page displays.

  3. Change the path.

    1. Click Downloads & Settings.

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

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

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
12

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

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

Important

All authentication SCRAM, LDAP, and Kerberos credentials from legacy Agents are retained after the update. All .pem key files are retained as well.

Click Next.

14

At the Final Steps modal, the legacy Backup and Monitoring Agents are put into standby mode. Click Finish.

15

After the MongoDB Agent update completes:

  • If Automation did not previously manage your Monitoring Agent, activate Backup and/or Monitoring on your MongoDB deployment.

  • If Automation did previously manage your Monitoring Agent, it is now activated. To verify that Automation is activated:

    1
    1. If it is not already displayed, select the organization that contains your desired project from the Organizations menu in the navigation bar.

    2. If it's not already displayed, select your desired project from the Projects menu in the navigation bar.

    3. If the Deployment page is not already displayed, click Deployment in the sidebar.

      The Deployment page displays.

    2

    Click the Servers tab for your deployment.

    The Servers page displays.

  • If you want to activate Automation, add a deployment to your MongoDB project.

  • Stop and remove the legacy Monitoring Agent.

  • Stop and remove the legacy Backup Agent.

Back

All Legacy Agents