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.
注意
首先查看先决条件
If you want to start or continue using Automation to manage your MongoDB deployments, please review the MongoDB 助手先决条件 before updating to the MongoDB Agent.
步骤
Use this procedure to update to the MongoDB Agent on x86_64 architecture running Microsoft Windows:
Add any existing configuration options for your legacy Monitoring Agent.
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 监控代理, under the Monitoring Configurations section:
Type the desired setting in the Setting box and the corresponding value in the Value box.
要添加多个Setting ,请单击+ Add Setting链接。 出现另一行。
重复此操作,直到添加所有设置。
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.
重要
Cloud Manager does not validate any of these settings. Make sure that the settings and values are correct.
安装 MongoDB 助手。
MongoDB Agent Installation Instructions 框会显示以下信息:
Project ID (绑定到项目时必填)
API Key
如果没有 API 密钥,请单击生成密钥。
警告
Some or all of these values are required in a later step. Copy these values then store them where you can access them later.
Run the MongoDB Agent Windows Installer.
下载
MSI
后,双击:mongodb-mms-automation-agent-<VERSION>.windows_x86_64.msi
注意
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.如果出现安全警告,请单击 Run。
在 Configuration/Log Folder 步骤
提供保存这些文件的目录。
在Key Type步骤中,选择Agent API Key以绑定到特定项目。
Enter the appropriate Agent keys.
注意
上一步描述的 MongoDB Agent Installation Instructions 模态中提供了这些密钥。
在 Project ID 字段中输入您的项目 ID。
Type your Agent API Key into the Agent API Key field.
在 MongoDB Paths 步骤中,指定日志和备份目录
在 Windows Firewall Configuration 步骤中,单击首选防火墙配置。
如果单击 Configure firewall rules allowing access from only the specified |ipaddr| addresses.,则在提供的框中键入必要的 IPv4 地址。
(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.
(有条件) Windows未启用 磁盘性能计数器 默认。如果您尚未为MongoDB托管启用磁盘性能计数器,请单击Enable Disk Performance Counters 。 MongoDB Agent使用这些计数器进行某些硬件监控活动。
单击 Install(连接)。
设置完成后,请单击 Finish。
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 | 必要性 | 值 |
---|---|---|
| 必需 | Cloud Manager项目的代理API密钥。 |
| 必需 | Cloud Manager项目的唯一标识符。 |
| Optional | Cloud Manager应将MongoDB Agent配置文件写入的绝对文件路径。 |
| Optional | Cloud Manager应将MongoDB Agent日志写入到的绝对文件路径 |
| Optional | Cloud Manager自动化配置备份JSON文件的绝对文件路径。 |
例子
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"
Finish the installation of the MongoDB Agent. In the Install Agent Instructions modal, click Done.
Verify that the MongoDB Agent is running.
In the Install Agent Instructions modal, wait for each deployment to show Verified in the Install the MongoDB Agent step.
重要
All authentication SCRAM, LDAP, and Kerberos credentials from
legacy Agents are retained after the update. All .pem
key
files are retained as well.
单击 Next(连接)。
(可选)更改 MongoDB 助手二进制文件和配置备份文件的位置。
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
.
注意
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
如果要将这些文件存储在不同的目录中,请按照以下步骤操作:
更改 MongoDB 助手二进制文件的位置
在MongoDB Cloud Manager中, Go项目的 Deployment 页面。
如果尚未显示,请从导航栏的 Organizations 菜单中选择包含所需项目的组织。
如果尚未显示,请从导航栏的Projects菜单中选择所需的项目。
如果 Deployment(数据库部署)页面尚未出现,请单击侧边栏中的 Deployment(数据库)。
显示“部署”页面。
单击部署的Agents标签页。
显示“代理”页面。
单击 Downloads & Settings 标签页。
在 Download Directory 标题下方,单击 Download Directory (Windows) 中所示路径右侧的 。
将路径更改为所需的新路径。
单击 Save(连接)。
在运行MongoDB Agent的每台托管上创建您指定的新目录。 使用Windows资源管理器移动文件,或从命令提示符或 PowerShell 发出以下命令:
md \<newPath> 重要
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.
更改 MongoDB 助手配置备份的位置
用您首选的文本编辑器打开 MongoDB 助手配置文件。
Change the
mmsConfigBackup
setting to the new path for the configuration backup file. ReplaceX
in the following example with the drive letter on which your backup is stored.mmsConfigBackup=X:\<newPath>\mms-cluster-config-backup.json 保存 MongoDB 助手配置文件。
将配置备份文件移至新目录。 使用 Windows 资源管理器移动文件,或从命令提示符或 PowerShell 发出以下命令:
move %SystemDrive%\MMSMongoDB\versions\mms-cluster-config-backup.json \<newPath>
Use this procedure to update to the MongoDB Agent:
在运行 Debian 8、Debian 9、Ubuntu 18.04、Ubuntu 20.04 或 Ubuntu 22.04 的 x86_64 架构上:
Add any existing configuration options for your legacy Monitoring Agent.
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 监控代理, under the Monitoring Configurations section:
Type the desired setting in the Setting box and the corresponding value in the Value box.
要添加多个Setting ,请单击+ Add Setting链接。 出现另一行。
重复此操作,直到添加所有设置。
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.
重要
Cloud Manager does not validate any of these settings. Make sure that the settings and values are correct.
下载最新版本的 MongoDB 助手。
注意
从这一步开始,按照 MongoDB Agent 安装模式,将提供的命令复制到 Linux shell 中。
从将运行 MongoDB 助手的主机上的 Shell 中,发出以下 curl
命令来下载 Ubuntu 18.04/20.04/22.04 或 Debian 9/10/11(适用于 64 位 x86 架构)的安装程序:
curl -OL https://cloud.mongodb.com/download/agent/automation/mongodb-mms-automation-agent-manager-latest.amd64.ubuntu1604.deb
编辑 MongoDB 助手配置文件。
在安装 MongoDB 助手的目录中,使用首选文本编辑器打开 automation-agent.config 文件:
sudo vi /etc/mongodb-mms/automation-agent.config
更新以下配置选项:
键 | 值 |
---|---|
项目的 | |
项目的代理 API 密钥。 |
Verify that the MongoDB Agent is running.
In the Install Agent Instructions modal, wait for each deployment to show Verified in the Install the MongoDB Agent step.
重要
All authentication SCRAM, LDAP, and Kerberos credentials from
legacy Agents are retained after the update. All .pem
key
files are retained as well.
单击 Next(连接)。
On zSeries architecture running Ubuntu 18.x using a
deb
package:
Add any existing configuration options for your legacy Monitoring Agent.
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 监控代理, under the Monitoring Configurations section:
Type the desired setting in the Setting box and the corresponding value in the Value box.
要添加多个Setting ,请单击+ Add Setting链接。 出现另一行。
重复此操作,直到添加所有设置。
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.
重要
Cloud Manager does not validate any of these settings. Make sure that the settings and values are correct.
编辑 MongoDB 助手配置文件。
在安装 MongoDB 助手的目录中,使用首选文本编辑器打开 automation-agent.config 文件:
sudo vi /etc/mongodb-mms/automation-agent.config
更新以下配置选项:
键 | 值 |
---|---|
项目的 | |
项目的代理 API 密钥。 |
Verify that the MongoDB Agent is running.
In the Install Agent Instructions modal, wait for each deployment to show Verified in the Install the MongoDB Agent step.
重要
All authentication SCRAM, LDAP, and Kerberos credentials from
legacy Agents are retained after the update. All .pem
key
files are retained as well.
单击 Next(连接)。
Use this procedure to update to the MongoDB Agent:
在 x 86 _ 64架构上:
Running RHEL / CentOS 6.x using an rpm
package:
Add any existing configuration options for your legacy Monitoring Agent.
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 监控代理, under the Monitoring Configurations section:
Type the desired setting in the Setting box and the corresponding value in the Value box.
要添加多个Setting ,请单击+ Add Setting链接。 出现另一行。
重复此操作,直到添加所有设置。
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.
重要
Cloud Manager does not validate any of these settings. Make sure that the settings and values are correct.
下载最新版本的 MongoDB 助手。
注意
从这一步开始,按照 MongoDB Agent 安装模式,将提供的命令复制到 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
编辑 MongoDB 助手配置文件。
在安装 MongoDB 助手的目录中,使用首选文本编辑器打开 automation-agent.config 文件:
sudo vi /etc/mongodb-mms/automation-agent.config
更新以下配置选项:
键 | 值 |
---|---|
项目的 | |
项目的代理 API 密钥。 |
Verify that the MongoDB Agent is running.
In the Install Agent Instructions modal, wait for each deployment to show Verified in the Install the MongoDB Agent step.
重要
All authentication SCRAM, LDAP, and Kerberos credentials from
legacy Agents are retained after the update. All .pem
key
files are retained as well.
单击 Next(连接)。
Running RHEL / CentOS 7.x, SUSE12, SUSE15 or Amazon Linux 2:
使用rpm
包:
Add any existing configuration options for your legacy Monitoring Agent.
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 监控代理, under the Monitoring Configurations section:
Type the desired setting in the Setting box and the corresponding value in the Value box.
要添加多个Setting ,请单击+ Add Setting链接。 出现另一行。
重复此操作,直到添加所有设置。
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.
重要
Cloud Manager does not validate any of these settings. Make sure that the settings and values are correct.
编辑 MongoDB 助手配置文件。
在安装 MongoDB 助手的目录中,使用首选文本编辑器打开 automation-agent.config 文件:
sudo vi /etc/mongodb-mms/automation-agent.config
更新以下配置选项:
键 | 值 |
---|---|
项目的 | |
项目的代理 API 密钥。 |
Verify that the MongoDB Agent is running.
In the Install Agent Instructions modal, wait for each deployment to show Verified in the Install the MongoDB Agent step.
重要
All authentication SCRAM, LDAP, and Kerberos credentials from
legacy Agents are retained after the update. All .pem
key
files are retained as well.
单击 Next(连接)。
使用tar
存档:
Add any existing configuration options for your legacy Monitoring Agent.
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 监控代理, under the Monitoring Configurations section:
Type the desired setting in the Setting box and the corresponding value in the Value box.
要添加多个Setting ,请单击+ Add Setting链接。 出现另一行。
重复此操作,直到添加所有设置。
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.
重要
Cloud Manager does not validate any of these settings. Make sure that the settings and values are correct.
下载最新版本的 MongoDB 助手。
注意
Starting with this step, follow the MongoDB Agent installation modal and copy the provided commands into the .
从将运行 的托管上的系统shell MongoDB Agent中,发出以下curl
命令以下载适用于64 位 x 的 RHEL86 安装程序:
curl -OL https://cloud.mongodb.com/download/agent/automation/mongodb-mms-automation-agent-manager-latest.rhel7_x86_64.tar.gz
编辑 MongoDB 助手配置文件。
在安装MongoDB Agent助手的目录中,使用首选文本编辑器打开 local.config文件。
vi <install-path>/local.config
更新以下配置选项:
键 | 值 |
---|---|
项目的 | |
项目的代理 API 密钥。 |
可选:创建二进制、日志和数据目录。
If you have an existing Monitoring Agent user and do not plan on activating Automation, you only need to create the log directory.
创建以下目录来存储MongoDB Agent所需的文件。
注意
在文件路径中使用 mongodb-mms-automation
是一项传统项目,并不平均值在安装MongoDB Agent时会配置自动化。
组件 | 默认目录 | 说明 |
---|---|---|
二进制文件 |
| 这些是MongoDB Agent管理的二进制文件。 其中包括MongoDB Agent 、 BI Connector和MongoDB二进制文件。 |
MongoDB 助手日志 |
| 这些是MongoDB Agent创建的日志文件。 |
MongoDB数据库 |
| 这些是MongoDB Agent创建和管理的数据库。 |
运行以下命令以创建目录:
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
默认,助手二进制文件和Cloud Manager配置备份文件位于/var/lib/mongodb-mms-automation
中。 如果要将这些文件存储在不同的目录中,请按照以下步骤操作:
要更改代理二进制文件的位置:
在MongoDB Cloud Manager中, Go项目的 Deployment 页面。
如果尚未显示,请从导航栏的 Organizations 菜单中选择包含所需项目的组织。
如果尚未显示,请从导航栏的Projects菜单中选择所需的项目。
如果 Deployment(数据库部署)页面尚未出现,请单击侧边栏中的 Deployment(数据库)。
显示“部署”页面。
单击部署的Agents标签页。
显示“代理”页面。
更改路径。
单击 Downloads & Settings(连接)。
在Download Directory标题下方,单击Download Directory (Linux)中所示路径右侧的铅笔图标。
将路径更改为所需的新路径。
单击 Save(连接)。
在运行代理的每台主机上创建您指定的新目录。
sudo mkdir -m 755 -p /<newPath>
要更改助手配置备份的位置,请执行以下操作:
在您首选的文本编辑器中打开助手配置文件。
将
mmsConfigBackup
设置更改为配置备份文件的新路径。mmsConfigBackup=/<newPath>/mms-cluster-config-backup.json 保存代理配置文件。
将配置备份文件移至新目录。
sudo mv /var/lib/mongodb-mms-automation/mms-cluster-config-backup.json /<newPath>
为运行MongoDB Agent的系统用户分配权限。
运行以下命令:
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
Verify that the MongoDB Agent is running.
In the Install Agent Instructions modal, wait for each deployment to show Verified in the Install the MongoDB Agent step.
重要
All authentication SCRAM, LDAP, and Kerberos credentials from
legacy Agents are retained after the update. All .pem
key
files are retained as well.
单击 Next(连接)。
在 PowerPC 架构上的 RHEL/ CentOS ( 7 .x) 上(管理MongoDB 3.4或更高版本的部署):
使用rpm
包:
Add any existing configuration options for your legacy Monitoring Agent.
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 监控代理, under the Monitoring Configurations section:
Type the desired setting in the Setting box and the corresponding value in the Value box.
要添加多个Setting ,请单击+ Add Setting链接。 出现另一行。
重复此操作,直到添加所有设置。
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.
重要
Cloud Manager does not validate any of these settings. Make sure that the settings and values are correct.
编辑 MongoDB 助手配置文件。
在安装 MongoDB 助手的目录中,使用首选文本编辑器打开 automation-agent.config 文件:
sudo vi /etc/mongodb-mms/automation-agent.config
更新以下配置选项:
键 | 值 |
---|---|
项目的 | |
项目的代理 API 密钥。 |
Verify that the MongoDB Agent is running.
In the Install Agent Instructions modal, wait for each deployment to show Verified in the Install the MongoDB Agent step.
重要
All authentication SCRAM, LDAP, and Kerberos credentials from
legacy Agents are retained after the update. All .pem
key
files are retained as well.
单击 Next(连接)。
使用tar
存档:
Add any existing configuration options for your legacy Monitoring Agent.
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 监控代理, under the Monitoring Configurations section:
Type the desired setting in the Setting box and the corresponding value in the Value box.
要添加多个Setting ,请单击+ Add Setting链接。 出现另一行。
重复此操作,直到添加所有设置。
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.
重要
Cloud Manager does not validate any of these settings. Make sure that the settings and values are correct.
编辑 MongoDB 助手配置文件。
在安装MongoDB Agent助手的目录中,使用首选文本编辑器打开 local.config文件。
vi <install-path>/local.config
更新以下配置选项:
键 | 值 |
---|---|
项目的 | |
项目的代理 API 密钥。 |
可选:创建二进制、日志和数据目录。
If you have an existing Monitoring Agent user and do not plan on activating Automation, you only need to create the log directory.
创建以下目录来存储MongoDB Agent所需的文件。
注意
在文件路径中使用 mongodb-mms-automation
是一项传统项目,并不平均值在安装MongoDB Agent时会配置自动化。
组件 | 默认目录 | 说明 |
---|---|---|
二进制文件 |
| 这些是MongoDB Agent管理的二进制文件。 其中包括MongoDB Agent 、 BI Connector和MongoDB二进制文件。 |
MongoDB 助手日志 |
| 这些是MongoDB Agent创建的日志文件。 |
MongoDB数据库 |
| 这些是MongoDB Agent创建和管理的数据库。 |
运行以下命令以创建目录:
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
默认,助手二进制文件和Cloud Manager配置备份文件位于/var/lib/mongodb-mms-automation
中。 如果要将这些文件存储在不同的目录中,请按照以下步骤操作:
要更改代理二进制文件的位置:
在MongoDB Cloud Manager中, Go项目的 Deployment 页面。
如果尚未显示,请从导航栏的 Organizations 菜单中选择包含所需项目的组织。
如果尚未显示,请从导航栏的Projects菜单中选择所需的项目。
如果 Deployment(数据库部署)页面尚未出现,请单击侧边栏中的 Deployment(数据库)。
显示“部署”页面。
单击部署的Agents标签页。
显示“代理”页面。
更改路径。
单击 Downloads & Settings(连接)。
在Download Directory标题下方,单击Download Directory (Linux)中所示路径右侧的铅笔图标。
将路径更改为所需的新路径。
单击 Save(连接)。
在运行代理的每台主机上创建您指定的新目录。
sudo mkdir -m 755 -p /<newPath>
要更改助手配置备份的位置,请执行以下操作:
在您首选的文本编辑器中打开助手配置文件。
将
mmsConfigBackup
设置更改为配置备份文件的新路径。mmsConfigBackup=/<newPath>/mms-cluster-config-backup.json 保存代理配置文件。
将配置备份文件移至新目录。
sudo mv /var/lib/mongodb-mms-automation/mms-cluster-config-backup.json /<newPath>
为运行MongoDB Agent的系统用户分配权限。
运行以下命令:
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
Verify that the MongoDB Agent is running.
In the Install Agent Instructions modal, wait for each deployment to show Verified in the Install the MongoDB Agent step.
重要
All authentication SCRAM, LDAP, and Kerberos credentials from
legacy Agents are retained after the update. All .pem
key
files are retained as well.
单击 Next(连接)。
在 zSeries 架构上(管理MongoDB 4.0或更高版本的部署):
Running RHEL / CentOS 7.x/8.x using the
rpm
package manager:
Add any existing configuration options for your legacy Monitoring Agent.
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 监控代理, under the Monitoring Configurations section:
Type the desired setting in the Setting box and the corresponding value in the Value box.
要添加多个Setting ,请单击+ Add Setting链接。 出现另一行。
重复此操作,直到添加所有设置。
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.
重要
Cloud Manager does not validate any of these settings. Make sure that the settings and values are correct.
编辑 MongoDB 助手配置文件。
在安装 MongoDB 助手的目录中,使用首选文本编辑器打开 automation-agent.config 文件:
sudo vi /etc/mongodb-mms/automation-agent.config
更新以下配置选项:
键 | 值 |
---|---|
项目的 | |
项目的代理 API 密钥。 |
Verify that the MongoDB Agent is running.
In the Install Agent Instructions modal, wait for each deployment to show Verified in the Install the MongoDB Agent step.
重要
All authentication SCRAM, LDAP, and Kerberos credentials from
legacy Agents are retained after the update. All .pem
key
files are retained as well.
单击 Next(连接)。
Use this procedure to install update to the MongoDB Agent on
Linux systems that do not use deb
or rpm
packages.
Add any existing configuration options for your legacy Monitoring Agent.
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 监控代理, under the Monitoring Configurations section:
Type the desired setting in the Setting box and the corresponding value in the Value box.
要添加多个Setting ,请单击+ Add Setting链接。 出现另一行。
重复此操作,直到添加所有设置。
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.
重要
Cloud Manager does not validate any of these settings. Make sure that the settings and values are correct.
编辑 MongoDB 助手配置文件。
在安装MongoDB Agent助手的目录中,使用首选文本编辑器打开 local.config文件。
vi <install-path>/local.config
更新以下配置选项:
键 | 值 |
---|---|
项目的 | |
项目的代理 API 密钥。 |
可选:创建二进制、日志和数据目录。
If you have an existing Monitoring Agent user and do not plan on activating Automation, you only need to create the log directory.
创建以下目录来存储MongoDB Agent所需的文件。
注意
在文件路径中使用 mongodb-mms-automation
是一项传统项目,并不平均值在安装MongoDB Agent时会配置自动化。
组件 | 默认目录 | 说明 |
---|---|---|
二进制文件 |
| 这些是MongoDB Agent管理的二进制文件。 其中包括MongoDB Agent 、 BI Connector和MongoDB二进制文件。 |
MongoDB 助手日志 |
| 这些是MongoDB Agent创建的日志文件。 |
MongoDB数据库 |
| 这些是MongoDB Agent创建和管理的数据库。 |
运行以下命令以创建目录:
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
默认,助手二进制文件和Cloud Manager配置备份文件位于/var/lib/mongodb-mms-automation
中。 如果要将这些文件存储在不同的目录中,请按照以下步骤操作:
要更改代理二进制文件的位置:
在MongoDB Cloud Manager中, Go项目的 Deployment 页面。
如果尚未显示,请从导航栏的 Organizations 菜单中选择包含所需项目的组织。
如果尚未显示,请从导航栏的Projects菜单中选择所需的项目。
如果 Deployment(数据库部署)页面尚未出现,请单击侧边栏中的 Deployment(数据库)。
显示“部署”页面。
单击部署的Agents标签页。
显示“代理”页面。
更改路径。
单击 Downloads & Settings(连接)。
在Download Directory标题下方,单击Download Directory (Linux)中所示路径右侧的铅笔图标。
将路径更改为所需的新路径。
单击 Save(连接)。
在运行代理的每台主机上创建您指定的新目录。
sudo mkdir -m 755 -p /<newPath>
要更改助手配置备份的位置,请执行以下操作:
在您首选的文本编辑器中打开助手配置文件。
将
mmsConfigBackup
设置更改为配置备份文件的新路径。mmsConfigBackup=/<newPath>/mms-cluster-config-backup.json 保存代理配置文件。
将配置备份文件移至新目录。
sudo mv /var/lib/mongodb-mms-automation/mms-cluster-config-backup.json /<newPath>
为运行MongoDB Agent的系统用户分配权限。
运行以下命令:
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
Verify that the MongoDB Agent is running.
In the Install Agent Instructions modal, wait for each deployment to show Verified in the Install the MongoDB Agent step.
重要
All authentication SCRAM, LDAP, and Kerberos credentials from
legacy Agents are retained after the update. All .pem
key
files are retained as well.
单击 Next(连接)。
后续步骤
After the MongoDB Agent update completes:
If Automation did not previously manage your Monitoring Agent, activate 备份 and/or 监控 on your MongoDB deployment.
If Automation did previously manage your Monitoring Agent, it is now activated. To verify that Automation is activated:
If you want to activate Automation, add a deployment to your MongoDB project.