TIPS
This article is based on Skywalking 6.6.0 To write , theoretical support Skywalking 6.0+ All versions .
This article discusses how to use Skywalking Monitoring applications .
Skywalking There are many ways of using , Most popular at present ( And the most powerful ) Is based on Java agent Of .
Java agent Supported framework 、 Middleware etc. , Can be found in https://github.com/apache/skywalking/blob/v6.6.0/docs/en/setup/service-agent/java-agent/Supported-list.md see .
TIPS
- except Java agent Out of the way ,Skywalking It also supports other languages agent, See
https://github.com/apache/skywalking/blob/v6.6.0/docs/en/setup/README.md#language-agents-in-service- Besides ,Skywalking It also supports Service Mesh( for example Istio, See
https://github.com/apache/skywalking/blob/v6.6.0/docs/en/setup/README.md#service-mesh)、Proxy( for example Envoy Proxy, Seehttps://github.com/apache/skywalking/blob/v6.6.0/docs/en/setup/README.md#service-mesh) , But these two ways of using are not very popular at present , So I don't want to repeat it , In fact, it is also relatively simple . Interested children's shoes can also be studied .
To configure java agent
find SkyWalking In bag
agentCatalog ,agent The directory structure is as follows1
2
3
4
5
6
7
8
9
10
11
12
13
14+-- agent
+-- activations
apm-toolkit-log4j-1.x-activation.jar
apm-toolkit-log4j-2.x-activation.jar
apm-toolkit-logback-1.x-activation.jar
...
+-- config
agent.config
+-- plugins
apm-dubbo-plugin.jar
apm-feign-default-http-9.x.jar
apm-httpClient-4.x-plugin.jar
.....
skywalking-agent.jartake
agentCopy directory to any location- To configure
config/agent.config:- take
agent.service_nameChange it to your microservice name ; - If Skywalking And microservices are deployed on different servers , It needs to be modified
collector.backend_serviceValue , This configuration is used to specify microservices and Skywalking Address of correspondence , The default is127.0.0.1:11800, Modify as needed . Of courseagent.configThere's a lot of configuration in the file , The table below explains in detail .
- take
Start the application
java -jar Launched applications
for example , There is one Spring Boot application , Then we have finished modifying agent After the directory :
Execute the following command to start :
1
2Be careful -javaagent You have to -jar Before, oh
java -javaagent:/opt/agent/skywalking-agent.jar -jar somr-spring-boot.jarIf you want to IDE Start the test in , Please refer to the following figure for configuration , Then start .

Tradition Tomcat application
Linux Tomcat 7-9
modify tomcat/bin/catalina.sh The first line of :
1 |
CATALINA_OPTS="$CATALINA_OPTS -javaagent:/opt/agent/skywalking-agent.jar"; export CATALINA_OPTS |
Windows Tomcat 7-9
modify tomcat/bin/catalina.bat The first line of :
1 |
set "CATALINA_OPTS=-javaagent:/opt/agent/skywalking-agent.jar" |
Effect demonstration
Use Skywalking After monitoring the application , When an application API When interviewed , It will show a chart like this .
home page :

Network topology : Can analyze the network destination of the request . Such as below , The request was called first foodie-dev This micro service , And then asked for localhost:3306 This MySQL database .

track : This navigation bar is the most common one we use to locate problems , You can search for specific details of the query . Locate where the performance bottleneck lies .

The alarm : seeing the name of a thing one thinks of its function .Skywalking Configurable alarm rules , When the configured threshold is exceeded , Push the alarm information .
Index comparison : Any indicator can be compared .
