search
HomeDatabaseMysql TutorialMMS 监控服务安装(6)

前面几节总览的说了些MMS是怎么回事,比较枯燥,也不容易懂,不过蛮重要的,工欲善其事必先利其器,弄清楚了原理,在接下来的章节里起到事半功倍的效果。闲话少扯,来看看MMS应用的安装过程。这里我就用RPM包来安装了,tar包也一样的。 概览 前面已经说过了

前面几节总览的说了些MMS是怎么回事,比较枯燥,也不容易懂,不过蛮重要的,工欲善其事必先利其器,弄清楚了原理,在接下来的章节里起到事半功倍的效果。 闲话少扯,来看看MMS应用的安装过程。这里我就用RPM包来安装了,tar包也一样的。

概览

前面已经说过了,MMS是监控和备份MongoDB的基础设施服务。安装的过程如下所示: 1. 分配一台符合MMS硬件要求的服务器 2. 安装一个单独的mongodb复制集作为MMS应用数据库 3. 安装SMTP邮件服务器 4. 安装MMS应用程序包 5. 配置MMS服务的URL、电子邮件、mongo URI连接串 6. 启动MMS服务 7. 可选安装,安装备份服务

步骤

硬件和软件需求请看前面的内容。

安装mongodb

安装MMS应用数据库,官方建议是使用复制集,我这里就使用单一的mongodb。
# vim /etc/yum.repos.d/mongodb.repo 
[MongoDB]
name=MongoDB Repository
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64
gpgcheck=0
enabled=1
# yum install mongodb-org
# /etc/init.d/mongod start
我这里比较简单的安装,相关参数的配置,可以看看之前的内容。

SMTP服务

MMS依赖SMTP服务,是以电子邮件作为用户的,需要根据MMS服务器回复的邮件来进行用户注册和密码设置的,报警信息也是通过邮件来发送的。可以不用配置SMTP服务器,用第三方的即可。

安装MMS服务

软件包下载地址:http://www.mongodb.com/subscription/downloads
# curl -OL https://downloads.mongodb.com/on-prem-mms/rpm/mongodb-mms-1.4.3.106-1.x86_64.rpm
# rpm -ivh mongodb-mms-1.4.3.106-1.x86_64.rpm

配置MMS

RPM安装完,程序位于/opt/mongodb/mms,以mongodb-mms用户运行该程序。 需要修改/opt/mongodb/mms/conf/conf-mms.properties文件,需要确保以下参数设置正确:
  • mms.centralUrl
  • mms.backupCentralUrl
  • mms.fromEmailAddr
  • mms.replyToEmailAddr
  • mms.adminFromEmailAddr
  • mms.adminEmailAddr
  • mms.bounceEmailAddr
  • mongo.mongoUri
  • mongo.replicaSet
具体参数意思,下节来说明。
mms.centralUrl=http://10.0.101.128:8080
mms.backupCentralUrl=http://10.0.101.128:8081
mms.fromEmailAddr=monitor@ttlsa.com
mms.replyToEmailAddr=monitor@ttlsa.com
mms.adminFromEmailAddr=monitor@ttlsa.com
mms.adminEmailAddr=monitor@ttlsa.com
mms.bounceEmailAddr=monitor@ttlsa.com
mms.userSvcClass=com.xgen.svc.mms.svc.user.UserSvcDb
mms.emailDaoClass=com.xgen.svc.core.dao.email.JavaEmailDao
mms.mail.transport=smtp
mms.mail.hostname=smtp.exmail.qq.com
mms.mail.port=25
mms.mail.username=monitor@ttlsa.com
mms.mail.password=************
mms.mail.tls=
mongo.mongoUri=mongodb://127.0.0.1:27017/
mongo.replicaSet=
mongo.backupdb.mongoUri=
mongo.backupdb.replicaSet=
ping.queue.size=100
ping.thread.count=100
increment.queue.size=14000
increment.thread.count=35
increment.gle.freq=70
increment.offer.time=120000
aws.accesskey=
aws.secretkey=
reCaptcha.enabled=false
reCaptcha.public.key=
reCaptcha.private.key=
twilio.account.sid=
twilio.auth.token=
twilio.from.num=
graphite.hostname=
graphite.port=2003
snmp.default.hosts=
snmp.listen.port=11611
snmp.default.heartbeat.interval=300

启动服务

启动mongodb-mms服务:
# /etc/init.d/mongodb-mms start
Migrate MMS data
   Running migrations...[  OK  ]
Start MMS server
   Instance 0 starting.......[  OK  ]
Start Backup HTTP Server
   Instance 0 starting.....[  OK  ]
Start Backup Alert Process[  OK  ]
如果启动失败了,就查看下日志。 使用的端口:
# netstat -ntplu | grep mms
tcp        0      0 0.0.0.0:8080                0.0.0.0:*                   LISTEN      11993/mms-app       
tcp        0      0 0.0.0.0:8081                0.0.0.0:*                   LISTEN      12754/mms-app       
tcp        0      0 0.0.0.0:8091                0.0.0.0:*                   LISTEN      12754/mms-app       
tcp        0      0 :::8092                     :::*                        LISTEN      13206/mms-app       
tcp        0      0 ::ffff:127.0.0.1:8650       :::*                        LISTEN      13206/mms-app       
udp        0      0 0.0.0.0:11611               0.0.0.0:*                               11993/mms-app
创建的库:
# mongo
MongoDB shell version: 2.6.3
connecting to: test
> show dbs
admin                   (empty)
alerts                  0.203GB
apiv3                   0.578GB
backupagent             0.078GB
backupalerts            0.078GB
backupbilling           0.078GB
backupconfig            (empty)
backupjobs              0.078GB
backuplogs              2.077GB
backupsnapshot          0.078GB
cloudconf               0.203GB
local                   0.078GB
mmsdb                   0.078GB
mmsdbagentlog           1.078GB
mmsdbautomation         0.078GB
mmsdbautomationlog      0.078GB
mmsdbconfig             0.328GB
mmsdbdays               0.078GB
mmsdbhours              0.078GB
mmsdbjobs               0.078GB
mmsdbminutes-even       0.078GB
mmsdbminutes-odd        0.078GB
mmsdbpings              0.578GB
mmsdbprovisioning       0.078GB
mmsdbqueues             0.078GB
mmsdbrrdsampling        0.078GB
mongo-distributed-lock  0.078GB
至此,mms 的监控功能就安装好了。通过访问http://10.0.101.128:8080来进行管理。 mms-install 如果有账号就直接登录。没有的话需要注册。 mms-install-2 该用户角色是Owner,用户角色后面再说。登出后再次登录需要以上面的电子邮件和设置的密码进行登录。 mms-install-3 到此,MMS监控服务端已经设置好了。接下来需要设置MMS监控代理。

安装备份服务

MMS备份服务只有试用版本,正式版本需要付费的。备份服务后期再说。
Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
MySQL BLOB : are there any limits?MySQL BLOB : are there any limits?May 08, 2025 am 12:22 AM

MySQLBLOBshavelimits:TINYBLOB(255bytes),BLOB(65,535bytes),MEDIUMBLOB(16,777,215bytes),andLONGBLOB(4,294,967,295bytes).TouseBLOBseffectively:1)ConsiderperformanceimpactsandstorelargeBLOBsexternally;2)Managebackupsandreplicationcarefully;3)Usepathsinst

MySQL : What are the best tools to automate users creation?MySQL : What are the best tools to automate users creation?May 08, 2025 am 12:22 AM

The best tools and technologies for automating the creation of users in MySQL include: 1. MySQLWorkbench, suitable for small to medium-sized environments, easy to use but high resource consumption; 2. Ansible, suitable for multi-server environments, simple but steep learning curve; 3. Custom Python scripts, flexible but need to ensure script security; 4. Puppet and Chef, suitable for large-scale environments, complex but scalable. Scale, learning curve and integration needs should be considered when choosing.

MySQL: Can I search inside a blob?MySQL: Can I search inside a blob?May 08, 2025 am 12:20 AM

Yes,youcansearchinsideaBLOBinMySQLusingspecifictechniques.1)ConverttheBLOBtoaUTF-8stringwithCONVERTfunctionandsearchusingLIKE.2)ForcompressedBLOBs,useUNCOMPRESSbeforeconversion.3)Considerperformanceimpactsanddataencoding.4)Forcomplexdata,externalproc

MySQL String Data Types: A Comprehensive GuideMySQL String Data Types: A Comprehensive GuideMay 08, 2025 am 12:14 AM

MySQLoffersvariousstringdatatypes:1)CHARforfixed-lengthstrings,idealforconsistentlengthdatalikecountrycodes;2)VARCHARforvariable-lengthstrings,suitableforfieldslikenames;3)TEXTtypesforlargertext,goodforblogpostsbutcanimpactperformance;4)BINARYandVARB

Mastering MySQL BLOBs: A Step-by-Step TutorialMastering MySQL BLOBs: A Step-by-Step TutorialMay 08, 2025 am 12:01 AM

TomasterMySQLBLOBs,followthesesteps:1)ChoosetheappropriateBLOBtype(TINYBLOB,BLOB,MEDIUMBLOB,LONGBLOB)basedondatasize.2)InsertdatausingLOAD_FILEforefficiency.3)Storefilereferencesinsteadoffilestoimproveperformance.4)UseDUMPFILEtoretrieveandsaveBLOBsco

BLOB Data Type in MySQL: A Detailed Overview for DevelopersBLOB Data Type in MySQL: A Detailed Overview for DevelopersMay 07, 2025 pm 05:41 PM

BlobdatatypesinmysqlareusedforvoringLargebinarydatalikeImagesoraudio.1) Useblobtypes (tinyblobtolongblob) Basedondatasizeneeds. 2) Storeblobsin Perplate Petooptimize Performance.3) ConsidersxterNal Storage Forel Blob Romana DatabasesizerIndimprovebackupupe

How to Add Users to MySQL from the Command LineHow to Add Users to MySQL from the Command LineMay 07, 2025 pm 05:01 PM

ToadduserstoMySQLfromthecommandline,loginasroot,thenuseCREATEUSER'username'@'host'IDENTIFIEDBY'password';tocreateanewuser.GrantpermissionswithGRANTALLPRIVILEGESONdatabase.*TO'username'@'host';anduseFLUSHPRIVILEGES;toapplychanges.Alwaysusestrongpasswo

What Are the Different String Data Types in MySQL? A Detailed OverviewWhat Are the Different String Data Types in MySQL? A Detailed OverviewMay 07, 2025 pm 03:33 PM

MySQLofferseightstringdatatypes:CHAR,VARCHAR,BINARY,VARBINARY,BLOB,TEXT,ENUM,andSET.1)CHARisfixed-length,idealforconsistentdatalikecountrycodes.2)VARCHARisvariable-length,efficientforvaryingdatalikenames.3)BINARYandVARBINARYstorebinarydata,similartoC

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.