README.md 5.1 KB
Newer Older
wu-sheng's avatar
wu-sheng 已提交
1
# Sky Walking
wu-sheng's avatar
wu-sheng 已提交
2 3 4
SkyWalking-Distributed Application Tracing System, 是一个对JAVA应用程序运行情况进行追踪、告警和分析的系统。
* 核心理论为[Google Dapper论文:Dapper, a Large-Scale Distributed Systems Tracing Infrastructure](http://research.google.com/pubs/pub36356.html),英语有困难的同学可参考[国内翻译](http://duanple.blog.163.com/blog/static/70971767201329113141336/)
* 本分析系统能通过不修改或少量修改代码的模式,对现有的JAVA应用或J2EE应用进行监控和数据收集,并针对应用进场进行准实时告警。此外提供大量的调用性能分析功能,解决目前的监控系统主要监控进程、端口而非应用实际性能的问题。
wu-sheng's avatar
wu-sheng 已提交
5

wu-sheng's avatar
wu-sheng 已提交
6
# 主要贡献者
wu-sheng's avatar
wu-sheng 已提交
7 8
* 吴晟   [亚信](http://www.asiainfo.com/) wusheng@asiainfo.com
* 张鑫   [亚信](http://www.asiainfo.com/) zhangxin10@asiainfo.com
wu-sheng's avatar
wu-sheng 已提交
9

wu-sheng's avatar
wu-sheng 已提交
10 11 12 13 14 15
# 整体架构图
![整体架构图](http://wu-sheng.github.io/sky-walking/sample-code/images/skywalkingClusterDeploy.jpeg)

# 追踪链路图
![追踪连路途](http://wu-sheng.github.io/sky-walking/sample-code/images/traceLogView.jpeg)

wu-sheng's avatar
wu-sheng 已提交
16 17 18 19
# Home Page
http://wu-sheng.github.io/sky-walking/

# API Guide
wu-sheng's avatar
wu-sheng 已提交
20
http://wu-sheng.github.io/sky-walking/sample-code/codeView.html
wu-sheng's avatar
wu-sheng 已提交
21 22 23

# Contact Us
Mail: wu.sheng@foxmail.com
wu-sheng's avatar
wu-sheng 已提交
24 25

# Quick Start
wu-sheng's avatar
wu-sheng 已提交
26
## 编译与部署
wu-sheng's avatar
wu-sheng 已提交
27
### 部署第三方软件
wu-sheng's avatar
wu-sheng 已提交
28 29 30 31 32 33
- 安装zookeeper 3.4.6
- 安装apache hbase 1.1.2
- 安装mysql
- 安装tomcat 7

### 编译安装SkyWalking Server
wu-sheng's avatar
wu-sheng 已提交
34 35 36 37 38 39 40 41 42
- 编译工程
```shell
$cd github/sky-walking/skywalking-server
$mvn package -Dmaven.test.skip=true
$cd github/sky-walking/skywalking-server/target/installer
```
- 拷贝installer到服务器
- 根据服务器环境修改/config/config.properties
```properties
wu-sheng's avatar
wu-sheng 已提交
43 44 45
#服务器收集数据监听端口
server.port=34000

wu-sheng's avatar
wu-sheng 已提交
46 47 48 49
#数据缓存文件目录,请确保此目录有一定的存储容量
buffer.data_buffer_file_parent_directory=D:/test-data/data/buffer
#偏移量注册文件的目录
registerpersistence.register_file_parent_directory=d:/test-data/data/offset
wu-sheng's avatar
wu-sheng 已提交
50

wu-sheng's avatar
wu-sheng 已提交
51 52 53 54 55 56 57 58
#hbase zk quorum
hbaseconfig.zk_hostname=10.1.235.197,10.1.235.198,10.1.235.199
#hbase zk port
hbaseconfig.client_port=29181

#Redis配置
alarm.redis_server=10.1.241.18:16379
```
wu-sheng's avatar
wu-sheng 已提交
59 60 61 62 63 64
- 启动服务
```shell
$cd installer/bin
$./swserver.sh
```
- 可根据需要部署多个实例
wu-sheng's avatar
wu-sheng 已提交
65 66

### 编译安装SkyWalking Alarm
wu-sheng's avatar
wu-sheng 已提交
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97
- 编译工程
```shell
$cd github/sky-walking/skywalking-alarm
$mvn package -Dmaven.test.skip=true
$cd github/sky-walking/skywalking-alarm/target/installer
```
- 拷贝installer到服务器
- 根据服务器环境修改/config/config.properties
```properties
#zookeeper连接地址,用于协调集群,可以和hbase的zookeeper共用
zkpath.connect_str=10.1.241.18:29181,10.1.241.19:29181,10.1.241.20:29181

#管理数据库的JDBC连接信息
#数据库连接地址
db.url=jdbc:mysql://10.1.241.20:31306/sw_db
#数据库用户名
db.user_name=sw_dbusr01
#数据库密码
db.password=sw_dbusr01

#告警信息存在的redis服务器地址,需要和skywalking-server的alarm.redis_server设置一致
alarm.redis_server=127.0.0.1:6379
```
- 启动服务
```shell
$cd installer/bin
$./sw-alarm-server.sh
```
- 可根据需要部署多个实例,根据实例启动数量,自动负载均衡

### 编译安装SkyWalking WebUI
wu-sheng's avatar
wu-sheng 已提交
98 99 100 101 102


### 编译安装SkyWalking Analysis
暂未提供

wu-sheng's avatar
wu-sheng 已提交
103 104
## 根据所需的监控点,引入maven依赖
暂不存在公网仓库,需要本地编译并发布
wu-sheng's avatar
wu-sheng 已提交
105
```xml
wu-sheng's avatar
wu-sheng 已提交
106 107 108 109 110 111
<!-- 监控api,可监控插件不支持的调用 -->
<dependency>
    <groupId>com.ai.cloud</groupId>
    <artifactId>skywalking-api</artifactId>
    <version>1.0-SNAPSHOT</version>
</dependency>
wu-sheng's avatar
wu-sheng 已提交
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142
<!-- Spring插件,监控所有Spring托管对象的调用-->
<dependency>
    <groupId>com.ai.cloud</groupId>
    <artifactId>skywalking-spring-plugin</artifactId>
    <version>1.0-SNAPSHOT</version>
</dependency>
<!-- dubbo插件,监控dubbo/dubbox调用 -->
<dependency>
    <groupId>com.ai.cloud</groupId>
    <artifactId>skywalking-dubbo-plugin</artifactId>
    <version>1.0-SNAPSHOT</version>
</dependency>
<!-- jdbc插件,监控所有的jdbc调用 -->
<dependency>
    <groupId>com.ai.cloud</groupId>
    <artifactId>skywalking-jdbc-plugin</artifactId>
    <version>1.0-SNAPSHOT</version>
</dependency>
<!-- httpClient插件,监控httpClient 4.2的调用 -->
<dependency>
    <groupId>com.ai.cloud</groupId>
    <artifactId>skywalking-httpClient-4.2.x-plugin</artifactId>
    <version>1.0-SNAPSHOT</version>
</dependency>
<!-- httpClient插件,监控httpClient 4.3的调用 -->
<dependency>
    <groupId>com.ai.cloud</groupId>
    <artifactId>skywalking-httpClient-4.3.x-plugin</artifactId>
    <version>1.0-SNAPSHOT</version>
</dependency>
```
wu-sheng's avatar
wu-sheng 已提交
143
查询不会引用所需的第三方组件(如Spring、dubbo、dubbox等),请自行引入所需的版本。
wu-sheng's avatar
wu-sheng 已提交
144 145 146 147

## 根据所需插件配置应用程序
参考[用户指南](http://wu-sheng.github.io/sky-walking/sample-code/codeView.html)

wu-sheng's avatar
wu-sheng 已提交
148 149
## 下载并设置授权文件
通过skywalking-webui工程下载授权文件,并在运行时环境中,将授权文件加入到CLASSPATH中
wu-sheng's avatar
wu-sheng 已提交
150 151 152

## 在运行时环境中设置环境变量
export SKYWALKING_RUN=true