This is one stop global knowledge base where you can learn about all the products, solutions and support features.
On this page
Removing a process from monitoring means Cloud Manager no longer displays its status or tracks its metrics. You must terminate the deployment’s backups before you can remove a monitored deployment.
Follow this procedure to remove one monitored process from Cloud Manager.
For replica sets, select
Remove from Replica Set
.
For
mongod
processes in a sharded replica set, select
Remove From Shard
. For
mongos
processes,
select
Remove from Cluster
.
For replica sets, select
Remove from Replica Set
.
For
mongod
processes in a sharded replica set, select
Remove From Shard
. For
mongos
processes,
select
Remove from Cluster
.
The process that you removed earlier now appears as a standalone
process. However,
mongos
processes are automatically removed
from the cluster and do not appear.
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:
Your project has no deployments and you see a prompt to get started.
From the Build New Deployment menu, select the type of deployment you wish to add:
If, on the Create New <Deployment> page, Cloud 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.
From the Select Your Server’s Operating System menu, click Windows - MSI .
Click Next .
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 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.
After the
MSI
downloads, double-click:
mongodb-mms-automation-agent-<VERSION>.windows_x86_64.msi
If a security warning appears, click Run .
At the Configuration/Log Folder step
Provide the directory into which these files are saved.
At the Key Type step, select Agent API Key to bind to a specific project .
Enter the appropriate agent keys.
Note
These keys are provided in the MongoDB Agent Installation Instructions modal described in the previous step.
At the MongoDB Paths step, specify the Log and Backup directories
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.
(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 .
(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.
Click Install .
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 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, 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"
In the Install Agent Instructions modal:
By default, the MongoDB binaries and Cloud 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
Click Deployment , then Agents , and then Downloads & Settings .
Below the Download Directory heading, click edit icon to the right of the path shown in Download Directory (Windows) .
Change the path to the new path you want.
Click Save .
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
Open the MongoDB Agent configuration file in your preferred text editor.
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
Save the MongoDB Agent configuration file.
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>
Use this procedure to install the MongoDB Agent:
Important
Starting with
version 10.24.0.6714-1
, when you install the MongoDB Agent
using
deb
or
rpm
packages, the package doesn’t add
MongoDB binaries to the
PATH
environment variable.
If your deployment depends on the presence of MongoDB binaries in
the
PATH
, you must manually add the paths to MongoDB
binaries to the
PATH
. To learn how to update environment
variables, refer to your operating system’s documentation.
On x86_64 architecture running Debian 8/9/10/11 or Ubuntu 18.04/20.04:
Your project has no deployments and you see a prompt to get started.
From the Build New Deployment menu, select the type of deployment you wish to add:
If, on the Create New <Deployment> page, Cloud 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.
From the Select Your Server’s Operating System menu, click Debian 8/9/10/11, Ubuntu 16.X/18.X/20.x - DEB .
Click Next .
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 or Debian 8/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
In the directory where you installed the MongoDB Agent, open the
automation-agent.config
file in your preferred text editor.
sudo vi /etc/mongodb-mms/automation-agent.config
Update the following configuration options:
Key | Value |
---|---|
mmsGroupId
|
ProjectID
of your project.
|
mmsApiKey
|
Agent API key of your project. |
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 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. |
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
Issue the following command:
sudo systemctl start mongodb-mms-automation-agent.service
In the Install Agent Instructions modal:
Use this procedure to install the MongoDB Agent:
On x86_64 architecture:
Important
Starting with
version 10.24.0.6714-1
, when you install the MongoDB Agent
using
deb
or
rpm
packages, the package doesn’t add
MongoDB binaries to the
PATH
environment variable.
If your deployment depends on the presence of MongoDB binaries in
the
PATH
, you must manually add the paths to MongoDB
binaries to the
PATH
. To learn how to update environment
variables, refer to your operating system’s documentation.
Running Amazon Linux using an
rpm
package:
Your project has no deployments and you see a prompt to get started.
From the Build New Deployment menu, select the type of deployment you wish to add:
If, on the Create New <Deployment> page, Cloud 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.
From the Select Your Server’s Operating System menu, click Amazon Linux - RPM .
Click Next .
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
64-bit x86:
curl -OL https://cloud.mongodb.com/download/agent/automation/mongodb-mms-automation-agent-manager-latest.x86_64.rpm
In the directory where you installed the MongoDB Agent, open the
automation-agent.config
file in your preferred text editor.
sudo vi /etc/mongodb-mms/automation-agent.config
Update the following configuration options:
Key | Value |
---|---|
mmsGroupId
|
ProjectID
of your project.
|
mmsApiKey
|
Agent API key of your project. |
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 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. |
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
Issue the following command:
sudo service mongodb-mms-automation-agent start
In the Install Agent Instructions modal:
Running RHEL / CentOS 7.x, SUSE12, SUSE15, or Amazon Linux 2:
Important
Starting with
version 10.24.0.6714-1
, when you install the MongoDB Agent
using
deb
or
rpm
packages, the package doesn’t add
MongoDB binaries to the
PATH
environment variable.
If your deployment depends on the presence of MongoDB binaries in
the
PATH
, you must manually add the paths to MongoDB
binaries to the
PATH
. To learn how to update environment
variables, refer to your operating system’s documentation.
Using an
rpm
package:
Your project has no deployments and you see a prompt to get started.
From the Build New Deployment menu, select the type of deployment you wish to add:
If, on the Create New <Deployment> page, Cloud 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.
From the Select Your Server’s Operating System menu, click RHEL/CentOS (7.X/8.X), SUSE12, SUSE15, Amazon Linux2 - RPM .
Click Next .
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
In the directory where you installed the MongoDB Agent, open the
automation-agent.config
file in your preferred text editor.
sudo vi /etc/mongodb-mms/automation-agent.config
Update the following configuration options:
Key | Value |
---|---|
mmsGroupId
|
ProjectID
of your project.
|
mmsApiKey
|
Agent API key of your project. |
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 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. |
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
Issue the following command:
sudo service mongodb-mms-automation-agent start
In the Install Agent Instructions modal:
Using a
tar
archive:
Your project has no deployments and you see a prompt to get started.
From the Build New Deployment menu, select the type of deployment you wish to add:
If, on the Create New <Deployment> page, Cloud 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.
From the Select Your Server’s Operating System menu, click RHEL/CentOS (7.X/8.X), SUSE12, SUSE15, Amazon Linux 2 - TAR .
Click Next .
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 for 64-bit x86:
curl -OL https://cloud.mongodb.com/download/agent/automation/mongodb-mms-automation-agent-latest.rhel7_x86_64.tar.gz
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
Change into the directory that was created after extracting the MongoDB Agent binary:
cd mongodb-mms-automation-agent-<VERSION>.rhel7_x86_64
In the directory where you installed the MongoDB Agent, open the
local.config
file in your preferred text editor.
vi <install-path>/local.config
Update the following configuration options:
Key | Value |
---|---|
mmsGroupId
|
ProjectID
of your project.
|
mmsApiKey
|
Agent API key of your project. |
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 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. |
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 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:
Click Deployment , then Agents , and then Downloads & Settings .
Below the Download Directory heading, click the pencil icon to the right of the path shown in Download Directory (Linux) .
Change the path to the new path you want.
Click Save .
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:
Open the Agent configuration file in your preferred text editor.
Change the
mmsConfigBackup
setting to the new path for
the configuration backup file.
mmsConfigBackup=/<newPath>/mms-cluster-config-backup.json
Save the Agent configuration file.
Move the configuration backup file to the new directory.
sudo mv /var/lib/mongodb-mms-automation/mms-cluster-config-backup.json /<newPath>
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
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 &
In the Install Agent Instructions modal:
On RHEL / CentOS (7.x) on PowerPC architecture (managing MongoDB 3.4 or later deployments):
Important
Starting with
version 10.24.0.6714-1
, when you install the MongoDB Agent
using
deb
or
rpm
packages, the package doesn’t add
MongoDB binaries to the
PATH
environment variable.
If your deployment depends on the presence of MongoDB binaries in
the
PATH
, you must manually add the paths to MongoDB
binaries to the
PATH
. To learn how to update environment
variables, refer to your operating system’s documentation.
Using an
rpm
package:
Your project has no deployments and you see a prompt to get started.
From the Build New Deployment menu, select the type of deployment you wish to add:
If, on the Create New <Deployment> page, Cloud 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.
From the Select Your Server’s Operating System menu, click RHEL/CentOS (7.X) Power (ppc64le) - RPM .
Click Next .
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.ppc64le.rhel7.rpm
In the directory where you installed the MongoDB Agent, open the
automation-agent.config
file in your preferred text editor.
sudo vi /etc/mongodb-mms/automation-agent.config
Update the following configuration options:
Key | Value |
---|---|
mmsGroupId
|
ProjectID
of your project.
|
mmsApiKey
|
Agent API key of your project. |
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 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. |
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
Issue the following command:
sudo service mongodb-mms-automation-agent start
In the Install Agent Instructions modal:
Using a
tar
archive:
Your project has no deployments and you see a prompt to get started.
From the Build New Deployment menu, select the type of deployment you wish to add:
If, on the Create New <Deployment> page, Cloud 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.
From the Select Your Server’s Operating System menu, click RHEL/CentOS (7.X) Power (ppc64le) - TAR .
Click Next .
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-latest.rhel7_ppc64le.tar.gz
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
Change into the directory that was created after extracting the MongoDB Agent binary:
cd mongodb-mms-automation-agent-<VERSION>.rhel7_ppc64le
In the directory where you installed the MongoDB Agent, open the
local.config
file in your preferred text editor.
vi <install-path>/local.config
Update the following configuration options:
Key | Value |
---|---|
mmsGroupId
|
ProjectID
of your project.
|
mmsApiKey
|
Agent API key of your project. |
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 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. |
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 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:
Click Deployment , then Agents , and then Downloads & Settings .
Below the Download Directory heading, click the pencil icon to the right of the path shown in Download Directory (Linux) .
Change the path to the new path you want.
Click Save .
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:
Open the Agent configuration file in your preferred text editor.
Change the
mmsConfigBackup
setting to the new path for
the configuration backup file.
mmsConfigBackup=/<newPath>/mms-cluster-config-backup.json
Save the Agent configuration file.
Move the configuration backup file to the new directory.
sudo mv /var/lib/mongodb-mms-automation/mms-cluster-config-backup.json /<newPath>
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
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 &
In the Install Agent Instructions modal:
On zSeries architecture (managing MongoDB 4.0 or later deployments):
Running RHEL / CentOS 7.x/8x:
Running RHEL / CentOS 7.x/8.x using the
rpm
package
manager:
Your project has no deployments and you see a prompt to get started.
From the Build New Deployment menu, select the type of deployment you wish to add:
If, on the Create New <Deployment> page, Cloud 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.
From the Select Your Server’s Operating System menu, click RHEL 7.X/8.X Z-Series (s390x) - RPM .
Click Next .
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
In the directory where you installed the MongoDB Agent, open the
automation-agent.config
file in your preferred text editor.
sudo vi /etc/mongodb-mms/automation-agent.config
Update the following configuration options:
Key | Value |
---|---|
mmsGroupId
|
ProjectID
of your project.
|
mmsApiKey
|
Agent API key of your project. |
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 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. |
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
Issue the following command:
sudo service mongodb-mms-automation-agent start
In the Install Agent Instructions modal:
On ARM64 architecture running RHEL 8.x or Amazon Linux 2 (managing MongoDB 4.4 or later deployments):
Important
Starting with
version 10.24.0.6714-1
, when you install the MongoDB Agent
using
deb
or
rpm
packages, the package doesn’t add
MongoDB binaries to the
PATH
environment variable.
If your deployment depends on the presence of MongoDB binaries in
the
PATH
, you must manually add the paths to MongoDB
binaries to the
PATH
. To learn how to update environment
variables, refer to your operating system’s documentation.
Running RHEL 8.x or Amazon Linux 2 using the rpm package manager (managing MongoDB 4.4 or later deployments):
Your project has no deployments and you see a prompt to get started.
From the Build New Deployment menu, select the type of deployment you wish to add:
If, on the Create New <Deployment> page, Cloud 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.
From the Select Your Server’s Operating System menu, click RHEL 8.X, Amazon Linux 2 - RPM .
Click Next .
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 8 or Amazon Linux 2 for ARM64:
curl -OL https://cloud.mongodb.com/download/agent/automation/mongodb-mms-automation-agent-manager-latest.aarch64.amzn2.rpm
In the directory where you installed the MongoDB Agent, open the
automation-agent.config
file in your preferred text editor.
sudo vi /etc/mongodb-mms/automation-agent.config
Update the following configuration options:
Key | Value |
---|---|
mmsGroupId
|
ProjectID
of your project.
|
mmsApiKey
|
Agent API key of your project. |
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 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. |
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
Issue the following command:
sudo service mongodb-mms-automation-agent start
In the Install Agent Instructions modal:
Using a
tar
archive:
Your project has no deployments and you see a prompt to get started.
From the Build New Deployment menu, select the type of deployment you wish to add:
If, on the Create New <Deployment> page, Cloud 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.
From the Select Your Server’s Operating System menu, click RHEL 8.X, Amazon Linux 2 - TAR .
Click Next .
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 8.x or Amazon Linux 2 for ARM64:
curl -OL https://cloud.mongodb.com/download/agent/automation/mongodb-mms-automation-agent-latest.amzn2_aarch64.tar.gz
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>.amzn2_aarch64.tar.gz
Change into the directory that was created after extracting the MongoDB Agent binary:
cd mongodb-mms-automation-agent-<VERSION>.amzn2_aarch64
In the directory where you installed the MongoDB Agent, open the
local.config
file in your preferred text editor.
vi <install-path>/local.config
Update the following configuration options:
Key | Value |
---|---|
mmsGroupId
|
ProjectID
of your project.
|
mmsApiKey
|
Agent API key of your project. |
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 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. |
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 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:
Click Deployment , then Agents , and then Downloads & Settings .
Below the Download Directory heading, click the pencil icon to the right of the path shown in Download Directory (Linux) .
Change the path to the new path you want.
Click Save .
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:
Open the Agent configuration file in your preferred text editor.
Change the
mmsConfigBackup
setting to the new path for
the configuration backup file.
mmsConfigBackup=/<newPath>/mms-cluster-config-backup.json
Save the Agent configuration file.
Move the configuration backup file to the new directory.
sudo mv /var/lib/mongodb-mms-automation/mms-cluster-config-backup.json /<newPath>
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
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 &
In the Install Agent Instructions modal:
Use this procedure to install Linux systems that do not use
deb
or
rpm
packages.
Your project has no deployments and you see a prompt to get started.
From the Build New Deployment menu, select the type of deployment you wish to add:
If, on the Create New <Deployment> page, Cloud 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.
From the Select Your Server’s Operating System menu, click Other Linux - TAR .
Click Next .
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-latest.linux_x86_64.tar.gz
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
Change into the directory that was created after extracting the MongoDB Agent binary:
cd mongodb-mms-automation-agent-<VERSION>.linux_x86_64
In the directory where you installed the MongoDB Agent, open the
local.config
file in your preferred text editor.
vi <install-path>/local.config
Update the following configuration options:
Key | Value |
---|---|
mmsGroupId
|
ProjectID
of your project.
|
mmsApiKey
|
Agent API key of your project. |
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 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. |
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 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:
Click Deployment , then Agents , and then Downloads & Settings .
Below the Download Directory heading, click the pencil icon to the right of the path shown in Download Directory (Linux) .
Change the path to the new path you want.
Click Save .
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:
Open the Agent configuration file in your preferred text editor.
Change the
mmsConfigBackup
setting to the new path for
the configuration backup file.
mmsConfigBackup=/<newPath>/mms-cluster-config-backup.json
Save the Agent configuration file.
Move the configuration backup file to the new directory.
sudo mv /var/lib/mongodb-mms-automation/mms-cluster-config-backup.json /<newPath>
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
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 &
In the Install Agent Instructions modal:
Use this procedure to install the MongoDB Agent on x86_64 architecture running Microsoft Windows:
Your project has no deployments and you see a prompt to get started.
From the Build New Deployment menu, select the type of deployment you wish to add:
If, on the Create New <Deployment> page, Cloud 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.
From the Select Your Server’s Operating System menu, click Windows - MSI .
Click Next .
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 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.
After the
MSI
downloads, double-click:
mongodb-mms-automation-agent-<VERSION>.windows_x86_64.msi
If a security warning appears, click Run .
At the Configuration/Log Folder step
Provide the directory into which these files are saved.
At the Key Type step, select Agent API Key to bind to a specific project .
Enter the appropriate agent keys.
Note
These keys are provided in the MongoDB Agent Installation Instructions modal described in the previous step.
At the MongoDB Paths step, specify the Log and Backup directories
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.
(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 .
(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.
Click Install .
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 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, 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"
In the Install Agent Instructions modal:
By default, the MongoDB binaries and Cloud 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
Click Deployment , then Agents , and then Downloads & Settings .
Below the Download Directory heading, click edit icon to the right of the path shown in Download Directory (Windows) .
Change the path to the new path you want.
Click Save .
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
Open the MongoDB Agent configuration file in your preferred text editor.
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
Save the MongoDB Agent configuration file.
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>
Use this procedure to install the MongoDB Agent:
Important
Starting with
version 10.24.0.6714-1
, when you install the MongoDB Agent
using
deb
or
rpm
packages, the package doesn’t add
MongoDB binaries to the
PATH
environment variable.
If your deployment depends on the presence of MongoDB binaries in
the
PATH
, you must manually add the paths to MongoDB
binaries to the
PATH
. To learn how to update environment
variables, refer to your operating system’s documentation.
On x86_64 architecture running Debian 8/9/10/11 or Ubuntu 18.04/20.04:
Your project has no deployments and you see a prompt to get started.
From the Build New Deployment menu, select the type of deployment you wish to add:
If, on the Create New <Deployment> page, Cloud 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.
From the Select Your Server’s Operating System menu, click Debian 8/9/10/11, Ubuntu 16.X/18.X/20.x - DEB .
Click Next .
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 or Debian 8/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
In the directory where you installed the MongoDB Agent, open the
automation-agent.config
file in your preferred text editor.
sudo vi /etc/mongodb-mms/automation-agent.config
Update the following configuration options:
Key | Value |
---|---|
mmsGroupId
|
ProjectID
of your project.
|
mmsApiKey
|
Agent API key of your project. |
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 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. |
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
Issue the following command:
sudo systemctl start mongodb-mms-automation-agent.service
In the Install Agent Instructions modal:
Use this procedure to install the MongoDB Agent:
On x86_64 architecture:
Important
Starting with
version 10.24.0.6714-1
, when you install the MongoDB Agent
using
deb
or
rpm
packages, the package doesn’t add
MongoDB binaries to the
PATH
environment variable.
If your deployment depends on the presence of MongoDB binaries in
the
PATH
, you must manually add the paths to MongoDB
binaries to the
PATH
. To learn how to update environment
variables, refer to your operating system’s documentation.
Running Amazon Linux using an
rpm
package:
Your project has no deployments and you see a prompt to get started.
From the Build New Deployment menu, select the type of deployment you wish to add:
If, on the Create New <Deployment> page, Cloud 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.
From the Select Your Server’s Operating System menu, click Amazon Linux - RPM .
Click Next .
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
64-bit x86:
curl -OL https://cloud.mongodb.com/download/agent/automation/mongodb-mms-automation-agent-manager-latest.x86_64.rpm
In the directory where you installed the MongoDB Agent, open the
automation-agent.config
file in your preferred text editor.
sudo vi /etc/mongodb-mms/automation-agent.config
Update the following configuration options:
Key | Value |
---|---|
mmsGroupId
|
ProjectID
of your project.
|
mmsApiKey
|
Agent API key of your project. |
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 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. |
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
Issue the following command:
sudo service mongodb-mms-automation-agent start
In the Install Agent Instructions modal:
Running RHEL / CentOS 7.x, SUSE12, SUSE15, or Amazon Linux 2:
Important
Starting with
version 10.24.0.6714-1
, when you install the MongoDB Agent
using
deb
or
rpm
packages, the package doesn’t add
MongoDB binaries to the
PATH
environment variable.
If your deployment depends on the presence of MongoDB binaries in
the
PATH
, you must manually add the paths to MongoDB
binaries to the
PATH
. To learn how to update environment
variables, refer to your operating system’s documentation.
Using an
rpm
package:
Your project has no deployments and you see a prompt to get started.
From the Build New Deployment menu, select the type of deployment you wish to add:
If, on the Create New <Deployment> page, Cloud 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.
From the Select Your Server’s Operating System menu, click RHEL/CentOS (7.X/8.X), SUSE12, SUSE15, Amazon Linux2 - RPM .
Click Next .
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
In the directory where you installed the MongoDB Agent, open the
automation-agent.config
file in your preferred text editor.
sudo vi /etc/mongodb-mms/automation-agent.config
Update the following configuration options:
Key | Value |
---|---|
mmsGroupId
|
ProjectID
of your project.
|
mmsApiKey
|
Agent API key of your project. |
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 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. |
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
Issue the following command:
sudo service mongodb-mms-automation-agent start
In the Install Agent Instructions modal:
Using a
tar
archive:
Your project has no deployments and you see a prompt to get started.
From the Build New Deployment menu, select the type of deployment you wish to add:
If, on the Create New <Deployment> page, Cloud 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.
From the Select Your Server’s Operating System menu, click RHEL/CentOS (7.X/8.X), SUSE12, SUSE15, Amazon Linux 2 - TAR .
Click Next .
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 for 64-bit x86:
curl -OL https://cloud.mongodb.com/download/agent/automation/mongodb-mms-automation-agent-latest.rhel7_x86_64.tar.gz
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
Change into the directory that was created after extracting the MongoDB Agent binary:
cd mongodb-mms-automation-agent-<VERSION>.rhel7_x86_64
In the directory where you installed the MongoDB Agent, open the
local.config
file in your preferred text editor.
vi <install-path>/local.config
Update the following configuration options:
Key | Value |
---|---|
mmsGroupId
|
ProjectID
of your project.
|
mmsApiKey
|
Agent API key of your project. |
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 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. |
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 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:
Click Deployment , then Agents , and then Downloads & Settings .
Below the Download Directory heading, click the pencil icon to the right of the path shown in Download Directory (Linux) .
Change the path to the new path you want.
Click Save .
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:
Open the Agent configuration file in your preferred text editor.
Change the
mmsConfigBackup
setting to the new path for
the configuration backup file.
mmsConfigBackup=/<newPath>/mms-cluster-config-backup.json
Save the Agent configuration file.
Move the configuration backup file to the new directory.
sudo mv /var/lib/mongodb-mms-automation/mms-cluster-config-backup.json /<newPath>
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
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 &
In the Install Agent Instructions modal:
On RHEL / CentOS (7.x) on PowerPC architecture (managing MongoDB 3.4 or later deployments):
Important
Starting with
version 10.24.0.6714-1
, when you install the MongoDB Agent
using
deb
or
rpm
packages, the package doesn’t add
MongoDB binaries to the
PATH
environment variable.
If your deployment depends on the presence of MongoDB binaries in
the
PATH
, you must manually add the paths to MongoDB
binaries to the
PATH
. To learn how to update environment
variables, refer to your operating system’s documentation.
Using an
rpm
package:
Your project has no deployments and you see a prompt to get started.
From the Build New Deployment menu, select the type of deployment you wish to add:
If, on the Create New <Deployment> page, Cloud 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.
From the Select Your Server’s Operating System menu, click RHEL/CentOS (7.X) Power (ppc64le) - RPM .
Click Next .
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.ppc64le.rhel7.rpm
In the directory where you installed the MongoDB Agent, open the
automation-agent.config
file in your preferred text editor.
sudo vi /etc/mongodb-mms/automation-agent.config
Update the following configuration options:
Key | Value |
---|---|
mmsGroupId
|
ProjectID
of your project.
|
mmsApiKey
|
Agent API key of your project. |
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 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. |
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
Issue the following command:
sudo service mongodb-mms-automation-agent start
In the Install Agent Instructions modal:
Using a
tar
archive:
Your project has no deployments and you see a prompt to get started.
From the Build New Deployment menu, select the type of deployment you wish to add:
If, on the Create New <Deployment> page, Cloud 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.
From the Select Your Server’s Operating System menu, click RHEL/CentOS (7.X) Power (ppc64le) - TAR .
Click Next .
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-latest.rhel7_ppc64le.tar.gz
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
Change into the directory that was created after extracting the MongoDB Agent binary:
cd mongodb-mms-automation-agent-<VERSION>.rhel7_ppc64le
In the directory where you installed the MongoDB Agent, open the
local.config
file in your preferred text editor.
vi <install-path>/local.config
Update the following configuration options:
Key | Value |
---|---|
mmsGroupId
|
ProjectID
of your project.
|
mmsApiKey
|
Agent API key of your project. |
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 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. |
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 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:
Click Deployment , then Agents , and then Downloads & Settings .
Below the Download Directory heading, click the pencil icon to the right of the path shown in Download Directory (Linux) .
Change the path to the new path you want.
Click Save .
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:
Open the Agent configuration file in your preferred text editor.
Change the
mmsConfigBackup
setting to the new path for
the configuration backup file.
mmsConfigBackup=/<newPath>/mms-cluster-config-backup.json
Save the Agent configuration file.
Move the configuration backup file to the new directory.
sudo mv /var/lib/mongodb-mms-automation/mms-cluster-config-backup.json /<newPath>
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
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 &
In the Install Agent Instructions modal:
On zSeries architecture (managing MongoDB 4.0 or later deployments):
Running RHEL / CentOS 7.x/8x:
Running RHEL / CentOS 7.x/8.x using the
rpm
package
manager:
Your project has no deployments and you see a prompt to get started.
From the Build New Deployment menu, select the type of deployment you wish to add:
If, on the Create New <Deployment> page, Cloud 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.
From the Select Your Server’s Operating System menu, click RHEL 7.X/8.X Z-Series (s390x) - RPM .
Click Next .
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
In the directory where you installed the MongoDB Agent, open the
automation-agent.config
file in your preferred text editor.
sudo vi /etc/mongodb-mms/automation-agent.config
Update the following configuration options:
Key | Value |
---|---|
mmsGroupId
|
ProjectID
of your project.
|
mmsApiKey
|
Agent API key of your project. |
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 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. |
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
Issue the following command:
sudo service mongodb-mms-automation-agent start
In the Install Agent Instructions modal:
On ARM64 architecture running RHEL 8.x or Amazon Linux 2 (managing MongoDB 4.4 or later deployments):
Important
Starting with
version 10.24.0.6714-1
, when you install the MongoDB Agent
using
deb
or
rpm
packages, the package doesn’t add
MongoDB binaries to the
PATH
environment variable.
If your deployment depends on the presence of MongoDB binaries in
the
PATH
, you must manually add the paths to MongoDB
binaries to the
PATH
. To learn how to update environment
variables, refer to your operating system’s documentation.
Running RHEL 8.x or Amazon Linux 2 using the rpm package manager (managing MongoDB 4.4 or later deployments):
Your project has no deployments and you see a prompt to get started.
From the Build New Deployment menu, select the type of deployment you wish to add:
If, on the Create New <Deployment> page, Cloud 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.
From the Select Your Server’s Operating System menu, click RHEL 8.X, Amazon Linux 2 - RPM .
Click Next .
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 8 or Amazon Linux 2 for ARM64:
curl -OL https://cloud.mongodb.com/download/agent/automation/mongodb-mms-automation-agent-manager-latest.aarch64.amzn2.rpm
In the directory where you installed the MongoDB Agent, open the
automation-agent.config
file in your preferred text editor.
sudo vi /etc/mongodb-mms/automation-agent.config
Update the following configuration options:
Key | Value |
---|---|
mmsGroupId
|
ProjectID
of your project.
|
mmsApiKey
|
Agent API key of your project. |
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 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. |
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
Issue the following command:
sudo service mongodb-mms-automation-agent start
In the Install Agent Instructions modal:
Using a
tar
archive:
Your project has no deployments and you see a prompt to get started.
From the Build New Deployment menu, select the type of deployment you wish to add:
If, on the Create New <Deployment> page, Cloud 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.
From the Select Your Server’s Operating System menu, click RHEL 8.X, Amazon Linux 2 - TAR .
Click Next .
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 8.x or Amazon Linux 2 for ARM64:
curl -OL https://cloud.mongodb.com/download/agent/automation/mongodb-mms-automation-agent-latest.amzn2_aarch64.tar.gz
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>.amzn2_aarch64.tar.gz
Change into the directory that was created after extracting the MongoDB Agent binary:
cd mongodb-mms-automation-agent-<VERSION>.amzn2_aarch64
In the directory where you installed the MongoDB Agent, open the
local.config
file in your preferred text editor.
vi <install-path>/local.config
Update the following configuration options:
Key | Value |
---|---|
mmsGroupId
|
ProjectID
of your project.
|
mmsApiKey
|
Agent API key of your project. |
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 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. |
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 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:
Click Deployment , then Agents , and then Downloads & Settings .
Below the Download Directory heading, click the pencil icon to the right of the path shown in Download Directory (Linux) .
Change the path to the new path you want.
Click Save .
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:
Open the Agent configuration file in your preferred text editor.
Change the
mmsConfigBackup
setting to the new path for
the configuration backup file.
mmsConfigBackup=/<newPath>/mms-cluster-config-backup.json
Save the Agent configuration file.
Move the configuration backup file to the new directory.
sudo mv /var/lib/mongodb-mms-automation/mms-cluster-config-backup.json /<newPath>
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
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 &
In the Install Agent Instructions modal:
Use this procedure to install Linux systems that do not use
deb
or
rpm
packages.
Your project has no deployments and you see a prompt to get started.
From the Build New Deployment menu, select the type of deployment you wish to add:
If, on the Create New <Deployment> page, Cloud 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.
From the Select Your Server’s Operating System menu, click Other Linux - TAR .
Click Next .
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-latest.linux_x86_64.tar.gz
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
Change into the directory that was created after extracting the MongoDB Agent binary:
cd mongodb-mms-automation-agent-<VERSION>.linux_x86_64
In the directory where you installed the MongoDB Agent, open the
local.config
file in your preferred text editor.
vi <install-path>/local.config
Update the following configuration options:
Key | Value |
---|---|
mmsGroupId
|
ProjectID
of your project.
|
mmsApiKey
|
Agent API key of your project. |
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 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. |
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 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:
Click Deployment , then Agents , and then Downloads & Settings .
Below the Download Directory heading, click the pencil icon to the right of the path shown in Download Directory (Linux) .
Change the path to the new path you want.
Click Save .
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:
Open the Agent configuration file in your preferred text editor.
Change the
mmsConfigBackup
setting to the new path for
the configuration backup file.
mmsConfigBackup=/<newPath>/mms-cluster-config-backup.json
Save the Agent configuration file.
Move the configuration backup file to the new directory.
sudo mv /var/lib/mongodb-mms-automation/mms-cluster-config-backup.json /<newPath>
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
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 &
In the Install Agent Instructions modal:
On this page
The
federationSettings
resource allows you to return all
connected organizations
for a
federated authentication configuration.
Base URL:
https://cloud.mongodb.com/api/public/v1.0
You must have the
Organization
Owner
role for at least one
connected organization in the federation configuration to call this
endpoint.
GET /federationSettings/{FEDERATION-SETTINGS-ID}/connectedOrgConfigs/
Name | Type | Description |
---|---|---|
FEDERATION-SETTINGS-ID
|
string | Unique 24-hexadecimal digit string that identifies the federated authentication configuration. |
The following query parameters are optional:
Name | Type | Necessity | Description | Default |
---|---|---|---|---|
pageNum | number | Optional | One-based integer that returns a subsection of results. |
1
|
itemsPerPage | number | Optional | Number of items to return per page, up to a maximum of 500. |
100
|
pretty | boolean | Optional | Flag that indicates whether the response body should be in a prettyprint format. |
false
|
envelope | boolean | Optional |
Flag that indicates whether or not to wrap the response in an envelope.
Some
API
clients cannot access the
HTTP
response headers or
status code. To remediate this, set
For endpoints that return a list of results, the
|
false
|
This endpoint does not use HTTP request body parameters.
The response JSON document includes an array of result objects, an array of link objects and a count of the total number of result objects retrieved.
Name | Type | Description |
---|---|---|
results | array of objects | One object for each item detailed in the results Embedded Document section. |
links | array of objects |
One or more links to sub-resources and/or related resources. All
links
arrays in responses include at least one link called
self
. The relationships between
URL
s are explained in the
Web Linking Specification
.
|
totalCount | integer | Count of the total number of items in the result set. It may be greater than the number of objects in the results array if the entire result set is paginated. |
Each document in the
result
array contains the federated
authentication configuration for each connected organization.
Name | Type | Description |
---|---|---|
domainAllowList
|
array | List that contains the approved domains from which organization users can log in. |
domainRestrictionEnabled
|
boolean |
Flag that indicates whether domain restriction is enabled for the connected organization. Note
|
identityProviderId
|
string | Unique 20-hexadecimal digit string that identifies the identity provider associated with the connected organization. |
orgId
|
string | Unique 24-hexadecimal digit string that identifies the connected organization. |
postAuthRoleGrants
|
array | List that contains the default roles granted to users who authenticate through the IdP in a connected organization. |
roleMappings
|
array | List that contains the role mappings configured in this organization. |
userConflicts
|
array |
List that contains the usernames that don’t match any domain on the allowed list. Note
|
curl --user "{PUBLIC-KEY}:{PRIVATE-KEY}" --digest \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--include \
--request GET "https://<OpsManagerHost>:<Port>/api/public/v1.0/federationSettings/{FEDERATION-SETTINGS-ID}/connectedOrgConfigs"
{
"links": [
{
"href": "https://<OpsManagerHost>:<Port>/api/public/v1.0/federationSettings/{FEDERATION-SETTINGS-ID}/connectedOrgConfigs?pageNum=1&itemsPerPage=100",
"rel": "self"
}
],
"results": [
{
"domainAllowList": [],
"domainRestrictionEnabled": false,
"identityProviderId": null,
"orgId": "5f86fb11e0079069c9ec3132",
"postAuthRoleGrants": [],
"roleMappings": [],
"userConflicts": null
}
],
"totalCount": 1
}
Retrieves the disks and disk partitions on which MongoDB runs.
Base URL:
https://cloud.mongodb.com/api/public/v1.0
The following endpoints are available for
hosts
.
Method | Endpoint | Description |
---|---|---|
GET | /groups/{PROJECT-ID}/hosts/{HOST-ID}/disks | Retrieves all disk partitions on the specified host. |
GET | /groups/{PROJECT-ID}/hosts/HOST-ID/disks/{PARTITION-NAME} | Retrieves a single disk parition. |
On this page
Important
The ability to provision MongoDB servers in AWS using Cloud Manager was retired in October 2017.
mongodbdns.com
hostname.
mongodbdns.com
hostnames will stop working in
May 2023.
If you want to continue using Cloud Manager to manage these deployments, update the hostname for each host using one of the following methods for a replica set:
These procedures involve stepping down the old primary and triggering
at least one election for a new primary. All writes to the primary
fail during the period starting when the
rs.stepDown()
method is received until either a
new primary is elected, or if there are no electable secondaries, the
original primary resumes normal operation. For MongoDB versions 4.0 and
earlier, all client connections are closed.
Consider performing this procedure during a maintenance window during which applications stop all write operations to the cluster.
To learn more about elections, see rs.stepDown() behavior and Replica Set Elections .
mongodbdns.com
hostname. To learn more, see
Remove Members from Replica Set.
Repeat for each non-primary replica set member.
Add the last new instance to the replica set using its EC2 hostname. To learn more, see Add Members to a Replica Set.
Wait for the initial sync to complete. To learn how to get the status of an initial sync, see the MongoDB manual.
Connect to the primary and step it down. To learn more, see
rs.stepDown()
.
Note
Stepping down the primary triggers at least one election for a new primary. To learn more about elections, see Replica Set Elections .
Remove the old primary with the
mongodbdns.com
hostname from
the replica set. To learn more, see
Remove Members from Replica Set.
Follow the Change Hostnames while Maintaining Replica Set Availability procedure in the MongoDB manual.
An overview of the linked procedure is as follows:
Repeat for each non-primary member of the replica set.
Note
Stepping down the primary triggers at least one election for a new primary. To learn more about elections, see Replica Set Elections .
On this page
When you stop backups for a replica set or sharded cluster Cloud Manager stops taking new snapshots but retains existing snapshots until their listed expiration date.
If you later restart backups for replica set or cluster, Cloud Manager might perform an initial sync , depending on how much time has elapsed.
If you terminate a backup, Cloud Manager immediately deletes all the backup’s snapshots.
If prompted for an authentication code, enter the code and click Verify . Click Stop again.
Terminating a backup triggers a full backup
If you terminate a backup, Cloud Manager immediately deletes the backup’s snapshots. The next backup job runs as a full backup rather than an incremental backup.
If prompted for an authentication code, enter the code and click Verify . Click Stop again.