PinPoint使用手册

前沿

官方网站: http://naver.github.io/pinpoint/

pinpoint四件套:

  • HBase (for storage)
  • Pinpoint Collector (deployed on a web container)
  • Pinpoint Web (deployed on a web container)
  • Pinpoint Agent (attached to a java application for profiling)

安装依赖一览

HBASE的JAVA依赖

Pinpoint VersionHBase 0.94.xHBase 0.98.xHBase 1.0.xHBase 1.1.xHBase 1.2.x
1.0.xyesnononono
1.1.xnonot testedyesnot testednot tested
1.5.xnonot testedyesnot testednot tested
1.6.xnonot testednot testednot testedyes
1.7.xnonot testednot testednot testedyes

PinPoint的JAVA依赖

Pinpoint VersionAgentCollectorWeb
1.0.x6-86+6+
1.1.x6-87+7+
1.5.x6-87+7+
1.6.x6-87+7+
1.7.x6-88+8+

Agent与Collector的依赖关系

Agent VersionCollector 1.0.xCollector 1.1.xCollector 1.5.xCollector 1.6.xCollector 1.7.x
1.0.xyesyesyesyesyes
1.1.xnot testedyesyesyesyes
1.5.xnonoyesyesyes
1.6.xnononot testedyesyes
1.7.xnonononoyes

安装

安装JAVA

HBase安装

首先下载hbase: http://www.apache.org/dyn/closer.cgi/hbase/

开始安装hbase: http://hbase.apache.org/book.html#_introduction

解压后直接执行``bin/start-hbase.sh``。

初始化``./bin/hbase shell  /scripts/hbase-create.hbase``。脚本可以在这里下载:https://github.com/naver/pinpoint/tree/1.6.x/hbase/scripts。请注意链接中的版本号。

这里也可以使用压缩的方式初始化``hbase-create-snappy.hbase``。

PinPoint安装

> 这里使用发布的方式安装,也是官方推荐的方式。

下载:https://github.com/naver/pinpoint/releases/tag/1.7.2

安装Collector

将下载的``pinpoint-collector-$VERSION.war``部署到web容器中,例如tomcat。

Collector提供了两个配置文件:``pinpoint-collector.properties``和``hbase.properties``。配置文件位于部署目录的``WEB-INF/classes``。

pinpoint-collector.properties中基本配置:

  • collector.tcpListenPort (agent’s profiler.collector.tcp.port - default: 9994)
  • collector.udpStatListenPort (agent’s profiler.collector.stat.port - default: 9995)
  • collector.udpSpanListenPort (agent’s profiler.collector.span.port - default: 9996)

hbase.properties中基本配置:

  • hbase.client.host (default: localhost)
  • hbase.client.port (default: 2181)

安装Web

将下载的``pinpoint-collector-$VERSION.war``部署到web容器中,例如tomcat。

Web提供了两个配置文件``pinpoint-web.properties``和``hbase.properties``。配置文件位于部署目录的``WEB_INF/classes``。

hbase.properties基本配置:

  • hbase.client.host (default: localhost)
  • hbase.client.port (default: 2181)

安装Agent

Pinpoint Agent runs as a java agent attached to an application to be profiled (such as Tomcat).

解压pinpoint-agent-1.7.2-SNAPSHOT.tar.gz。(主意,需要制定到一个目录下,否则可能是散的。推荐名:pinpoint-agent)。

如果你想改变输出的日志级别,可以修改``pinpoint-agent/lib/log4j.xml``文件。

应用程序埋点方式:

```

CATALINA_OPTS="$CATALINA_OPTS -javaagent:$AGENT_PATH/pinpoint-bootstrap-$VERSION.jar"
CATALINA_OPTS="$CATALINA_OPTS -Dpinpoint.agentId=$AGENT_ID"
CATALINA_OPTS="$CATALINA_OPTS -Dpinpoint.applicationName=$APPLICATION_NAME"

```

Agent提供了一个配置文件:$AGENT_PATH/pinpoint.config。

需要检查的基础配置:

  • profiler.collector.ip (default: 127.0.0.1)
  • profiler.collector.tcp.port (collector’s collector.tcpListenPort - default: 9994)
  • profiler.collector.stat.port (collector’s collector.udpStatListenPort - default: 9995)
  • profiler.collector.span.port (collector’s collector.udpSpanListenPort - default: 9996)

总结

至此简单的pinpoint环境就搭建完毕了。可以访问web的服务来查看效果。

后续再分享集群、调优、通知等功能。

转载于:https://my.oschina.net/noryar/blog/1789337

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值