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

验证pinpoint库是否初始化成功
方法:进入数据库,查看初始化表
#进入数据库
cd /home/hbase-1.7.1/bin
./hbase shell
#查看初始化表
list

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 即可查看

最新文章

  1. iOS逆向工程之KeyChain与Snoop-it
  2. 在数据库访问项目中使用微软企业库Enterprise Library,实现多种数据库的支持
  3. php 远程本地化无后缀图片
  4. web框架 之 Tornado
  5. UltraEdit 注册机使用说明
  6. CodeForces - 424B (贪心算法)
  7. Multi-Device Hybrid Apps for Visual Studio CTP2.0
  8. nodejs错误:ld: library not found for -lgcc_s.10.5 clang: error: linker command failed with exit code 1 (use -v to see invocation)
  9. webstom 配置git 后左侧菜单栏配色调整
  10. poj 3352 双连通分量
  11. RAC时间同步的两种方法
  12. sql备份(.mdf文件备份)
  13. [BZOJ3506] [Cqoi2014] 排序机械臂 (splay)
  14. javascript 错误处理和堆栈追踪浅析
  15. Android智能手机中各种音频场景下的audio data path
  16. TTL是什么意思?
  17. jquery中siblings方法配合什么方法一起使用
  18. LoadRunner内部介绍以及常见问题
  19. 关于 ake sure class name exists, is public, and has an empty constructor that is public
  20. 戴尔win10重新安装win7系统

热门文章

  1. Windows API 学习
  2. IdentityServer4登录后无法跳转设置策略
  3. 项目实践2:(问卷)用html和css做一个网页
  4. kingbaseES R3 集群配置 SSL
  5. haodoop高可用
  6. CentOS7 系统服务器初始化配置、安全加固、内核升级优化常用软件安装的Shell脚本分享
  7. MinIO多租户(Multi-tenant)部署指南
  8. Kibana仪表盘(Dashboard)详解
  9. MHA架构的实现方式
  10. 适合生产制造企业用的ERP系统有哪些?