SkyWalking
被用于追踪、监控和诊断分布式系统,特别是使用微服务架构,云原生或容积技术。主要功能如下:分布式追踪和上下文传输、应用、实例、服务性能指标分析、根源分析、应用拓扑分析、应用和服务依赖分析、慢服务检测、性能优化
demo搭建如下:
1.下载工具
https://github.com/OpenSkywalking/skywalking/releases下载最新版5.0.0-GA
我的资源下载地址:https://download.csdn.net/download/u014172271/10751264
下载elasticsearch:注意建议使用要5.x版本。(6.x会报错)
2.安装
下载下来解压缩后。修改elasticsearch的配置文件
①jvm.options 修改内存大小-Xms256M -Xmx256M
②修改elasticsearch.yml:
cluster.name: CollectorDBCluster
network.host: 0.0.0.0
3.启动:
(1)window系统:
①elasticsearch-5.6.12inelasticsearch.bat
②apache-skywalking-apm-incubating-5.0.0-GAapache-skywalking-apm-incubatinginstartup.bat
(2)linux系统
①elasticsearch启动
cd elasticsearch-5.6.12/
nohup bin/elasticsearch &
②skywalking启动
cd apache-skywalking-apm-incubating-5.0.0-GAapache-skywalking-apm-incubating
bin/startup.sh
访问地址:localhost:8080 默认账号密码都是admin
4.demo
(1)准备项目:
编写一个微服务。zuul做网关,eureka做注册中心。服务a调用服务b。
(2)打jar包:maven install
(3)启动:
java -javaagent:D:codeapache-skywalking-apm-incubating-5.0.0-GAapache-skywalking-apm-incubatingagentskywalking-agent.jar -jar register-1.0.0-SNAPSHOT.jar
java -javaagent:D:codeapache-skywalking-apm-incubating-5.0.0-GAapache-skywalking-apm-incubatingagentskywalking-agent.jar -jar zuul-1.0.0-SNAPSHOT.jar
java -javaagent:D:codeapache-skywalking-apm-incubating-5.0.0-GAapache-skywalking-apm-incubatingagentskywalking-agent.jar -jar service-b-1.0.0-SNAPSHOT.jar
java -javaagent:D:codeapache-skywalking-apm-incubating-5.0.0-GAapache-skywalking-apm-incubatingagentskywalking-agent.jar -jar service-a-1.0.0-SNAPSHOT.jar
请求访问:http://localhost:9020/client/skyController/getInfo