WEBGATE - APM 安装总结

安装前准备

安装环境要求

类别 版本
操作系统 RedHat:7.X
数据库 MySql数据库(mysql-8.0.29-el7-x86_64)
Java环境 JDK8
浏览器 Chrome:71+

单机环境资源需求

主机名称 CPU 内存 磁盘空间 JAVA环境 网络
主机1 Inter3.6GHz 8核 32G 128G JDK1.8 千兆网卡

创建用户并设置sudo

#创建bes普通用户
useradd -m bes -s /bin/bash#设置sudo权限
`vi /etc/sudoers`或者`visudo`在`root ALL=(ALL) ALL`行后追加,追加的内容
bes ALL=(ALL) NOPASSWD:ALL

JDK安装

#解压
install_home=/opt/WEBGATEtar -zxvf jdk-8u251-linux-x64.tar.gz -C ${install_home}#配置环境变量
在/home/bes/.bashrc文件最后一行添加如下内容
export JAVA_HOME=/opt/WEBGATE/jdk1.8.0_251
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar#刷新.bashrc
source ~/.bashrc#验证JDK环境变量
[bes@bogon ~]$ echo $JAVA_HOME
/opt/WEBGATE/jdk1.8.0_251[bes@bogon ~]$ java -version
java version "1.8.0_251"
Java(TM) SE Runtime Environment (build 1.8.0_251-b08)
Java HotSpot(TM) 64-Bit Server VM (build 25.251-b08, mixed mode)

主机名映射检查

#查看机器IP与主机名映射是否配置,若没配置请添加映射,否则会导致kafka启动异常
[bes@bogon ~]$ hostname
bogon
[bes@bogon ~]$ cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.0.182 bogon

SSH服务检查

#确保各机器SSH服务(默认端口22)可用[bes@bogon ~]$ ssh bes@bogon
The authenticity of host 'bogon (192.168.0.182)' can't be established.
ECDSA key fingerprint is SHA256:x5Uhak0nc/pL19SnxOEgVi7NzQSgokIRfamxBhflpJY.
ECDSA key fingerprint is MD5:02:85:0d:d5:a7:1f:a6:1c:79:87:ae:37:a1:00:48:31.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'bogon,192.168.0.182' (ECDSA) to the list of known hosts.
bes@bogon's password:
Last login: Fri Apr 15 10:46:48 2022 from 192.168.0.2

最大文件描述符及最大进程数

[bes@bogon ~]$ tail /etc/security/limits.conf
#@faculty        hard    nproc           50
#ftp             hard    nproc           0
#@student        -       maxlogins       4* soft nofile 65536
* hard nofile 65536
* soft nproc 65536
* hard nproc 65536# End of file[bes@bogon ~]$ cat /etc/security/limits.d/20-nproc.conf
# Default limit for number of user's processes to prevent
# accidental fork bombs.
# See rhbz #432903 for reasoning.#*          soft    nproc     4096
root       soft    nproc     unlimited* soft nproc 65536
* hard nproc 65536[bes@bogon ~]$ ulimit -u -n
max user processes              (-u) 65536
open files                      (-n) 65536

内存映射最大数量

[bes@bogon ~]$ cat /etc/sysctl.conf
# sysctl settings are defined through files in
# /usr/lib/sysctl.d/, /run/sysctl.d/, and /etc/sysctl.d/.
#
# Vendors settings live in /usr/lib/sysctl.d/.
# To override a whole file, create a new file with the same in
# /etc/sysctl.d/ and put new settings there. To override
# only specific settings, add a file with a lexically later
# name in /etc/sysctl.d/ and put new settings there.
#
# For more information, see sysctl.conf(5) and sysctl.d(5).vm.max_map_count=262144#重新加载内核参数
sudo sysctl -p

服务端口开放

服务名称 端口
Zookeeper 2181、8081
kafka 9092
AnalyticDB 3650
NGINX 80 (nginx server端口默认为80,非root用户无法绑定80以内的端口,可根据实际需求修改)
3651、3652、3653、3654(集群环境analyticdb数据库使用)
webgate-alarm 8084、9898
webgate-collector 6109、6009
webgate-container 8989
webgate-container-collector 6119
webgate-export 8180
webgate-console 8080
amdb 7600、7664(AMDB代理端口)
nacos 8848
UserManager 7200
datacool 8888
webgate-kafka-sink 8003
mysql 3306
webgate-portal-console 9101
webgate-infrastructureconsole 9100
webgate-infrastructureprobe 8253、8125
webgate-job-schedule 8188
webgate-rum-console 8090
webgate-app 9090
webgate-k8s-probe 30060
#检测端口开放命令:
netstat工具检测开放端口: netstat -anlp|grep 8080
lsof工具检测开放端口: lsof -i:8080

产品安装

安装包介绍

#usermanager
https://resource.bessystem.com/download/Infrastructure/UserManager/1.1.0Beta7/media/INFRA-USERMANAGER-1.1.0.1409.tar.gz#amdb
https://resource.bessystem.com/download/AMDB/3.1.0RC1/media/BES-OpsLink-AMDB-3.2.0-BETA1.tar.gz#datacool
https://resource.bessystem.com/download/DataCool/DataCool1.9.1/media/datacool-dvc-1.9.2.16356.tar.gz
#webgate
https://resource.bessystem.com/download/WebGate/BES-WebGate-22.0/media/BES-WEBGATE-INTEGRATION-4.0.0.tar.gz
https://resource.bessystem.com/download/WebGate/BES-WebGate-22.0/patch/22.0-002/BES-WEBGATE-INTEGRATION-4.0.0.002.T002.tar.gz

提供组件安装依赖介质如下所示:
​ 基础组件安装介质:kafka、zookeeper、analyticdb、nginx
​ 产品组件安装介质:webgate-alarm、webgate-collector、webgate-kafka-sink、webgate-job-schedule、 webgate-portal-console、report、BES-LITE组件安装的脚本和配置文件

#APM
https://resource.bessystem.com/download/WebGate/BES-WebGate-22.0/media/BES-WEBGATE-APM-4.0.0.tar.gzhttps://resource.bessystem.com/download/WebGate/BES-WebGate-22.0/patch/22.0-002/BES-WEBGATE-APM-4.0.0.002.T002.tar.gz

提供子产品apm的服务安装包和探针安装包:webgate-console.war、webgate-agent-sdk-3.0.0.jar、webgate-agent.zip

单机环境基础组件安装

#解压安装包
install_home=/opt/WEBGATEtar -zxvf BES-WEBGATE-APM-3.4.0.tar.gz -C ${install_home}
tar -zxvf BES-WEBGATE-INTEGRATION-3.4.0.tar.gz -C ${install_home}
tar -zxvf BES-WEBGATE-INFRASTRUCTURE-3.4.0.tar.gz -C ${install_home}#安装脚本目录如下:
${install_home}/besinsight/software/webgate/server/BES-WEBGATE-INTEGRATION/bin/webgate-standalone
脚本名称 说明
env.sh 单机安装环境配置脚本,包括初始化内容的配置
install.sh 单机安装一键安装脚本执行入口
start.sh 单机安装一键启动脚本执行入口,执行时需要选择需要启动的具体组件
check.sh 单机安装组件状态检查执行入口,执行时需要选择需要检查的具体组件
install-assemble.sh 单机安装一键安装脚本,可配置安装的组件
install-zk.sh zookeeper自动化安装脚本,对应的配置目录为:zookeeper
install-mysql.sh mysql自动化安装脚本,对应的配置目录为:mysql
install-jdk.sh jdk自动化安装脚本
install-kafka.sh kafka自动化安装脚本,对应的配置目录为:kafka
install-analyticdb.sh analyticdb自动化安装脚本
install-nginx.sh nginx自动化安装脚本,对应的配置目录为:nginx
start-init-analyticdb.sh analyticdb启动初始化脚本,用于analyticdb组件已解压,但没有初始化和启动
start-init-kafka.sh kafka启动初始化脚本,用于kafka组件已解压,但没有初始化和启动
start-init-mysql.sh mysql启动初始化脚本,用于mysql组件已解压,但没有初始化和启动
start-init-zk.sh zk启动初始化脚本,用于zk组件已解压,但没有初始化和启动
start-init.sh 所有基础组件启动初始化脚本,用于组件已解压,但没有初始化和启动
init-analyticdb.sh 初始化adb数据库脚本
stop.sh 单机一键停止组件脚本,可以选择要关闭的组件
install_home=/opt/WEBGATE
#放置MySQL安装包到component目录
[bes@bogon tmp]$ cp ~/tmp/mysql-8.0.29-el7-x86_64.tar.gz ${install_home}/besinsight/software/webgate/server/BES-WEBGATE-INTEGRATION/component#执行init-component.sh,在component目录生成NGINX安装包
[bes@bogon tmp]$ sh ${install_home}/besinsight/software/webgate/server/BES-WEBGATE-INTEGRATION/bin/init-component.sh#修改env.sh 中mysql_name、NGINX_port
[bes@bogon webgate-standalone]$ pwd
/opt/WEBGATE/besinsight/software/webgate/server/BES-WEBGATE-INTEGRATION/bin/webgate-standalone[bes@bogon webgate-standalone]$ head -n 27 env.sh
#!/bin/bash
WORKSPACE=/home/bes/workspace
##path
COMPONENTS_PATH=/../component
APPLICATION_PATH=./../component
CONFIG_PATH=/webgate-config
SCRIPT_PATH=./../script
STANDALONE_PATH=webgate-standalone
##name
ZOOKEEPER_NAME=zookeeper-3.6.3
`MYSQL_NAME=mysql-8.0.29-el7-x86_64`
NGINX_NAME=nginx-1.14.0
`NGINX_PORT=10080`
NGINX_BALANCE_HOME=${NGINX_WORKSPACE}/nginx
KAFKA_NAME=kafka_2.12-2.4.0
KAFKA_ROOT_PATH=/kafka
ANALYTICDB_NAME=AnalyticDB-1.0.0
#JDK_NAME=jdk-8u251-linux-x64
ENV_FILE=~/.bashrcINIT_APM_ANALYTICDB=true
INIT_APP_ANALYTICDB=false
INIT_BROWSER_ANALYTICDB=false
INIT_CONTAINER_ANALYTICDB=true#开始安装
[bes@bogon webgate-standalone]$ ./install.sh#检查各服务是否运行正常
[bes@bogon webgate-standalone]$ ./check.sh
select one from the list of components[zookeeper mysql kafka analyticdb nginx],or use ALL to select all,or exit(exit):ALL
ZooKeeper JMX enabled by default
Using config: /home/bes/workspace/zookeeper-3.6.3/bin/../conf/zoo.cfg####|2022-04-15 14:11:39|INFO|zookeeper-3.6.3 is ready......
mysqladmin: [Warning] Using a password on the command line interface can be insecure.####|2022-04-15 14:11:39|INFO|mysql-8.0.29-el7-x86_64 is ready......####|2022-04-15 14:11:41|INFO|kafka_2.12-2.4.0 is ready......
AnalyticDB is running####|2022-04-15 14:11:41|INFO|AnalyticDB-1.0.0 is ready......####|2022-04-15 14:11:41|INFO|nginx-1.14.0 is ready......

外接服务安装

INFRA-USERMANAGER安装

MYSQL_HOME=/home/bes/workspace/mysql-8.0.29-el7-x86_64/
install_home=/opt/WEBGATE#解压infra-usermanager
[bes@bogon tmp]$ tar zxvf ~/tmp/INFRA-USERMANAGER-1.1.0.1755.tar.gz -C ${install_home}#选择数据库驱动 放置在infra-usermanager/drivers目录
[bes@bogon tmp]$ cp ~/tmp/mysql-connector-java-8.0.29.jar ${install_home}/infra-usermanager/drivers/#创建数据库 导入元数据
${MYSQL_HOME}/bin/mysql -uroot -p123456 --socket=${MYSQL_HOME}/mysql.sock -e "create database infra_usermanager;"
${MYSQL_HOME}/bin/mysql -uroot -p123456 --socket=${MYSQL_HOME}/mysql.sock -e "create user infra@'%' identified by 'infra';"
${MYSQL_HOME}/bin/mysql -uroot -p123456 --socket=${MYSQL_HOME}/mysql.sock -e "grant all on infra_usermanager.* to 'infra'@'%';"
${MYSQL_HOME}/bin/mysql -uroot -p123456 -D'infra_usermanager' --socket=${MYSQL_HOME}/mysql.sock < ${install_home}/infra-usermanager/resources/sqls/mysql/usermanager.sql#修改数据库连接信息
[bes@bogon conf]$ pwd
/opt/WEBGATE/infra-usermanager/conf[bes@bogon conf]$ cat config.properties
database.driverClassName=com.mysql.cj.jdbc.Driver
database.url=jdbc:mysql://192.168.0.182:3306/infra_usermanager?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
database.username=infra
database.password=infra
spring_profiles=mysql
issuerUri=http://192.168.0.182:7200/usermanager#启动usermanager
[bes@bogon bin]$ pwd
/opt/WEBGATE/infra-usermanager/bin[bes@bogon bin]$ nohup ./startup.sh &#查看日志
[bes@bogon bin]$ tail -f nohup.out

AMDB安装

MYSQL_HOME=/home/bes/workspace/mysql-8.0.29-el7-x86_64/
install_home=/opt/WEBGATE#解压BES-OpsLink-AMDB
[bes@bogon tmp]$ tar zxvf ~/tmp/BES-OpsLink-AMDB-3.2.0-BETA1.tar.gz -C ${install_home}
[bes@bogon amdb]$ ll
总用量 0
drwxrwxr-x. 10 bes bes 195 3月   8 11:22 amdb-autodiscovery #BES OpsLink AMDB自动发现目录
drwxrwxr-x. 15 bes bes 270 3月   9 16:39 amdb-confs #BES OpsLink AMDB主服务目录#AMDB主服务目录
[bes@bogon amdb-confs]$ ll
总用量 88
drwxrwxr-x.  2 bes bes    39 3月  12 16:14 alarm
drwxrwxr-x.  2 bes bes   221 3月   9 13:21 bin #提供BES OpsLink AMDB的命令行、启停进程操作脚本
drwxrwxr-x.  6 bes bes    73 12月 31 20:31 cmd #提供BES OpsLink AMDB命令服务目录
drwxrwxr-x.  2 bes bes  4096 3月   1 14:01 conf #运行BES OpsLink AMDB时需要的配置文件
drwxrwxr-x.  8 bes bes  8192 3月   7 11:18 data #提供BES OpsLink AMDB所需的基础数据的导入文件
drwxrwxr-x.  2 bes bes   106 3月   8 14:51 drivers #主服务运行所需数据库驱动文件的目录
drwxrwxr-x.  3 bes bes    17 12月 31 20:31 graph-db #数据分析模块依赖的图库服务
-rwxrwxr-x.  1 bes bes   419 12月 31 20:31 import_data.sh #提供自动导入基础数据的功能
-rw-rw-r--.  1 bes bes   437 3月   1 13:51 install.config #静默安装时使用的安装配置文件
-rw-rw-r--.  1 bes bes 13094 12月 31 20:32 install.jar #install.sh脚本中使用的jar文件
-rwxrwxr-x.  1 bes bes 16966 12月 31 20:31 install.sh #提供自动配置数据库、统一认证信息及配置自动发现相关信息的功能
drwxrwxr-x.  2 bes bes    61 3月   1 14:01 license #license文件
-rw-rw-r--.  1 bes bes 22274 12月 31 20:31 LICENSE.txt #版权声明条款文件
drwxrwxr-x.  2 bes bes  4096 3月  13 14:15 logs
drwxrwxr-x.  2 bes bes    21 12月 31 20:31 patch #版本信息
drwxrwxr-x.  6 bes bes    63 12月 31 20:23 sql #运行时需要的数据库中元数据的sql文件
drwxrwxr-x.  3 bes bes    17 3月  10 18:04 tmp #临时目录
drwxrwxr-x. 10 bes bes   109 3月   7 10:57 work #自动部署主服务后台、控制台及物理拓扑图的中间件目录#AMDB自动发现目录
[bes@bogon amdb-autodiscovery]$ ll
总用量 68
drwxrwxr-x. 2 bes bes   106 12月 31 20:31 client #提供自动发现代理客户端安装介质及安装脚本
drwxrwxr-x. 3 bes bes    19 12月 31 20:32 components #运行自动发现服务依赖的组件目录
drwxrwxr-x. 2 bes bes    24 12月 31 20:31 config
-rw-rw-r--. 1 bes bes 13094 12月 31 20:32 config.jar #config.sh脚本中使用的jar文件
-rw-rw-r--. 1 bes bes   710 3月   7 13:19 config.properties #静默安装时使用的配置文件
-rwxrwxr-x. 1 bes bes 21173 12月 31 20:32 config.sh #提供自动配置BES OpsLink AMDB配置库服务URL、自动发现服务对应的数据库连接信息、自动发现服务配置所需的nacos组件相关信息、代理介质ftp相关信息的功能。
drwxrwxr-x. 6 bes bes   111 12月 31 20:23 data #提供自动发现所需的基础数据的导入文件
drwxrwxr-x. 7 bes bes    65 3月   7 10:10 import
-rw-rw-r--. 1 bes bes 22274 12月 31 20:31 LICENSE.txt #版权声明条款文件
drwxrwxr-x. 2 bes bes    21 12月 31 20:32 patch #提供BES OpsLink AMDB的版本信息
drwxrwxr-x. 6 bes bes   145 12月 31 20:31 server #提供自动发现服务
drwxrwxr-x. 6 bes bes    63 12月 31 20:31 sql #提供自动发现运行时需要的数据库元数据的sql文件
安装部署主服务
#导入初始化表数据
${MYSQL_HOME}/bin/mysql -uroot -p123456  --socket=${MYSQL_HOME}/mysql.sock < ${install_home}/amdb3/amdb-confs/sql/mysql/init_amdb_confs.sql
${MYSQL_HOME}/bin/mysql -uroot -p123456  --socket=${MYSQL_HOME}/mysql.sock -e "grant all on amdb.* to 'infra'@'%';"#在主服务drivers放置所需的数据库驱动
[bes@bogon tmp]$ cp ~/tmp/mysql-connector-java-8.0.29.jar ${install_home}/amdb3/amdb-confs/drivers #amdb主服务数据库驱动目录#修改静默方式install.config统一认证、数据库信息
[bes@bogon tmp]$ cd ${install_home}/amdb3/amdb-confs/
[bes@bogon amdb-confs]$ cat install.config
# BES OpsLink AMDB安装向导自动生成配置
amdb.env=normal
amdb.usermanager.clientId=AMDB
amdb.usermanager.usermanagerUrl=http://192.168.0.182:7200/usermanager
amdb.database.driver=com.mysql.cj.jdbc.Driver
amdb.database.url=jdbc:mysql://192.168.0.182:3306/amdb?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
amdb.database.username=infra
amdb.database.password=infra
amdb.graph.info=disable
amdb.autodiscovery.url=http://192.168.0.182:7660
amdb.asset.enable=false
amdb.asset.url=http://192.168.0.182:7680#静默安装amdb主服务
[bes@bogon amdb-confs]$ ./install.sh --silent #静默安装#将AMDB接入统一认证
http://IP:7200/usermanager/访问统一认证的控制台,点击左侧服务管理菜单,进行新建服务操作

#导入基础数据
[bes@bogon amdb-confs]$ ./import_data.sh #AMDB配置管理中的数据#部署后端主服务、控制台、物理拓扑图
跳过#启动amdb主服务
#amdb-conf
[bes@bogon amdb-confs]$ cd ${install_home}/amdb3/amdb-confs/bin
[bes@bogon bin]$ nohup ./startup.sh &
[bes@bogon bin]$ tail -f nohup.out#访问amdb主服务
浏览器中输入url为http://IP:Port/amdb,其中IP是部署BES OpsLink AMDB服务所在的机器IP,Port默认是
7600,可通过修改work/conf的server.config来修改端口。进行访问⻚面跳转至统一认证的登录⻚。
安装部署自动发现服务
#安装nacos组件
#在nacos drivers目录放置所需的数据库驱动
[bes@bogon tmp]$ cp ~/tmp/mysql-connector-java-8.0.29.jar ${install_home}/amdb3/amdb-autodiscovery/components/nacos/drivers#nacos驱动目录#导入初始化表数据
${MYSQL_HOME}/bin/mysql -uroot -p123456 --socket=${MYSQL_HOME}/mysql.sock -e 'create database nacos;'
${MYSQL_HOME}/bin/mysql -uroot -p123456 -D'nacos' --socket=${MYSQL_HOME}/mysql.sock < ${install_home}/amdb3/amdb-autodiscovery/components/nacos/sql/nacos-mysql.sql
${MYSQL_HOME}/bin/mysql -uroot -p123456  --socket=${MYSQL_HOME}/mysql.sock -e "grant all on nacos.* to 'infra'@'%';"#修改数据库连接
[bes@bogon tmp]$ cd ${install_home}/amdb3/amdb-autodiscovery/components/nacos/conf
[bes@bogon conf]$ grep -A 10 'Config Module Related Configurations' application.properties
db.num=1
spring.datasource.platform=mysql
db.jdbcDriverName=com.mysql.cj.jdbc.Driver
db.url.0=jdbc:mysql://192.168.0.182:3306/nacos?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true
db.user=infra
db.password=infra#启动nacos
[bes@bogon conf]$ cd ..
[bes@bogon conf]$ ./bin/startup.sh -m standalone #启动nacos
[bes@bogon conf]$ tail -f ./logs/start.out#使用浏览器访问http://192.168.0.182:8848/nacos,用户名和密码都是nacos
注:如果是国产环境不能使用mysql,那么跳过导入nocos元数据和修改数据库连接信息 ,直接启动即可,直接启动是使用nacos自带的数据库。
#安装FTPserver
install_home=/opt/WEBGATE1. 下载FtpServer介质
下载地址:http://mina.apache.org/ftpserver-project/downloads.html
2. 解压介质
tar -xzvf ~/tmp/ftpserver-1.1.1.tar.gz -C ${install_home}
3. 配置
进入安装目录
a)res/conf/users.properties
ftpserver.user.admin.homedirectory 为数据的存放目录
ftpserver.user.admin.userpassword=admin 其中第一个admin为用户名,第二个
admin为密码,其中密码可以为明文,可以根据需求自行添加用户
b)res/conf/ftpd-typical.xml
默认端口是2121,可在该文件中修改访问端口;
在file-user-manager中设置encrypt-passwords=“clear”4. 启动
nohup ./bin/ftpd.sh res/conf/ftpd-typical.xml &代理安装介质和安装脚本文件在amdb-autodiscovery/client目录下,需要用户手动上传[bes@bogon conf]$ grep 'file-user-manager'  ftpd-typical.xml <file-user-manager file="./res/conf/users.properties" encrypt-passwords="clear"/>文件到ftp文件下载服务器。
#安装自动发现服务
#初始化数据库元数据
${MYSQL_HOME}/bin/mysql -uroot -p123456 --socket=${MYSQL_HOME}/mysql.sock -e 'create database autodiscovery;'
${MYSQL_HOME}/bin/mysql -uroot -p123456 -D'autodiscovery' --socket=${MYSQL_HOME}/mysql.sock < ${install_home}/amdb3/amdb-autodiscovery/sql/mysql/agent.sql
${MYSQL_HOME}/bin/mysql -uroot -p123456 -D'autodiscovery' --socket=${MYSQL_HOME}/mysql.sock < ${install_home}/amdb3/amdb-autodiscovery/sql/mysql/quartz.sql
${MYSQL_HOME}/bin/mysql -uroot -p123456 -D'autodiscovery' --socket=${MYSQL_HOME}/mysql.sock < ${install_home}/amdb3/amdb-autodiscovery/sql/mysql/resource.sql
${MYSQL_HOME}/bin/mysql -uroot -p123456 -D'autodiscovery' --socket=${MYSQL_HOME}/mysql.sock < ${install_home}/amdb3/amdb-autodiscovery/sql/mysql/task.sql
${MYSQL_HOME}/bin/mysql -uroot -p123456  --socket=${MYSQL_HOME}/mysql.sock -e "grant all on autodiscovery.* to 'infra'@'%';"#修改数据库连接地址,用户名,密码
[bes@bogon amdb-autodiscovery]$ pwd
/opt/WEBGATE/amdb3/amdb-autodiscovery[bes@bogon amdb-autodiscovery]$ grep -A 5  mysql config.properties
amdb.database.driver=com.mysql.cj.jdbc.Driver
amdb.database.url=jdbc:mysql://192.168.0.182:3306/autodiscovery?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
amdb.database.username=infra
amdb.database.password=infra
amdb.nacos.url=http://192.168.0.182:8848
amdb.nacos.username=nacos
amdb.nacos.password=nacos#静默安装
[bes@bogon amdb-autodiscovery]$ ./config.sh --silent
#配置自动发现服务
#导入自动发现所需的基础数据
[bes@bogon tmp]$ cp ~/tmp/mysql-connector-java-8.0.29.jar ${install_home}/amdb3/amdb-autodiscovery/import/lib #数据库驱动
[bes@bogon amdb-autodiscovery]$ cd import/bin
[bes@bogon bin]$ ./startup.sh #在自动发现添加一些采集数据的脚本#将自动发现服务配置导入nacos中
1. 将${install_home}/amdb3/amdb-autodiscovery/config/config.zip文件放到浏览器所在机器上。
2. 通过浏览器访问nacos组件,并登录。
3. 在“命令空间”,点击“新建命名空间”,正确输入
命名空间ID `d97b6ead-df5b-4245-8731-10d923ca10e5`
命名空间名 autodiscovery
描述 autodiscovery (静默安装nacos时config.properties文件中的NACOS Namespace ID),
命名空间名称和描述可随意填写,点击“确定”按钮。
4. 在“配置管理-配置列表”,选择刚创建的命名空间,点击“导入配置”,“上传文件”选择config.zip,成功
导入配置后,可以检查配置正确性。

install_home=/opt/WEBGATE#安装自动发现服务
#代理服务
#资源服务
#任务调度服务
cp ~/tmp/mysql-connector-java-8.0.29.jar ${install_home}/amdb3/amdb-autodiscovery/server/amdb-autodiscovery-agent-server/lib
cp ~/tmp/mysql-connector-java-8.0.29.jar ${install_home}/amdb3/amdb-autodiscovery/server/amdb-autodiscovery-resource/lib
cp ~/tmp/mysql-connector-java-8.0.29.jar ${install_home}/amdb3/amdb-autodiscovery/server/amdb-autodiscovery-task/lib #安装自动发现客户端(手动)
#前提:代理安装的机器上需要部署JDK1.8版本
[bes@bogon client]$ cd ${install_home}/amdb3/amdb-autodiscovery/client
[bes@bogon client]$ ./InstallAutodiscoveryAgent.sh ./BES-OpsLink-AMDB-AUTODISCOVERY-AGENT-CLIENT-3.2.0.tar.gz ${install_home}#启动自动发现服务
#amdb-autodiscover-gateway
sh ${install_home}/amdb3/amdb-autodiscovery/server/amdb-autodiscovery-gateway/bin/startup.sh
sh ${install_home}/amdb3/amdb-autodiscovery/server/amdb-autodiscovery-agent-server/bin/startup.sh
sh ${install_home}/amdb3/amdb-autodiscovery/server/amdb-autodiscovery-resource/bin/startup.sh
sh ${install_home}/amdb3/amdb-autodiscovery/server/amdb-autodiscovery-task/bin/startup.sh[bes@bogon client]$ tail -f ${install_home}/amdb3/amdb-autodiscovery/server/amdb-autodiscovery-gateway/logs/spring.log #amdb-autodiscover-agent
tail -f ${install_home}/amdb3/amdb-autodiscovery/server/amdb-autodiscovery-agent-server/logs/spring.log #amdb-autodiscover-resurce
tail -f ${install_home}/amdb3/amdb-autodiscovery/server/amdb-autodiscovery-resource/logs/spring.log #amdb-autodiscover-task
tail -f ${install_home}/amdb3/amdb-autodiscovery/server/amdb-autodiscovery-task/logs/spring.log #amdb-autodiscovery-agent-client
[bes@bogon client]$ sh ${install_home}/amdb-autodiscovery-agent-client/bin/startup.sh
[bes@bogon client]$ tail -f ${install_home}/amdb-autodiscovery-agent-client/logs/spring.log

DATACOOL安装

MYSQL_HOME=/home/bes/workspace/mysql-8.0.29-el7-x86_64/
install_home=/opt/WEBGATE#解压介质
[bes@bogon datacool]$ tar zxvf ~/tmp/DATACOOL-DVC-1.9.2.16947.tar.gz -C ${install_home}#放置数据库驱动在datacool lib目录
cp ~/tmp/mysql-connector-java-8.0.29.jar ${install_home}/datacool-dvc-1.9.2/lib #修改application.yml 文件
[bes@bogon config]$ pwd
/opt/WEBGATE/datacool-dvc-1.9.2/config[bes@bogon config]$ grep -A 5 com.mysql.cj.jdbc.Driver application.yml driverClassName: com.mysql.cj.jdbc.Driverdruid:rw:url: jdbc:mysql://192.168.0.182:3306/datacool?useSSL=false&characterEncoding=UTF-8&allowMultiQueries=true&useUnicode=true&serverTimezone=Asia/Shanghaiusername: infrapassword: infra
...
oauth:enabled: true #接入统一认证autoLoginEnabled: true #开启自动登录#初始化数据库
${MYSQL_HOME}/bin/mysql -uroot -p123456  --socket=${MYSQL_HOME}/mysql.sock < ${install_home}/datacool-dvc-1.9.2/db/datacool_mysql.sql
${MYSQL_HOME}/bin/mysql -uroot -p123456  --socket=${MYSQL_HOME}/mysql.sock -e "grant all on datacool.* to 'infra'@'%';"#启动datacool
[bes@bogon datacool-dvc-1.9.2]$ pwd
/opt/WEBGATE/datacool-dvc-1.9.2[bes@bogon datacool-dvc-1.9.2]$ nohup ./start.sh &访问url:http://localhost:8888/datacool-dvc/console/进入DATACOOL系统登录⻚面。
默认用户admin,
密码admin。
#将datacool接入统一认证
http://IP:7200/usermanager/访问统一认证的控制台,点击左侧服务管理菜单,进行新建服务操作

#服务名称自定义;
服务ID datacool
状态启用
类型下拉选择 DataCool
主机名是datacool服务的ip地址
端口为8888 datacool默认端口
应用名称填写为/datacool-dvc
配置完成后保存。这里应保证主机名、端口、应用名称构成的拼接地址(http://主机名:端口/应用名称)与datacool实际提供访问的地址一致。
注意:统一认证中配置的datacool的服务ID为datacool ,不能写错,否则会出现问题。

webgate-config配置

#配置Zookeeper 、Kafka、JDBC、AMDB、DATACOOL、analyticdb、RUM URL、APP URL、Authorization以及webgate job schedule相关信息。#单机webgate-config目录:${workspace}/webgate-config/conf/config.properties
workspace=/home/bes/workspace[bes@bogon datacool-dvc-1.9.2]$ cd ${workspace}/webgate-config/conf/
[bes@bogon conf]$ sed -i 's#localhost#192.168.0.182#g' config.properties[bes@bogon conf]$ grep -v -E "#|^$" config.properties
zookeeper.info=192.168.0.182:2181
zookeeper.path=/webgate/cluster
bootstrap.servers=192.168.0.182:9092
jdbc.driverClassName=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://192.168.0.182:3306/webgate?characterEncoding=UTF-8&rewriteBatchedStatements=true&useSSL=false
jdbc.username=root
jdbc.password=123456
jdbc.database.type=mysql
jdbc.database.oscar.validationQuery=select 1
jdbc.database.mysql.validationQuery=select 1
jdbc.database.kingbase.validationQuery=select 1
jdbc.database.oracle.validationQuery=select 1 FROM DUAL
cache.token.check=5
cache.user.manager=5
tenant.check=on
amdb.ip=192.168.0.182
amdb.port=7600
amdb.appname=/amdb-console
appchecker.url=http://192.168.0.182:8080/appchecker-console-2.4.0
alarmsys.serviceName=webgate
alarmsys.apiUrl=
alarmsys.apiUrl_recover=
alarm.insertRecoverMessage=false
report.system.url=http://192.168.0.182:7100/report-console/index
password.valid.strategy=default
authorization.useusermanager=true
authorization.clientId=WebGate
authorization.clientId.integration=webgateIntegration
authorization.usermanagerUrl=http://192.168.0.182:7200/usermanager
authorization.usermanagerUrl.client=http://192.168.0.182:7200/usermanager
authorization.clientSecret=appclientsecret
authorization.interval=7200
authorization.checkToken=300
browser.authorization.clientId=WebGateBrowser
container.enable=false
trend.prediction.enable=false
capacity.prediction.enable=false
rootCause.analysis.enable=false
memoryLeak.analysis.enable=false
dynamicBaseline.enable=false
dynamicBaseline.learningEnhanced.enable=false
aiLearning.url=http://192.168.0.182:9881
datacool.url=http://192.168.0.182:8888/datacool-dvc/dvi/index.html
webgate.console.url=http://192.168.0.182:9101/webgate-portal-console
sink.plugin.apm=webgate-kafka-sink-apm-3.0.0.jar
sink.plugin.browser=webgate-kafka-sink-browser-3.0.0.jar
sink.plugin.app = webgate-kafka-sink-app-4.0.0.jar
sink.plugin.inf=webgate-kafka-sink-inf-3.0.0.jar
sink.plugin.container=webgate-kafka-sink-container-3.0.0.jar
sink.adb.writeLocal=false
analyticdb.driverClassName=com.bes.analyticdb.jdbc.AnalyticDBDriver
analyticdb.url=jdbc:analyticdb://192.168.0.182:3650/webgate
analyticdb.username=bes
analyticdb.password=password
browser.service.url=http://192.168.0.182:8090/webgate-browser-console/
app.service.url=http://192.168.0.182:9090/webgate-app-console/
schedule.server.port=50001
zookeeper.namespace=WebGateJobSchedule
webgate.portal.url=http://192.168.0.182:8084/webgate-portal/
app.oauth.clientId=WebGateApp
bomc.alarm.url=
bomc.alarm.service.name=
asi.license.validation.switch=false
webgate.agent.media.path=/opt/zyjmonitor/bes/server/besinsight-1.0.0/bes-asi-agent-3.2.0/etc/bes-asi-java-agent/
appcheckerAndAgentSwitch=false#将配置更新到zookeeper上
cd ../../
./webgate-config/bin/setConfig.sh import-conf#导入license
./webgate-config/bin/setConfig.sh import-lic

产品组件安装

#alarm、 sink、 collector、 schedule安装
#分别解压component目录下的webgate-kafkasink.zip、webgate-alarm.zip、webgate-collector.zip、webgate-job-schedule.tar.gz[bes@bogon component]$ pwd
/opt/WEBGATE/besinsight/software/webgate/server/BES-WEBGATE-INTEGRATION/componentunzip webgate-kafka-sink.zip -d ${install_home}
unzip webgate-collector.zip -d ${install_home}
unzip webgate-alarm.zip -d ${install_home}
tar -zxvf webgate-job-schedule.tar.gz -C ${install_home}#将对应的mysql驱动分别拷⻉到webgate-kafka-sink、webgate-alarm、webgate-collector、webgate-job-schedule解压后的lib目录下。[bes@bogon WEBGATE]$ pwd
/opt/WEBGATE
cp /home/bes/tmp/mysql-connector-java-8.0.29.jar ${install_home}/webgate-kafka-sink/lib/
cp /home/bes/tmp/mysql-connector-java-8.0.29.jar ${install_home}/webgate-alarm/lib/
cp /home/bes/tmp/mysql-connector-java-8.0.29.jar ${install_home}/webgate-collector/lib/
cp /home/bes/tmp/mysql-connector-java-8.0.29.jar ${install_home}/webgate-job-schedule/lib/#分别进入解压后的目录,修改conf/config.properties文件中的zk信息为实际zookeeper地址#分别进入解压后的目录,到bin目录下执行startup.sh脚本启动kafka-sink、alarm、collector、job-schedulecd ${install_home}
./webgate-kafka-sink/bin/startup.sh
./webgate-alarm/bin/startup.sh
./webgate-collector/bin/startup.sh
./webgate-job-schedule/bin/startup.sh

WebGate APM安装

webgate-console安装

#将component BES-LITE-9.5.2.xxx.tar.gz解压到新建的BES95-apm子目录下。
[bes@bogon logs]$ cd ${install_home}/besinsight/software/webgate/server/BES-WEBGATE-INTEGRATION/componentmkdir -p ${install_home}/BES95-apm
tar xf BES-LITE-9.5.2.880.tar.gz -C /opt/WEBGATE/BES95-apm/#通过配置文件conf/server.config修改web容器的监控端口,默认为8080。#拷⻉mysql数据库驱动至${install_home}/BES95-apm/lib目录下。
cp /home/bes/tmp/mysql-connector-java-8.0.29.jar ${install_home}/BES95-apm/lib#修改webgate-console.war包内WEB-INF/classes/config.properties文件中zookeeper.info为实际zookeeper ip。#webgate-console.war拷⻉到BES95-apm/hotdeploy
cp /opt/WEBGATE/besinsight/software/webgate/server/BES-WEBGATE-APM/webgate-console.war /opt/WEBGATE/BES95-apm/hotdeploy#启动webgate-console
[bes@bogon bin]$ cd /opt/WEBGATE/BES95-apm/bin
[bes@bogon bin]$ nohup ./startserver &[bes@bogon bin]$ tailf nohup.out
#将webgate接入统一认证
http://IP:7200/usermanager/访问统一认证的控制台,点击左侧服务管理菜单,进行新建服务操作
WebGate
/webgate-console

WebGate-agent安装

#解压安装包
cd /opt/WEBGATE/besinsight/software/webgate/probe/BES-WEBGATE-APM[bes@bogon BES-WEBGATE-APM]$ unzip webgate-agent.zip -d /opt/WEBGATE/

WAS集成配置

[bes@bogon tmp]$ mkdir /opt/WEBGATE/BES
[bes@bogon tmp]$ tar zxvf BES-CLUSTER-9.5.2.4692-RHEL6-X64.tar.gz -C /opt/WEBGATE/BES#监控实例jvm
-javaagent:/opt/WEBGATE/webgate_agent/webgate-agent/lib/webgate-agent.jar

WebGate Container安装

AnalyticDB初始化

单机环境 :单实例环境会自动初始化container子产品相关表

集群环境 :

1、确认AnalyticDB已部署并启动;

[webgate@test171 ~]$ ps -ef|grep analyticdb

2、登录AnalyticDB数据库,确认WebGate Container相关的表是否已创建;若表已创建
则直接进行webgate-container安装,若表未创建则继续进行以下步骤(集群环境默认不会初始
化container相关表);

Container相关表如下:

container_resource_metric_local
stat_metric_local
container_resource_mate_local
t_m_service_instance_local
container_resource_metric
stat_metric
container_resource_mate
t_m_service_instance

3、修改数据库库名

WebGate container 的 analyticdb集群建表脚本 create-table-analyticdb-containercluster.sql、create-view-analyticdb-container-cluster.sql、drop-table-analyticdb-containercluster.sql脚本中默认库名为analyticdb_database在setConfig.sh中修改ANALYTICDB_DATABASE_NAME
和ANALYTICDB_CLUSTER_NAME,赋权并执行setConfig.sh脚本即可修改建表脚本中默认
的库名。

进入集群环境建表脚本目录

cd ${install_home}/BES-WEBGATE-CONTAINER/server/analyticdb-script/analyticdb-cluster

修改setConfig.sh中默认的库名

[webgate@Test171 analyticdb-cluster]$ vi setConfig.sh
#!/bin/bash
#configure the analyticdb base info
ANALYTICDB_DATABASE_NAME="webgate" //数据库库名
ANALYTICDB_CLUSTER_NAME="webgate_cluster" //analyticdb数据库集群名称

赋权执行setConfig.sh脚本

chmod 755 setConfig.sh
./setConfig.sh

4、执行建表脚本

在已部署启动好的AnalyticDB-1.0.0/bin目录下执行如下命令,完成集群环境的WebGate
Container AnalyticDB数据表创建:

./analyticdb-client --host=192.168.0.171 --port=3651 -ubes --password passwor --multiquery < ${install_home}/BES-WEBGATE-CONTAINER/server/analyticd-script/analyticdb-cluster/create-table-analyticdb-container-cluster.sql./analyticdb-client --host=192.168.0.171 --port=3651 -ubes --password passwor --multiquery < ${install_home}/BES-WEBGATE-CONTAINER/server/analyticd-script/analyticdb-cluster/create-view-analyticdb-container-cluster.sql

webgate container安装

1、在installhome/BES−WEBGATE−CONTAINER/目录下获取WebGateContainer的安装介质webgate−container.zip,解压到安装目录{install_home}/BES-WEBGATE-CONTAINER/目录下获取WebGate Container的 安装介质webgate-container.zip,解压到安装目录installh​ome/BES−WEBGATE−CONTAINER/目录下获取WebGateContainer的安装介质webgate−container.zip,解压到安装目录{install_home}下;

install_home=/opt/WEBGATE
tar -zxvf ~/tmp/BES-WEBGATE-CONTAINER-4.0.0.tar.gz -C ${install_home}
tar -zxvf ~/tmp/BES-WEBGATE-CONTAINER-4.0.0.002.T002.tar.gz -C ${install_home}
unzip  ${install_home}/besinsight/software/webgate/server/BES-WEBGATE-CONTAINER/webgate-container -d ${install_home}

2、导入数据库驱动到${install_home}/webgate-container/lib目录下;

cp ~/tmp/mysql-connector-java-8.0.29.jar ${install_home}/webgate-container/lib

3、修改${install_home}webgate-container/conf目录下的zk地址配置文件config.properties,
配置示例如下;

# zookeeper info
zookeeper.info=localhost:2181 #环境的zookeeper地址
zookeeper.path=/webgate/cluster

4、启动webgate container,命令如下:

./startup.sh &

启动后查看${install_home}/webgate-container/logs/webgate-container.log没有报错即可。

tail -f ../logs/webgate-container.log

webgate container collector安装

1、在 BES-WEBGATE-CONTAINER/server目录下获取WebGate Container Collector的安装介质webgate-container-collector.zip,解压到安装目录${install_home}下;

unzip  ${install_home}/besinsight/software/webgate/server/BES-WEBGATE-CONTAINER/webgate-container-collector.zip -d ${install_home}

2、导入数据库驱动到${install_home}/webgate-container-collector/lib目录下;

cp ~/tmp/mysql-connector-java-8.0.29.jar ${install_home}/webgate-container-collector/lib

3、配置${install_home}/webgate-container-collector/conf目录下的应用配置文件con-
fig.properties,配置示例如下:

# zookeeper info
zookeeper.info=localhost:2181 #环境的zookeeper地址
zookeeper.path=/webgate/cluster

4、配置 ${install_home}/webgate-container-collector/conf目 录下 的应 用配置 文件
prometheus-cluster-config.yaml,配置示例如下:

metric-config-new:
clusterInfoList:
- cluster: webgate #容器云集群名称,要与amdb中的保持一致
protocol: http://
service:
ip: localhost #容器云集群环境的webgate-k8s-probe连接IP
port: 30060 #容器云集群环境的webgate-k8s-probe连接port
url: /api/v1/query

5、启动webgate-container-collector服务,在${install_home}/webgate-container-collector/bin
目录下执行如下命令即可:

./startup.sh

查看${install_home}/webgate-container-collector/logs/webgate-container-collector.log
中没有报错即可。

tail -f ../logs/webgate-container-collector.log

webgate export 安装

1、在installhomeBES−WEBGATE−CONTAINER/server/webgate−export/目录下获取WebGateexport的安装介质webgate−export.zip,解压到安装目录{install_home}BES-WEBGATE-CONTAINER/server/webgate-export/目录下获 取WebGate export的安装介质webgate-export.zip,解压到安装目录installh​omeBES−WEBGATE−CONTAINER/server/webgate−export/目录下获取WebGateexport的安装介质webgate−export.zip,解压到安装目录{install_home}下;

unzip  ${install_home}/besinsight/software/webgate/server/BES-WEBGATE-CONTAINER/webgate-export.zip -d ${install_home}

2、导入数据库驱动到${install_home}/webgate-export/lib目录下;

cp ~/tmp/mysql-connector-java-8.0.29.jar ${install_home}/webgate-export/lib

3、配置${install_home}/webgate-export/conf目录下的应用配置文件config.properties,
配置示例如下:

# zookeeper info
zookeeper.info=localhost:2181 #环境的zookeeper地址
zookeeper.path=/webgate/cluster
cmp.enable.test=true

4、启动webgate-export服务,在${install_home}/webgate-export/bin目录下执行如下
命令即可:

nohup ./startup.sh &

查看${install_home}/webgate-export/logs/webgate-export.log中没有报错即可。

tail -f ../logs/webgate-export.log

WebGate-k8s-probe安装

webgate-k8s-probe是webgate的容器监控探针,负责容器资源的监控采集。

1、拷⻉BES-WEBGATE-CONTAINER/probe/webgate-k8s-probe-3.2.0.tar.gz,webgatek8s-probe.yaml 文件到k8s环境的机器上。

2、执行docker load -i webgate-k8s-probe-3.2.0.tar.gz 将 webgate-k8s-probe探针镜像
导入到本地环境,导入后镜像名称为:bessystem/webgate/webgate-k8s-probe:v3.2.0

3、将镜像推送到镜像库
1)确认镜像库
请找到一个可用的镜像库,需要将k8s探针镜像上传到镜像库,集群有多个节点时,各个节
点会从镜像库地址上拉取k8s探针镜像。请咨询环境维护人员镜像库地址。
2)给k8s探针镜像打标签

docker tag bessystem/webgate/webgate-k8s-probe:v3.2.0 192.168.19.96:22443/public/bessystem/webgate/webgate-k8s-probe:v3.2.0 #ip和端口根据实际情况修改为镜像库的ip和端口

3)推送k8s探针镜像到远程镜像库

docker push 192.168.19.96:22443/public/bessystem/webgate/webgate-k8s-probe: v3.2.0 # 这里的镜像是上一个步骤中打过tag的镜像

4、修改webgate-k8s-probe.yaml中的镜像地址,修改为镜像库中的镜像地址,也可使用
本地镜像
5、默认端口是30060,如果需要修改,修改配置文件webgate-k8s-probe.yaml中以下位置:

kind: Service
apiVersion: v1
metadata:
labels:
app: webgate-k8s-probe
name: webgate-k8s-probe
namespace: webgate-k8s-probe
spec:
type: NodePort
ports:
- port: 9090
targetPort: 9090
nodePort: 30060 #对外端口,可修改为其他没有被占用的端口,此端口修改后,
webgate-contain-collector的配置文件prometheus-cluster-config.yaml里的端口也需要修改
selector:
app: webgate-k8s-probe

6、执行以下命令部署webgate-k8s-probe

kubectl apply -f webgate-k8s-probe.yaml

7、部署没有报错,则表示部署成功。
8、部署成功后,安装必要扩展组件node-exporter, kube-state-metric(安装介质请联
系技术支持获取),如需监控其他组件,可根据需求部署mysql-exporter、redis-exporter等。

WebGate Infrastructure 安装

后端webgate-infrastructure-console部署

1、从安装介质目录${install_home}/besinsight/software/webgate/server/BES-WEBGATEINFRASTRUCTURE获取webgate-infrastructure-console.zip,将其解压到指定目录下。

install_home=/opt/WEBGATE
unzip ${install_home}/besinsight/software/webgate/server/BES-WEBGATE-INFRASTRUCTURE/webgate-infrastructure-console.zip -d ${install_home}

2、导入数据库驱动到webgate-infrastructure-console解压后的lib目录下。

cp ~/tmp/mysql-connector-java-8.0.29.jar ${install_home}/webgate-infrastructure-console/lib

3、修改${install_home}/webgate-infrastructure-console/conf/config.properties中的
zookeeper info地址为实际ip 。

# zookeeper info
zookeeper.info=localhost:2181 #单机环境: zookeeper.info=ip:2181;集群环境:zookeeper.info=ip1:2181,ip2:2181,ip3:2181
zookeeper.path=/webgate/cluster

4、启动webgate-infrastructure-console,执行以下命令,没有报错则表示启动成功

cd ${install_home}/webgate-infrastructure-console/bin
nohup ./startup.sh &

查看日志

tail -f ../logs/webgate-infrastructure-console.log

前端webgate-infrastructure部署

1、Nginx在基础组件中已安装,确认nginx已经启动后执行后续步骤。

[webgate@Test171 ~]$ ps -ef|grep nginx

2、拷⻉${install_home}/besinsight/software/webgate/server/BES-WEBGATE-INTEGRATION/webgate-ui/webgate-infrastructure.zip放入nginx安装目录的html子目录。执行如下命令进行解压

install_home=/opt/WEBGATE
Nginx_home=/home/bes/workspace/nginx-1.14.0
unzip ${install_home}/besinsight/software/webgate/server/BES-WEBGATE-INTEGRATION/webgate-ui/webgate-infrastructure.zip -d ${Nginx_home}/html

配置产品服务

1、访问webgate-infrastructure

http://localhost:port/webgate-portal

webgate-probe-infrastructure部署

1、配置zk地址
${install_home}/BES-WEBGATE-INFRASTRUCTURE/probe目录下,针对不同系统选取对应的介质解压

tar -zxvf ${install_home}/besinsight/software/webgate/probe/BES-WEBGATE-INFRASTRUCTURE/webgate-infrastructure-probe-redhat-x86.tar.gz -C ${install_home}

2、修改${install_home}/webgate-infrastructure-probe/conf/node.conf中的IP地址信
息为实际的zookeeper所在地址;

[Main]
# Collector conf default not used
# Collector conf has a higher priority when collector conf and zookeeper conf ⌋
,! all exist
# The address of the WebGate collector to send node data to
# collector_server_host: localhost
# collector_server_port: 6009
# The info of the zookeeper to get collectors
# zookeeper cluster conf example:
# zookeeper_info: ip1,ip2:2181 or ip:2181,ip:2181
zookeeper_info: localhost:2181

3、启动node
${install_home}/webgate-infrastructure-probe/bin下执行命令:

./agent start

启动后即可用于对基础设施进行指标数据采集

检查服务日志

tail -f ../logs/webgate-node.log

采集组件部署 (未找到介质)

从安装介质目录 BES-WEBGATEINFRASTRUCTURE获取对应平台介质包webgate-node-$platform.tar.gz,解压后修改配置文件conf/node.conf中的ZK地址为实际ZK服务地址。通过如下命令进行采集组件的启停操作。

$node_home/bin/agent start
$node_home/bin/agent stop

采集组件启动后即可进行基础设施服务的数据采集。

统一监控平台部署

后端webgate-portal-console部署

1、从安装介质目录${install_home}/BES-WEBGATE-INTEGRATION获取webgate-portal-console.zip,将其解压到指定目录下。

install_home=/opt/WEBGATEunzip ${install_home}/besinsight/software/webgate/server/BES-WEBGATE-INTEGRATION/component/webgate-portal-console.zip -d ${install_home}

2、导入数据库驱动到webgate-portal-console解压后的lib目录下。

cp ~/tmp/mysql-connector-java-8.0.29.jar ${install_home}/webgate-portal-console/lib

3、修改${install_home}/webgate-portal-console/conf/config.properties中的zookeeper
info地址为实际ip。

# zookeeper info
zookeeper.info=localhost:2181 ##单机环境: zookeeper.info=ip:2181;集群环境:zookeeper.info=ip1:2181,ip2:2181,ip3:2181
zookeeper.path=/webgate/cluster

4、启动webgate-portal-console,执行以下命令,没有报错则表示启动成功。

cd ${install_home}/webgate-portal-console/bin
nohup ./startup.sh &

查看日志

tail -f ../logs/webgate-portal-console.log

前端webgate-portal部署

1、Nginx在基础组件中已安装,确认nginx已经启动后执行后续步骤。

[webgate@Test171 ~]$ ps -ef|grep nginx

2、拷⻉${install_home}/BES-WEBGATE-INTEGRATION/webgate-ui/webgate-portal.zip
放入nginx安装目录的html子目录。执行如下命令进行解压:

install_home=/opt/WEBGATE
Nginx_home=/home/bes/workspace/nginx-1.14.0unzip ${install_home}/besinsight/software/webgate/server/BES-WEBGATE-INTEGRATION/webgate-ui/webgate-portal.zip -d ${Nginx_home}/html

3、配置统一监控平台服务的反向代理。修改${install_home}/nginx-1.14.0/conf/nginx.conf
文件中以下内容:

location /webgate-portal/ {root nginx_home/html/;index index.html index.htm;
}
location /webgate-infrastructure/ {root nginx_home/html/;
index index.html index.htm;
}
location /portal-server/ {proxy_pass http://localhost:9101/webgate-portal-console/; #web ⌋
,! gate-portal实际服务地址
}
location /portal-server/webgate-container/ {proxy_pass http://localhost:8989/webgate-container/;
}
location /infrastructure-server/ {proxy_pass http://localhost:9100/webgate-infrastructure-console/ ⌋
,! ; #webgate-infrastructure-console实际服务地址
}
location /wg-infrastructure {proxy_pass http://localhost:nginx_port/webgate-portal/;
}
location / {root nginx_home/html;
index index.html index.htm;
}
}

5、重新加载nginx配置

cd /home/bes/workspace/nginx-1.14.0/sbin./nginx -t./nginx -s reload

配置产品服务

1、访问Infra Usermanager,url为http://ip:port/usermanager,ip和port为Infra Usermanager部署的服务器的ip和端口号,登录用户名密码默认为admin/B#2008_2108#es。如图
所示:

2、登录成功,进入首⻚,在服务管理中新建WebGate-portal服务
服务名称自定义;服务ID与已安装的webgate-config下conf/config.properties中authorization.clientId.integration 一 致, 即 webgateIntegration; 状 态 启 用; 类 型 下 拉 选
择”WebGate“;主机名是nginx服务的ip地址;端口为nginx的server端口;应用名称填
写为/webgate-portal,配置完成后保存。
这里应保证主机名、端口、应用名称构成的拼接地址(http://主机名:端口/应用名称)与webgate-portal实际提供访问的地址一致。
新建服务如下图所示:
注意:统一认证中配置的webgate-portal的服务ID为webgateIntegration ,不能写错,否则无法访问统一监控平台。

webgateIntegration
/webgate-portal

统一监控平台访问

访问http//:ip:port/webgate-portal ,ip和port为Nginx部署ip地址和端口,跳转到统一认
证的登录⻚面,登录用户名密码默认为admin/B#2008_2108#es,登录后跳转到统一监控平台
首⻚,如下图所示:

驾驶舱视图配置

http//:ip:port/webgate-portal ,ip和port为Nginx部署ip地址和端口,跳转到统一认证的
登录⻚面,登录用户名密码默认为admin/B#2008_2108#es,登录后跳转到监控设置->视图配 置->驾驶舱,点击编辑修改对应模块的URL地址,否则驾驶舱展示会异常:

场景初始化

按照文档进行场景初始化。

#菜单初始化
install_home=/opt/WEBGATE
MYSQL_HOME=/home/bes/workspace/mysql-8.0.29-el7-x86_64/${MYSQL_HOME}/bin/mysql -uroot -p123456 --socket=${MYSQL_HOME}/mysql.sock < ${install_home}/besinsight/software/webgate/server/BES-WEBGATE-INTEGRATION/script/rmdb-script/menu/init-table-mysql-menu-apm.sql${MYSQL_HOME}/bin/mysql -uroot -p123456 --socket=${MYSQL_HOME}/mysql.sock < ${install_home}/besinsight/software/webgate/server/BES-WEBGATE-INTEGRATION/script/rmdb-script/mysql-scripts/menu/init-table-mysql-menu-apm-infra.sql

WebGate Appchecker 安装

####appchecker-config安装

#解压安装包
install_home=/opt/WEBGATE
MYSQL_HOME=/home/bes/workspace/mysql-8.0.29-el7-x86_64/tar -zxvf BES-WEBGATE-APPCHECKER-2.4.0.tar.gz -C ${install_home}#解压 appchecker-config-2.4.0.zip
mkdir ${install_home}/appchecker
cd /opt/WEBGATE/besinsight/software/webgate/server/BES-WEBGATE-APPCHECKER
unzip appchecker-config-2.4.0.zip -d ${install_home}/appchecker/appchecker-config#初始化数据库
${MYSQL_HOME}/bin/mysql -uroot -p123456 --socket=${MYSQL_HOME}/mysql.sock < ${install_home}/appchecker/appchecker-config/data/appchecker_mysql.sql#修改数据连接地址
cd /opt/WEBGATE/appchecker/appchecker-config
sed -i 's#localhost#192.168.0.182#g' conf/config.properties#将配置信息更新到 ZooKeeper 上
./bin/shell.sh setConfig import-conf#运行环境之前需要导入 License
./bin/shell.sh setConfig import-lic#生成注册码
#./bin/shell setConfig gen-regcode#获取AMDB任意模型下的实例
创建 tagclasstype.csv,里面内容为:
vim tagclasstype.csv
名称,类型
业务接口标签,3然后在 AMDB 的 bin 目录使用命令:
#./AmdbCmd.sh tagclasstype import file=tagclasstype.csv

AppChecker Collector 安装

install_home=/opt/WEBGATE
#解压tomcat
cp ~/tmp/apache-tomcat-8.0.33.tar.gz ${install_home}/appchecker
tar zxvf ${install_home}/appchecker/apache-tomcat-8.0.33.tar.gz -C ${install_home}/appchecker/#拷贝war包到tomcat
cp /opt/WEBGATE/besinsight/software/webgate/server/BES-WEBGATE-APPCHECKER/appchecker-collector-2.4.0.war ${install_home}/appchecker/apache-tomcat-8.0.33/webapps#将数据库驱动拷贝到appchecker-collector-2.4.0#修改tomcat端口#启动tomcat
cd ${install_home}/appchecker/apache-tomcat-8.0.33
./bin/catalina.sh run

AppChecker Console 安装

install_home=/opt/WEBGATE
#拷贝war包到tomcat
cp /opt/WEBGATE/besinsight/software/webgate/server/BES-WEBGATE-APPCHECKER/appchecker-console-2.4.0.war ${install_home}/appchecker/apache-tomcat-8.0.33/webapps#将数据库驱动拷贝到appchecker-console-2.4.0#启动tomcat
cd ${install_home}/appchecker/apache-tomcat-8.0.33
./bin/catalina.sh run#接入统一认证

#访问管理控制台提供用户登录,对用户身份进行验证。
登录路径:http://ip:port/appchecker-console-2.4.0/login.html。
提供的初始用户名和密码分别是:admin、B#2008_2108#es

AppChecker Speech 安装

install_home=/opt/WEBGATE
#拷贝war包到tomcat
cp /opt/WEBGATE/besinsight/software/webgate/server/BES-WEBGATE-APPCHECKER/appchecker-speech-2.4.0.war ${install_home}/appchecker/apache-tomcat-8.0.33/webapps#将数据库驱动拷贝到appchecker-speech-2.4.0#启动tomcat
cd ${install_home}/appchecker/apache-tomcat-8.0.33
./bin/catalina.sh runcp ~/tmp/mysql-connector-java-8.0.29.jar  ${install_home}/appchecker/apache-tomcat-8.0.33/webapps/appchecker-collector-2.4.0/WEB-INF/lib/
cp ~/tmp/mysql-connector-java-8.0.29.jar  ${install_home}/appchecker/apache-tomcat-8.0.33/webapps/appchecker-console-2.4.0/WEB-INF/lib/
cp ~/tmp/mysql-connector-java-8.0.29.jar   ${install_home}/appchecker/apache-tomcat-8.0.33/webapps/appchecker-speech-2.4.0/WEB-INF/lib/

AppChecker Agent 安装

install_home=/opt/WEBGATE#解压安装包
unzip /opt/WEBGATE/besinsight/software/webgate/probe/BES-WEBGATE-APPCHECKER/appchecker-agent-2.4.0.zip -d ${install_home}/appchecker#启动
./start.sh

创建标签

业务系统

创建业务接口标签

./cmd.sh tagclasstype import file=tagclasstype.csv

WEBGATE-APM安装总结相关推荐

  1. ELK入门(十八)——Kibana APM server安装部署

    一.前言 安装内容: elasticsearch-7.10.1-linux-x86_64.tar.gz(依赖,注意版本) kibana-7.10.1-linux-x86_64.tar.gz(依赖,注意 ...

  2. Atom上安装Markdown插件-Win10

    环境:Windows 10 英文版 安装atom@atom官网 安装Markdown插件 在 File -> Settings -> Packages 搜索 Markdown-previe ...

  3. Atom 插件安装慢解决方案

    对于一名前端开发者来说 Atom 确实是一个很不错的编辑器,使用方便.功能强大而且编写代码酷炫.对于 Atom 来说我感觉最重要的一个能就是插件(或者说package),你可以在这里 找到很多功能强大 ...

  4. 新版 apache_2.0.54 php-5.0.4 mysql-4.1.12a 组合安装向导(原创)

    最近配置APM安装中出现了一些问题,主要是版本更新后有些个别的配置变了.在网络上参考了一些安装说明,但是内容比较分散.因此在这里重新总结一下最近的这几个版本的配置方法. 首先,下载安装包,在此不赘述了 ...

  5. Linux开机启动过程(2):内核启动的第一步

    在内核安装代码的第一步 本文是在原文基础上经过本人的修改. 内核启动的第一步 在上一节中我们开始接触到内核启动代码,并且分析了初始化部分,最后我们停在了对main函数(main函数是第一个用C写的函数 ...

  6. 实用的 atom 插件

    推荐几款我喜欢的Atom插件 时间 2017-05-05 09:00:00 Hi Linux 原文  http://www.hi-linux.com/posts/28459.html 主题 Atom ...

  7. Windows下安装APM大全

    Windows下安装APM大全 November 30th, 2005 Windows NT 下集成安装Apache,PHP,MYSQL,Zend,Perl的套件大全 根据经验,列举一下Windows ...

  8. APM的3DR无线数传的安装

    若电脑无法识别新买的3DR无线数传接受端,则下载CP210x_VCP_Windows(http://pan.baidu.com/s/1kUiA8Az)驱动程序,电脑操作系统是32位的运行 CP210x ...

  9. APM的3DR无线数传的安装和调试

    APM飞控修改数传模块方法 http://www.cnblogs.com/wsine/p/4909903.html APM的3DR无线数传的安装和调试 http://tieba.baidu.com/p ...

最新文章

  1. VS2010创建ATL类时需要手动填写ProgID
  2. 【数值分析】常微分方程数值解:欧拉公式
  3. LoadRunner学习第四天——检查点学习(转载)
  4. 批量删除html网页,批量删除.html · panghuamama/Clearly Local - Gitee.com
  5. COGS182 [USACO Jan07] 均衡队形[RMQ]
  6. linux基础篇-24,swap交换分区临时救急及划分方法
  7. Websocket服务器响应包,服务器websocket c++发送二进制类型包,客户端没有任何事件响应...
  8. Linux内核深入理解中断和异常(1)
  9. dex、apk完整性校验
  10. java excel 日期格式转换_Java处理Excel中的日期格式
  11. 小学计算机小蘑菇教案,幼儿园中班小蘑菇教案.doc
  12. [Python爬虫] 简单网络爬虫抓取博客文章及思想介绍
  13. 吸血鬼数字java_吸血鬼数字
  14. 在QT框架下进行仿照PS图像调整功能设计(亮度对比度,色相饱和度及明度)
  15. hadoop配置文件workers
  16. 《关于我重装系统后修复VSCode这档事》C++环境配置
  17. 每个程序员都应该了解的 CPU 高速缓存
  18. AI上推荐 之 SDM模型(建模用户长短期兴趣的Match模型)
  19. 绘制流程图用什么软件好?你选对了吗?
  20. 关于hi3516DV300的VDEC一些测试

热门文章

  1. Arduino 按钮控制LED灯亮度
  2. 欧几里德与拓展欧几里德定理
  3. 六步快速搭建个人网站
  4. Blockchain区块链的通俗解释
  5. mysql的dbconn_mysql面向对象中$conn-query()是什么意思?
  6. JVM-01-JVM与Java体系结构
  7. 解决Dev-C++ 中to_string()报错问题
  8. ArcGIS应用分析--学校选址
  9. 为什么快手不能左右滑了_为什么有的手机不支持快手滑动切换
  10. 团队作业——项目验收与总结博客(麻瓜制造者)