SkyWalking7.0 installation and deployment

1. Installation

The UI of version 8.0 is changed to a custom query statement, and a customized chart needs to be configured, so version 7.0 is used temporarily.
Kafka data transmission features will be added after the 8.x version, which can solve the problem of remote computer room deployment. It has not yet been released on 2020-06.

Elasticsearch installation reference: https://blog.csdn.net/zimou5581/article/details/106782184

# 安装jdk,略
 
# 下载安装
wget https://mirrors.tuna.tsinghua.edu.cn/apache/skywalking/7.0.0/apache-skywalking-apm-es7-7.0.0.tar.gz
tar zxf apache-skywalking-apm-es7-7.0.0.tar.gz
mv apache-skywalking-apm-es7  skywalking-es7-7.0
 
# 修改配置,使用 elasticsearch7 作为存储
cd skywalking-es7-7.0
vim config/application.yml
    storage:
      selector: ${SW_STORAGE:elasticsearch7}
      elasticsearch7:
        nameSpace: ${
    
    SW_NAMESPACE:"skywalking"}
        recordDataTTL: ${SW_STORAGE_ES_RECORD_DATA_TTL:7} # Unit is day
        otherMetricsDataTTL: ${SW_STORAGE_ES_OTHER_METRIC_DATA_TTL:7} # Unit is day
        monthMetricsDataTTL: ${SW_STORAGE_ES_MONTH_METRIC_DATA_TTL:3} # Unit is month
        bulkActions: ${SW_STORAGE_ES_BULK_ACTIONS:1000} # Execute the bulk every 1000 requests
        flushInterval: ${SW_STORAGE_ES_FLUSH_INTERVAL:10} # flush the bulk every 10 seconds whatever the number of requests
        concurrentRequests: ${SW_STORAGE_ES_CONCURRENT_REQUESTS:2} # the number of concurrent requests
    :wq
 
# 增加自定义插件配置(没有自定义插件的可以忽略)
vim config/component-libraries.yml
    Candy:
      id: 1001
      languages: Java
    :wq
 
# 启动
./bin/startup.sh
 
# 停止
/opt/stopByName.sh skywalking
 
# 查询分片数据
curl -XGET http://localhost:9200/_cat/shards?v
 
# (特殊需要时使用)清空skywalking在es里的索引和数据
curl -XDELETE http://localhost:9200/skywalking*

2. Application access

<!-- pom.xml 增加skywalking日志依赖 -->
<dependency>
    <groupId>org.apache.skywalking</groupId>
    <artifactId>apm-toolkit-logback-1.x</artifactId>
    <version>7.0.0</version>
</dependency>
 
<!-- logback.xml 增加tid,控制台和日志文件 -->
<encoder charset="UTF-8" class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
    <layout class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.TraceIdPatternLogbackLayout">
        <pattern>[%tid] %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level logger_name:%logger{36} [%thread] %-5level %msg%n</pattern>
    </layout>
</encoder>

3. Application launch

# 修改agent配置
vim ./agent/config/agent.config
    collector.backend_service=${SW_AGENT_COLLECTOR_BACKEND_SERVICES:192.168.57.91:11800}
    :wq
 
# 插件放入/agent/plugins目录,应用增加jvm参数
java -jar app.jar  -DSW_AGENT_NAME=hello -javaagent:/opt/skywalking-apm-bin/agent/skywalking-agent.jar

Capacity planning reference: https://blog.csdn.net/flysqrlboy/article/details/89009200
Configuration tuning reference: https://blog.csdn.net/smooth00/article/details/96479544


Official website: http://skywalking.apache.org/zh/
Github homepage: https://github.com/apache/skywalking
Chinese document: https://skyapm.github.io/document-cn-translation-of- skywalking/zh/master/guides/
Chinese document (github access is difficult): http://itmuch.com/books/skywalking/
How to build: https://skyapm.github.io/document-cn-translation-of-skywalking /zh/master/guides/How-to-build.html
plugin list: https://skyapm.github.io/document-cn-translation-of-skywalking/zh/master/setup/service-agent/java-agent /Supported-list.html
Third-party plug-ins: https://github.com/SkyAPM/java-plugin-extensions (oracle, etc.)
Plug-in development guide: https://skyapm.github.io/document-cn-translation- of-skywalking/zh/master/guides/Java-Plugin-Development-Guide.html
Video sharing: http://www.itdks.com/ActivityC/search?keyWord=skywalking
Video tutorial: https://search.bilibili.com/all?keyword=skywalking

Guess you like

Origin blog.csdn.net/zimou5581/article/details/106782299