Introduction and use of skywalking, an open source APM system

introduce

Skywalking was founded in 2015 and provides distributed tracking. From 5 X, the project evolved into a functional application performance management system. It is used to track, monitor and diagnose distributed systems, especially using micro service architecture, cloud native or volume technology. The following main functions are provided:

Main characteristics

framework

Online experience

install

Install es

The new version of skywalking uses es as storage, so install es first. Note 6 Version x does not work. Install 5.6 8:

wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.6.8.tar.gz
tar zxvf elasticsearch-5.6.8.tar.gz
cd elasticsearch-5.6.8/

Modify the configuration file, mainly cluster Name, and add two lines of configuration, VIM config / elasticsearch yml:

cluster.name: CollectorDBCluster

# ES监听的ip地址
network.host: 0.0.0.0
thread_pool.bulk.queue_size: 1000

Save and start es:

nohup bin/elasticsearch &

Installing skywalking

Download and unzip the compiled version:

wget http://mirrors.hust.edu.cn/apache/incubator/skywalking/5.0.0-beta/apache-skywalking-apm-incubating-5.0.0-beta.tar.gz
tar zxvf apache-skywalking-apm-incubating-5.0.0-beta.tar.gz 
cd apache-skywalking-apm-incubating/

Then deploy. Note that skywalking will use the (8080108001180012800) port, so exclude the port occupation first.

Then run bin / startup SH, Windows user is Bat file.

If everything is normal, you can see the page by visiting localhost: 8080.

Problem solving during installation

Java programs use skywalking probes

1. Copy the agent directory under Apache skywalking APM incubating directory to the application location. The probe contains the entire directory. Please do not change the directory structure 2 When starting a java program, add the JVM startup parameter, - javaagent: / path / to / agent / skywalking agent jar。 The parameter value is skywalking agent Absolute path of jar

What about debugging programs in idea?

Add VM parameters.

Agent probe configuration, simply modify the agent application_ Code

# 当前的应用编码,最终会显示在webui上。
# 建议一个应用的多个实例,使用有相同的application_code。请使用英文
agent.application_code=Your_ApplicationName

# 每三秒采样的Trace数量
# 默认为负数,代表在保证不超过内存Buffer区的前提下,采集所有的Trace
# agent.sample_n_per_3_secs=-1

# 设置需要忽略的请求地址
# 默认配置如下
# agent.ignore_suffix=.jpg,.jpeg,.js,.css,.png,.bmp,.gif,.ico,.mp3,.mp4,.html,.svg

# 探针调试开关,如果设置为true,探针会将所有操作字节码的类输出到/debugging目录下
# skywalking团队可能在调试,需要此文件
# agent.is_open_debugging_class = true

# 对应Collector的config/application.yml配置文件中 agent_server/jetty/port 配置内容
# 例如:
# 单节点配置:SERVERS="127.0.0.1:8080" 
# 集群配置:SERVERS="10.2.45.126:8080,10.2.45.127:7600" 
collector.servers=127.0.0.1:10800

# 日志文件名称前缀
logging.file_name=skywalking-agent.log

# 日志文件最大大小
# 如果超过此大小,则会生成新文件。
# 默认为300M
logging.max_file_size=314572800

# 日志级别,默认为DEBUG。
logging.level=DEBUG

If everything is normal, you can see it later in the skywalking UI.

You can see the tired slow service and other information. Dig out more details slowly.

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>