pinpoint部署
pinpoint是一个分析大型分布式系统的平台,提供解决方案来处理海量跟踪数据,主要面向基于tomcat的Java 应用。 pinpoint使用HBASE储存数据。
下面介绍pinpoint部署及应用。
1. 安装Hbase数据库
1.1. 上传服务器并解压
1.1.1. 上传组件
在服务器/home目录下新增一个pinpoint文件夹,并将下载的组件全部上传至该目录下
cd /home
mkdir pinpoint
cd pinpoint
上传组件:hbase-1.7.1-bin.tar、hbase-create.hbase、pinpoint-collector-boot-2.4.0、pinpoint-web-boot-2.4.0
组件链接: https://pan.baidu.com/s/1jgRWRTRwVH_qc84c0nHdEg 提取码: 4f8q
1.1.2. 解压hbase-1.7.1-bin.tar.gz
tar -zxvf hbase-1.7.1-bin.tar.gz
1.2. 修改相关配置文件
1.2.1. 增加hbase环境变量
vim /etc/profile
# HBase环境变量
export HBASE_HOME=/home/pinpoint/hbase-1.7.1
export PATH=$PATH:$HBASE_HOME/bin
保存退出后,执行下面的命令使其生效
source /etc/profile
1.2.2. 修改hbase-env.sh中的JAVA_HOME环境变量位置
cd /home/pinpoint/hbase-1.7.1/conf
vim hbase-env.sh
# 在27行左右的位置,修改如下
export JAVA_HOME=/opt/jdk1.8.0_191
# 在124行开启自带zookeeper
export HBASE_MANAGES_ZK=true
1.2.3. 修改HBase配置文件hbase-site.xml
<property>
<name>hbase.master.info.port</name>
<value>16010</value>
</property>
<property>
<name>hbase.rootdir</name>
<value>file:///home/pinpoint/hbase</value>
</property>
整体如下:
<property>
<name>hbase.cluster.distributed</name>
<value>false</value>
</property>
<property>
<name>hbase.tmp.dir</name>
<value>./tmp</value>
</property>
<property>
<name>hbase.unsafe.stream.capability.enforce</name>
<value>false</value>
</property>
<property>
<name>hbase.master.info.port</name>
<value>16010</value>
</property>
<property>
<name>hbase.rootdir</name>
<value>file:///home/pinpoint/hbase</value>
</property>
</configuration>
1.3. 启动hbase数据库
cd /home/pinpoint/hbase-1.7.1/bin
./start-hbase.sh
输入jps命令,当hbase数据库启动成功,则会显示HMaster进程
1.4. 初始化HBase的pinpoint库
执行pinpoint提供的Hbase初始化语句
cd /home/pinpoint/hbase-1.7.1/bin
./hbase shell /home/pinpoint/hbase-create.hbase
2. pinpoint安装
在服务器/home/pinpoint目录下新增一个logs文件夹
2.1. 安装pinpoint-collector
cd /home/pinpoint
nohup java -Dpinpoint.zookeeper.address=localhost -jar /home/pinpoint/pinpoint-collector-boot-2.4.0.jar >/home/pinpoint/logs/pinpoint-collector.log 2>&1 &
2.2. 安装pinpoint-web
cd /home/pinpoint
nohup java -Dpinpoint.zookeeper.address=localhost -jar /home/pinpoint/pinpoint-web-boot-2.4.0.jar >/home/pinpoint/logs/pinpoint-web.log 2>&1 &
此时pinpoint服务端已启动,输入服务器http://ip:8080/main 即可查看
2.3. 安装pinpoint-agent(部署在被测应用系统)
2.3.1. 修改agent配置文件
vim /home/pinpoint-agent-2.4.0/profiles/release/pinpoint.config
profiler.collector.ip=xxx.xxx.xxx.xxx #hbase服务器地址
profiler.transport.grpc.collector.ip=xxx.xxx.xxx.xxx # 即安装pinpoint-collector的虚拟机IP
profiler.sampling.counting.sampling-rate=1 #采样率配置,访问量不大的情况,建议全部采集
2.3.2. 与被测服务一起启动
将pinpoint-agent组件放到被测系统服务器上,并将启动命令集成到被测服务启动脚本中,随着被测服务一起启动
nohup java -javaagent:/home/pinpoint/pinpoint-agent-2.4.0/pinpoint-bootstrap-2.4.0.jar -Dpinpoint.agentId=cwy01 -Dpinpoint.applicationName=BZ-cwy832 -jar cwy.jar > nohup.out 2>&1 &
3. 访问pinpoint
输入服务器http://ip:8080/main 即可查看
最新文章
- iOS逆向工程之KeyChain与Snoop-it
- 在数据库访问项目中使用微软企业库Enterprise Library,实现多种数据库的支持
- php 远程本地化无后缀图片
- web框架 之 Tornado
- UltraEdit 注册机使用说明
- CodeForces - 424B (贪心算法)
- Multi-Device Hybrid Apps for Visual Studio CTP2.0
- nodejs错误:ld: library not found for -lgcc_s.10.5 clang: error: linker command failed with exit code 1 (use -v to see invocation)
- webstom 配置git 后左侧菜单栏配色调整
- poj 3352 双连通分量
- RAC时间同步的两种方法
- sql备份(.mdf文件备份)
- [BZOJ3506] [Cqoi2014] 排序机械臂 (splay)
- javascript 错误处理和堆栈追踪浅析
- Android智能手机中各种音频场景下的audio data path
- TTL是什么意思?
- jquery中siblings方法配合什么方法一起使用
- LoadRunner内部介绍以及常见问题
- 关于 ake sure class name exists, is public, and has an empty constructor that is public
- 戴尔win10重新安装win7系统