基础环境
CentOS 7.5
MongoDB 4.2
部署MongoDB
前期已经部署过MongoDB分片集群
安装MongoDB Ops Manager
server节点安装
rpm -ivh mongodb-mms-4.2.20.57016.20201007T1901Z-1.x86_64.rpm
配置参数文件
conf-mms.properties
vi /opt/mongodb/mms/conf/conf-mms.properties
mongo.mongoUri=mongodb://admin:admin123@172.16.254.136:30000,172.16.254.137:30000,172.16.254.138:30000/?maxPoolSize=150
mongo.ssl=false
mms.centralUrl=http://172.16.254.139:8090
mms.conf
vi /opt/mongodb/mms/conf/mms.conf
BASE_PORT=8090
启动服务
/opt/mongodb/mms/bin/mongodb-mms start
Starting pre-flight checks
Successfully finished pre-flight checks
Migrate Ops Manager data
Running migrations...
[ OK ]
Starting Ops Manager server
Instance 0 starting....[ OK ]
Starting pre-flight checks
Successfully finished pre-flight checks
Start Backup Daemon...[ OK ]
配置MongoDB Ops Manager
登录
注册
配置agent
依次点击Agents->Download & Settings
继续
curl -OL http://172.16.254.139:8090/download/agent/automation/mongodb-mms-automation-agent-manager-10.2.20.5992-1.x86_64.rhel7.rpm
rpm -ivh mongodb-mms-automation-agent-manager-10.2.20.5992-1.x86_64.rhel7.rpm
vi /etc/mongodb-mms/automation-agent.config
mmsGroupId=60813a5083d85f2fe41da669
mmsApiKey=608141b883d85f4cbb15a8c306a3c8771ee62081cd733d3406944d1d
mmsBaseUrl=http://172.16.254.139:8090
启动agent
systemctl start mongodb-mms-automation-agent.service
systemctl start mongodb-mms-automation-agent.service
监控现有的Sharding Cluster服务
本次MongoDB Ops Manager部署参考文档:
https://blog.csdn.net/weixin_34365417/article/details/85081914