当前位置:网站首页>Skywalking installation and deployment practice

Skywalking installation and deployment practice

2022-06-24 00:35:00 Enjoy

Preface

There are many link tracing tools for microservices , Therefore, the advantages and disadvantages of each tool should be considered when selecting a model , Combined with business needs , Select the best tool .
Link tracking And The selection Zipkin、Pinpoint、SkyWalking、CAT contrast

skywalking The deployment of practice

Download decompression

download

 Insert picture description here
edition :
apache-skywalking-apm-9.1.0.tar.gz
apache-skywalking-java-agent-8.11.0.tgz

After downloading, unzip and use

Configuration in microservices skywalking

rely on

<dependency>
    <groupId>org.apache.skywalking</groupId>
    <artifactId>apm-toolkit-logback-1.x</artifactId>
    <version>8.11.0</version>
</dependency>

logback Log configuration

<appender name="grpc" class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.log.GRPCLogClientAppender">
    <encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
        <layout class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.mdc.TraceIdMDCPatternLogbackLayout">
            <Pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%X{tid}] [%thread] %-5level %logger{36} -%msg%n</Pattern>
        </layout>
    </encoder>
</appender>

<root level="INFO">
    <appender-ref ref="grpc" />
</root>

IDEA Edit service , To configure JVM Parameters

 Insert picture description here
add to JVM Parameters
 Insert picture description here
-javaagent:D:/work/skywalking/skywalking-agent/skywalking-agent.jar -Dskywalking.agent.service_name=your_service -Dskywalking.collector.backend_service=localhost:11800

Focus on :
Java agent jar Package path
Your service name ( It will show skywalkingUI)
The backend collects the collector address information of logs ( It's all together , Therefore, you can do without configuration )

The above configuration , Every service needs to add

Running microservices

function skywalking

Enter the downloaded and unzipped skywalking The directory bin Catalog
 Insert picture description here
Enter... In the directory path : cmd And return
In the command line that comes out, enter startup.bat And return

Simulation of the request

The following is the microservice interface I wrote
http://localhost:9101/getUser/1

View after calling skywalking UI http://localhost:8080/general
 Insert picture description here
View the call topology diagram
 Insert picture description here

View link tracking
 Insert picture description here

Set up skywalking Is stored as elasticsearch

download elasticsearch

download

Unzip and enter bin Directory operation elasticsearch file .

Use localhost:9200 Check to see if startup succeeded
If reality fails , Just go to config/jvm.options The startup memory will be set smaller in the file .
 Insert picture description here

To configure skywalking

Edit the file apache-skywalking-apm-bin\config\application.yml
 Insert picture description here
Modify the above three places , Note that ,namespace Test for the above figure elasticsearch Medium cluster_name Field

restart skywalking that will do .

原网站

版权声明
本文为[Enjoy]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/175/202206232253439008.html

随机推荐