来源:https://github.com/JaredTan95/skywalking-tutorials
参考:源码地址从GitHub下载代码编译在IntelliJ IDEA中编译工程Elasticsearch 启动:Skywalking 相关配置说明
视频地址
https://github.com/apache/incubator-skywalking.git
git clone https://github.com/apache/incubator-skywalking.git
cd incubator-skywalking/
git checkout -b 5.x
git submodule init
git submodule update
mvn clean package -DskipTests
/incubator-skywalking/apm-protocol/apm-network/target/generated-sources/protobuf
目录下面grpc-java
和java
目录右键设置为Generated Rources Root
.apm-collector/apm-collector-remote/apm-remote-grpc-provider/target/generated-sources/protobuf
目录下面grpc-java
和java
目录右键设置为Generated Rources Root
.https://github.com/JaredTan95/skywalking-docker/blob/master/elasticsearch-5.6.10-Zone-Asia-SH/README.md
#cluster:
# zookeeper:
# hostPort: localhost:2181,localhost:2182 #zookeeper集群地址
# sessionTimeout: 100000
configuration:
default:
#namespace: xxxxx
# alarm threshold
applicationApdexThreshold: 2000 #应用性能指数阀值,Apdex含义请参考如下
serviceErrorRateThreshold: 10.00 #服务错误率阀值
serviceAverageResponseTimeThreshold: 2000 #服务平均响应时间阀值
instanceErrorRateThreshold: 10.00 #实例错误率阀值
instanceAverageResponseTimeThreshold: 2000 #实例平均响应时间阀值
applicationErrorRateThreshold: 10.00 #应用错误率阀值
applicationAverageResponseTimeThreshold: 2000 #应用平均响应时间阀值
# thermodynamic
thermodynamicResponseTimeStep: 50 #热力图响应时间
thermodynamicCountOfResponseTimeSteps: 40 #热力图的响应时间步长数量
# max collection's size of worker cache collection, setting it smaller when collector OutOfMemory crashed.
workerCacheMaxSize: 10000 #最大工作缓存数量
# Apdex
# 性能指数:
# Apdex(Application Performance Index)是一个国际通用标准,
# Apdex 是用户对应用性能满意度的量化值。它提供了一个统一的测量和报告用户体验的方法,
# 把最终用户的体验和应用性能作为一个完整的指标进行统一度量。
# 如何计算 Apdex:基于“响应性”,Apdex 定义了 3 个用户满意度区间( OneAPM 默认定义的 T 值为 0.5 秒):
# 满意:这样的响应时间让用户感到很愉快,响应时间少于 T 秒钟。
# 容忍:慢了一点,但还可以接受,继续这一应用过程,响应时间 T~4T 秒。
# 失望:太慢了,受不了了,用户决定放弃这个应用,响应时间超过 4T 秒。
storage:
elasticsearch:
clusterName: elasticsearch #Elasticsearch集群名称,默认为elasticsearch
clusterTransportSniffer: false
clusterNodes: localhost:9300 #Elasticsearch连接,默认localhost:9300
indexShardsNumber: 2
indexReplicasNumber: 0
highPerformanceMode: true
# Batch process setting, refer to https://www.elastic.co/guide/en/elasticsearch/client/java-api/5.5/java-docs-bulk-processor.html
bulkActions: 2000 # Execute the bulk every 2000 requests
bulkSize: 20 # flush the bulk every 20mb
flushInterval: 10 # flush the bulk every 10 seconds whatever the number of requests
concurrentRequests: 2 # the number of concurrent requests
# Set a timeout on metric data. After the timeout has expired, the metric data will automatically be deleted.
traceDataTTL: 90 #追踪数据滚动删除周期,默认90分钟
minuteMetricDataTTL: 90 #分钟监控数据滚动删除周期,默认90分钟
hourMetricDataTTL: 36 #小时监控数据滚动删除周期,默认36小时
dayMetricDataTTL: 45 #天监控数据滚动删除周期,默认45天
monthMetricDataTTL: 18 #月监控数据滚动删除周期,默认18个月