0
点赞
收藏
分享

微信扫一扫

【深入理解TcaplusDB技术】一键安装Tmonitor后台

【深入理解TcaplusDB技术】一键安装Tmonitor后台

一键安装脚本修改

Tmonitor一键安装脚本默认是为TcaplusDB业务编写的,对于其他业务,安装步骤同"Tmonitor单机安装指引",安装前要对以下脚本进行修改:

1.修改init_some_tables.sql。

【深入理解TcaplusDB技术】一键安装Tmonitor后台_nosql

\2. 修改脚本的gen_dcsvr_conf()函数。

【深入理解TcaplusDB技术】一键安装Tmonitor后台_数据库_02

两个Tmonitor互相监控的配置实例:

【深入理解TcaplusDB技术】一键安装Tmonitor后台_tcaplus_03

第二个监控Tmonitor2安装配置

A.修改sql语句、配置文件和执行安装脚本

  1. scp tmonitor_install_2.2.5sp3_130243.tar.gz /data
  2. tar xf tmonitor_install_2.2.5sp3_130243.tar.gz
  3. Vim init_some_tables.sql
  4. 【深入理解TcaplusDB技术】一键安装Tmonitor后台_tcaplus_04
  5. mysql -h10.59.41.57 -uroot -ptcaplus#2003
  6. create database tmonitor2_db;use tmonitor2_db;
  7. source create_tables.sql
  8. source init_some_tables.sql
  9. Vim tmonitor_install.pl
  10. 【深入理解TcaplusDB技术】一键安装Tmonitor后台_数据库_05
  11. 修改tmonitor_conf.xml配置文件,为执行脚本安装做准备
  12. 【深入理解TcaplusDB技术】一键安装Tmonitor后台_腾讯游戏_06
  13. 【深入理解TcaplusDB技术】一键安装Tmonitor后台_数据库_07
  14. 最后执行以下命令安装tmonitor2,有可能出现错误,解决方法如下

$ ./tmonitor_install.pl install

Can't locate XML/Simple.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at ./tmonitor_install.pl line 10.

BEGIN failed--compilation aborted at ./tmonitor_install.pl line 10.


Transaction Check Error:file /usr/share/man/man3/XML::SAX::Base.3pm.gz conflicts between attempted installs of perl-XML-SAX-0.96-7.el6.noarch and perl-XML-SAX-Base-1.04-1.el6.rf.noarchfile /usr/share/man/man3/XML::SAX::Exception.3pm.gz conflicts between attempted installs of perl-XML-SAX-0.96-7.el6.noarch and perl-XML-SAX-Base-1.04-1.el6.rf.noarchError Summary-------------



把rpmforge的关闭(enabled=0,位于/etc/yum.repos.d/rpmforge.repo),

再次安装,成功!搞定!

yum install -y perl-XML*

B.将Tmonitor2注册为一个监控服务器

【深入理解TcaplusDB技术】一键安装Tmonitor后台_nosql_08【深入理解TcaplusDB技术】一键安装Tmonitor后台_腾讯游戏_09

C.将Tmonitor2也注册为一个业务,可以被Tmonitor1监控,实现互相监控

【深入理解TcaplusDB技术】一键安装Tmonitor后台_腾讯游戏_10

D.脚本安装后的手工起进程步骤

  1. ./tmonitor_install.pl install 脚本安装后需要手动启动tagent、tcenterd、tcmcenter、dc_tconnd、dcsvr、sasvr等进程(由于一些配置需要改动)
  2. Tagent:【深入理解TcaplusDB技术】一键安装Tmonitor后台_nosql_11修改后重启
  3. Tcenterd:【深入理解TcaplusDB技术】一键安装Tmonitor后台_数据库_12修改后重启
  4. Tcmcenter: 需要先修改host.xml里的准确IP地址,然后重启
  5. Dc_tconnd:在以上几个进程启动成功后,进入tcmconsole里start
  6. Dcsvr:使用以下命令修改dcsvr.xml的配置,然后启动进程

sed -i '/DBMSHost/c <DBMSHost>10.59.41.57</DBMSHost>' dcsvr.xml

sed -i '/DBMSPassword/c <DBMSPassword>XXXXX</DBMSPassword>' dcsvr.xml

sed -i '/DBName/c <DBName>tmonitor2_db</DBName>' dcsvr.xml <----------填写A-5建立的库名

sed -i '/DBMSUser/c <DBMSUser>tmonitor</DBMSUser>' dcsvr.xml

7. Sasvr:需要修改sasvr.xml里面连的db(修改为前端页面使用的db,即tmonitor_center_db)和weburl

E. Tmonitor2安装完毕

第一个监控Tmonitor1安装配置

负责监控Tcaplus集群的Tmonitor1需要为自己添加dc_tconnd和dcsvr进程上报自身的状态,方能给tmonitor2监控。以下是配置步骤:

A. 准备工作

cd ~/tmonitor_install

cp -rp dc_tconnd_1 dc_tconnd_9

cp -rp dcsvr_1 dcsvr_9

B. 为Tmonitor1建库建表

Vim init_some_tables.sql

【深入理解TcaplusDB技术】一键安装Tmonitor后台_数据库_13

mysql -h10.59.41.57 -uroot -ptcaplus#2003

create database tmonitor1_db;

Use tmonitor1_db;

source create_tables.sql

source init_some_tables.sql

C. 配置dc_tconnd

1.修改dc_tconnd_9的配置文件xml

【深入理解TcaplusDB技术】一键安装Tmonitor后台_腾讯游戏_14【深入理解TcaplusDB技术】一键安装Tmonitor后台_数据库_15

2.修改dc_tconnd_9的日志配置文件tconnd_log.xml

【深入理解TcaplusDB技术】一键安装Tmonitor后台_tcaplus_16

3.修改dc_tconnd_9的进程启动、停止脚本里的id

【深入理解TcaplusDB技术】一键安装Tmonitor后台_tcaplus_17

D.配置dcsvr_9

1.修改dcsvr_9的配置文件xml,确保存在sasvr和dcsvr两个进程项(可修改其他的进程项,因为这里只需要用到sasvr和dcsvr)

【深入理解TcaplusDB技术】一键安装Tmonitor后台_数据库_18

2.修改dcsvr_9的日志配置文件dcsvr_log.xml(此处进程ID得和C-1的修改值一致)

【深入理解TcaplusDB技术】一键安装Tmonitor后台_tcaplus_19

3.修改dcsvr_9的进程启动、停止脚本里的id(此处进程ID得和C-1的修改值一致)

【深入理解TcaplusDB技术】一键安装Tmonitor后台_数据库_20

E.将dc_tconnd_9和dcsvr_9添加到tcm管理,并为他们下发tbus通道,最后启动dc_tconnd_9和dcsvr_9

1.添加进程信息到proc_deploy.xml

【深入理解TcaplusDB技术】一键安装Tmonitor后台_tcaplus_21

2.重启tcmcenter

3.从tcmconsole里下发tbus通道:refreshbuscfg ...

4.到各自的bin目录下启动进程:./start_tconnd.sh; ./start_dcsvr.sh

F.为受控Tmonitor1进程做配置、采集策略下发、告警策略配置

1.Tmonitor1的web基础配置

【深入理解TcaplusDB技术】一键安装Tmonitor后台_腾讯游戏_22

2.采集策略下发

【深入理解TcaplusDB技术】一键安装Tmonitor后台_数据库_23

3.采集策略下发后观察几分钟,如下图为正常

【深入理解TcaplusDB技术】一键安装Tmonitor后台_数据库_24

4.添加默认告警接收者和配置告警策略

TcaplusDB是腾讯出品的分布式NoSQL数据库,存储和调度的代码完全自研。具备缓存+落地融合架构、PB级存储、毫秒级时延、无损水平扩展和复杂数据结构等特性。同时具备丰富的生态、便捷的迁移、极低的运维成本和五个九高可用等特点。客户覆盖游戏、互联网、政务、金融、制造和物联网等领域。


举报

相关推荐

0 条评论