docker部署全链路监控pinpoint

1. docker-compose方式部署

官网传送门: pinpoint-docker
个人传送门: 增加volume持久化

[root@ceshi-132 docker-commpose]# git clone git@gitee.com:liujiangxu/docker-commpose.git
[root@ceshi-132 docker-commpose]# cd pinpoint/docker-pinpoint/
[root@ceshi-132 docker-pinpoint]# docker-compose pull && docker-compose up -d

访问方式http://$ip:8080即可
在这里插入图片描述

2. agent配置与采集

web页面给出了agent安装地址,直接下载上传被采集端即可
在这里插入图片描述

[root@zabbix ~]# tar -xf pinpoint-agent-2.3.3.tar.gz 
[root@zabbix ~]# mv pinpoint-agent-2.3.3 /usr/local/pinpoint-agent
[root@zabbix ~]# cd /usr/local/pinpoint-agent
修改地址为服务端地址
[root@zabbix pinpoint-agent]# sed -i 's/127.0.0.1/10.1.133.97/g' pinpoint-root.config 
[root@zabbix pinpoint-agent]# sed -i 's/127.0.0.1/10.1.133.97/g' profiles/local/pinpoint.config
[root@zabbix pinpoint-agent]# sed -i 's/127.0.0.1/10.1.133.97/g' profiles/release/pinpoint.config
(1) tomcat接入
[root@ceshi-132 ~]# vi /usr/local/tomcat/bin/catalina.sh
添加:
CATALINA_OPTS="$CATALINA_OPTS -javaagent:/usr/local/pinpoint-agent/pinpoint-bootstrap-2.3.3.jar"
CATALINA_OPTS="$CATALINA_OPTS -Dpinpoint.agentId=his" #agentId必须是唯一的
CATALINA_OPTS="$CATALINA_OPTS -Dpinpoint.applicationName=gxzsc-his" #applicationName也是唯一的
(2) jar接入
[root@ceshi-132 ~]# java -jar \
-javaagent:/usr/local/pinpoint-agent/pinpoint-bootstrap-2.3.3.jar  \
-Dpinpoint.agentId=his \
-Dpinpoint.applicationName=zsc-his his.jar

运行后可以清晰看到应用整个交互调用拓扑图
在这里插入图片描述
拖动红框空可以显示出调用详情(如下有不同的功能)
在这里插入图片描述
Inspector可以查看程序jvm指标信息
在这里插入图片描述

3. 历史数据清理
#进入hbase容器
[root@zabbix default]# docker exec -it  pinpoint-hbase bash
#进入程序目录
root@7646486525f2:/# cd /opt/hbase/hbase-1.2.6/bin
#启动hbase
root@7646486525f2:/opt/hbase/hbase-1.2.6/bin# ./hbase shell

#查看表结构默认ttl为60
hbase(main):001:0> desc 'TraceV2'
Table TraceV2 is ENABLED
TraceV2
COLUMN FAMILIES DESCRIPTION
{NAME => 'S', BLOOMFILTER => 'ROW', VERSIONS => '1', IN_MEMORY => 'false', KEEP_DELETED_CELLS => 'FALSE', DATA_BLOCK_ENCODING => 'PREFIX', TTL => '5184000 SECONDS (60 DAYS)', COMPRESSION => 'NONE',
 MIN_VERSIONS => '0', BLOCKCACHE => 'true', BLOCKSIZE => '65536', REPLICATION_SCOPE => '0'}
1 row(s) in 0.5140 seconds

#停用表
hbase(main):002:0> disable 'TraceV2'
0 row(s) in 4.3060 seconds

#设置ttl时间为10天
hbase(main):003:0> alter 'TraceV2',{NAME => 'S', TTL => '1296000'}
Updating all regions with the new schema...
256/256 regions updated.
Done.
0 row(s) in 2.2120 seconds

#启用表
hbase(main):002:0> enable 'TraceV2'
0 row(s) in 4.2640 seconds

#清理表数据
hbase(main):003:0> major_compact('TraceV2')
0 row(s) in 0.3190 seconds
  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值