Skywalking介绍
Application performance monitor tool for distributed systems, especially designed for microservices, cloud native and container-based (Docker, Kubernetes, Mesos) architectures.
SkyWalking is an Observability Analysis Platform and Application Performance Management system.
Tracing, Metrics and Logging all-in-one solution.
Java, .Net Core, PHP, NodeJS, Golang, LUA, C++ agents supported
Istio + Envoy Service Mesh supported
Skywalking文档结构
- Welcome
- Concepts and Designs
- What is SkyWalking?
- Project Goals
- Backend
- UI
- Setup
- Language agents in Service
- Service Mesh
- Proxy
- Backend, UI and CLI setup document
- Backend setup document
- Configuration Vocabulary
- Overriding settings
- IP and port setting
- Backend init mode startup
- Cluster management
- Deploy in kubernetes
- Choose storage
- Set receivers
- Open fetchers
- Trace sampling
- Slow DB statement threshold
- OAL scripts
- Alarm
- Advanced deployment options
- Metrics exporter
- Time To Live (TTL)
- Dynamic Configuration
- Uninstrumented Gateways
- Apdex threshold
- Service Grouping
- Group Parameterized Endpoints
- OpenTelemetry Metrics Analysis
- Meter Analysis
- Spring Sleuth Metrics Analysis
- UI setup document
- CLI setup document
- Backend setup document
- UI Introduction
- Contributing Guides
- Protocols
- FAQs
PS:附上一个V8.0.0中文文档
怎样读文档
Skywalking
官方文档的组织结构很清晰。读下Welcome,就能大致了解文档结构,然后选感兴趣的读。
Skywalking项目结构
部署项目结构
.
├── bin # 执行文件
│ ├── oapService.bat
│ ├── oapServiceInit.bat
│ ├── oapServiceInit.sh # 启动oap并初始化,oap集群中使用
│ ├── oapServiceNoInit.bat
│ ├── oapServiceNoInit.sh # 只启动oap,oap集群中使用
│ ├── oapService.sh # 启动oap并初始化
│ ├── startup.bat
│ ├── startup.sh # 启动oap并初始化,同时启动ui
│ ├── webappService.bat
│ └── webappService.sh # 启动ui
├── config # oap配置文件
│ ├── alarm-settings-sample.yml
│ ├── alarm-settings.yml # 告警配置
│ ├── application.yml # oap主配置文件
│ ├── component-libraries.yml
│ ├── endpoint-name-grouping.yml
│ ├── envoy-metrics-rules
│ │ └── envoy.yaml
│ ├── fetcher-prom-rules # Prometheus Fetcher 配置文件
│ │ └── self.yaml
│ ├── gateways.yml
│ ├── log4j2.xml
│ ├── metadata-service-mapping.yaml
│ ├── meter-analyzer-config Meter # Receiver配置文件
│ │ └── spring-sleuth.yaml
│ ├── oal # oal配置文件
│ │ ├── browser.oal
│ │ ├── core.oal
│ │ ├── dotnet-agent.oal
│ │ └── java-agent.oal
│ ├── otel-oc-rules # OpenTelemetry receiver规则
│ │ ├── istio-controlplane.yaml
│ │ ├── oap.yaml
│ │ └── vm.yaml
│ ├── service-apdex-threshold.yml # apdex阈值配置
│ └── ui-initialized-templates # ui配置模板
│ ├── apm.yml
│ ├── browser.yml
│ ├── database.yml
│ ├── istio-dp.yml
│ ├── istio.yml
│ ├── self-observability.yml
│ ├── spring-sleuth.yml
│ ├── topology-endpoint.yml
│ ├── topology-instance.yml
│ └── vm.yml
├── licenses # 证书
├── logs # 日志目录
├── oap-libs # 依赖库
├── tools # 开发运维工具
│ └── profile-exporter # 导出trace原始数据
│ ├── application.yml
│ ├── profile_exporter_log4j2.xml
│ └── profile_exporter.sh
└── webapp # ui项目
│ ├── skywalking-webapp.jar
│ └── webapp.yml
├── LICENSE
├── NOTICE
└── README.txt
agent目录结构
.
├── activations # 工具包,提供 日志打印TID、跨线程传递TID等功能
│ ├── apm-toolkit-kafka-activation-8.4.0.jar
│ ├── apm-toolkit-log4j-1.x-activation-8.4.0.jar
│ ├── apm-toolkit-log4j-2.x-activation-8.4.0.jar
│ ├── apm-toolkit-logback-1.x-activation-8.4.0.jar
│ ├── apm-toolkit-logging-common-8.4.0.jar
│ ├── apm-toolkit-meter-activation-8.4.0.jar
│ ├── apm-toolkit-opentracing-activation-8.4.0.jar
│ └── apm-toolkit-trace-activation-8.4.0.jar
├── bootstrap-plugins # All bootstrap plugins are optional, due to unexpected risk.
│ ├── apm-jdk-http-plugin-8.4.0.jar
│ └── apm-jdk-threading-plugin-8.4.0.jar
├── config # agent配置文件
│ └── agent.config
├── logs # 日志目录
├── optional-plugins # 可选插件
│ ├── apm-customize-enhance-plugin-8.4.0.jar
│ ├── apm-gson-2.x-plugin-8.4.0.jar
│ ├── apm-kotlin-coroutine-plugin-8.4.0.jar
│ ├── apm-quartz-scheduler-2.x-plugin-8.4.0.jar
│ ├── apm-spring-annotation-plugin-8.4.0.jar
│ ├── apm-spring-cloud-gateway-2.0.x-plugin-8.4.0.jar
│ ├── apm-spring-cloud-gateway-2.1.x-plugin-8.4.0.jar
│ ├── apm-spring-tx-plugin-8.4.0.jar
│ ├── apm-spring-webflux-5.x-plugin-8.4.0.jar
│ ├── apm-trace-ignore-plugin-8.4.0.jar
│ └── apm-zookeeper-3.4.x-plugin-8.4.0.jar
├── optional-reporter-plugins # 可选的reporter插件
│ └── kafka-reporter-plugin-8.4.0.jar
├── plugins # 插件目录,放在该目录下的插件才会生效
│ ├── apm-activemq-5.x-plugin-8.4.0.jar
│ ├── apm-armeria-0.84.x-plugin-8.4.0.jar
│ ├── apm-armeria-0.85.x-plugin-8.4.0.jar
│ ├── apm-asynchttpclient-2.x-plugin-8.4.0.jar
│ ├── apm-avro-plugin-8.4.0.jar
│ ├── apm-canal-1.x-plugin-8.4.0.jar
│ ├── apm-cassandra-java-driver-3.x-plugin-8.4.0.jar
│ ├── apm-cxf-3.x-plugin-8.4.0.jar
│ ├── apm-dubbo-2.7.x-plugin-8.4.0.jar
│ ├── apm-dubbo-plugin-8.4.0.jar
│ ├── apm-ehcache-2.x-plugin-8.4.0.jar
│ ├── apm-elastic-job-2.x-plugin-8.4.0.jar
│ ├── apm-elastic-job-3.x-plugin-8.4.0.jar
│ ├── apm-elasticsearch-5.x-plugin-8.4.0.jar
│ ├── apm-elasticsearch-6.x-plugin-8.4.0.jar
│ ├── apm-feign-default-http-9.x-plugin-8.4.0.jar
│ ├── apm-finagle-6.25.x-plugin-8.4.0.jar
│ ├── apm-grpc-1.x-plugin-8.4.0.jar
│ ├── apm-h2-1.x-plugin-8.4.0.jar
│ ├── apm-hbase-1.x-plugin-8.4.0.jar
│ ├── apm-httpasyncclient-4.x-plugin-8.4.0.jar
│ ├── apm-httpclient-3.x-plugin-8.4.0.jar
│ ├── apm-httpClient-4.x-plugin-8.4.0.jar
│ ├── apm-httpclient-commons-8.4.0.jar
│ ├── apm-hystrix-1.x-plugin-8.4.0.jar
│ ├── apm-influxdb-2.x-plugin-8.4.0.jar
│ ├── apm-jdbc-commons-8.4.0.jar
│ ├── apm-jedis-2.x-plugin-8.4.0.jar
│ ├── apm-jetty-client-9.0-plugin-8.4.0.jar
│ ├── apm-jetty-client-9.x-plugin-8.4.0.jar
│ ├── apm-jetty-server-9.x-plugin-8.4.0.jar
│ ├── apm-kafka-commons-8.4.0.jar
│ ├── apm-kafka-plugin-8.4.0.jar
│ ├── apm-lettuce-5.x-plugin-8.4.0.jar
│ ├── apm-light4j-plugin-8.4.0.jar
│ ├── apm-mariadb-2.x-plugin-8.4.0.jar
│ ├── apm-mongodb-2.x-plugin-8.4.0.jar
│ ├── apm-mongodb-3.x-plugin-8.4.0.jar
│ ├── apm-mongodb-4.x-plugin-8.4.0.jar
│ ├── apm-mssql-commons-8.4.0.jar
│ ├── apm-mssql-jdbc-plugin-8.4.0.jar
│ ├── apm-mssql-jtds-1.x-plugin-8.4.0.jar
│ ├── apm-mysql-5.x-plugin-8.4.0.jar
│ ├── apm-mysql-6.x-plugin-8.4.0.jar
│ ├── apm-mysql-8.x-plugin-8.4.0.jar
│ ├── apm-mysql-commons-8.4.0.jar
│ ├── apm-netty-socketio-plugin-8.4.0.jar
│ ├── apm-nutz-http-1.x-plugin-8.4.0.jar
│ ├── apm-nutz-mvc-annotation-1.x-plugin-8.4.0.jar
│ ├── apm-okhttp-3.x-plugin-8.4.0.jar
│ ├── apm-play-2.x-plugin-8.4.0.jar
│ ├── apm-postgresql-8.x-plugin-8.4.0.jar
│ ├── apm-pulsar-plugin-8.4.0.jar
│ ├── apm-quasar-plugin-8.4.0.jar
│ ├── apm-rabbitmq-5.x-plugin-8.4.0.jar
│ ├── apm-redisson-3.x-plugin-8.4.0.jar
│ ├── apm-resttemplate-4.3.x-plugin-8.4.0.jar
│ ├── apm-rocketmq-3.x-plugin-8.4.0.jar
│ ├── apm-rocketmq-4.x-plugin-8.4.0.jar
│ ├── apm-servicecomb-java-chassis-0.x-plugin-8.4.0.jar
│ ├── apm-servicecomb-java-chassis-1.x-plugin-8.4.0.jar
│ ├── apm-sharding-jdbc-1.5.x-plugin-8.4.0.jar
│ ├── apm-sharding-sphere-3.x-plugin-8.4.0.jar
│ ├── apm-shardingsphere-4.0.x-plugin-8.4.0.jar
│ ├── apm-sharding-sphere-4.1.0-plugin-8.4.0.jar
│ ├── apm-sharding-sphere-4.x-plugin-8.4.0.jar
│ ├── apm-sharding-sphere-4.x-rc3-plugin-8.4.0.jar
│ ├── apm-solrj-7.x-plugin-8.4.0.jar
│ ├── apm-spring-async-annotation-plugin-8.4.0.jar
│ ├── apm-spring-cloud-feign-1.x-plugin-8.4.0.jar
│ ├── apm-spring-cloud-feign-2.x-plugin-8.4.0.jar
│ ├── apm-spring-concurrent-util-4.x-plugin-8.4.0.jar
│ ├── apm-spring-core-patch-8.4.0.jar
│ ├── apm-spring-kafka-1.x-plugin-8.4.0.jar
│ ├── apm-spring-kafka-2.x-plugin-8.4.0.jar
│ ├── apm-springmvc-annotation-3.x-plugin-8.4.0.jar
│ ├── apm-springmvc-annotation-4.x-plugin-8.4.0.jar
│ ├── apm-springmvc-annotation-5.x-plugin-8.4.0.jar
│ ├── apm-springmvc-annotation-commons-8.4.0.jar
│ ├── apm-spring-scheduled-annotation-plugin-8.4.0.jar
│ ├── apm-spymemcached-2.x-plugin-8.4.0.jar
│ ├── apm-struts2-2.x-plugin-8.4.0.jar
│ ├── apm-undertow-2.x-plugin-8.4.0.jar
│ ├── apm-vertx-core-3.x-plugin-8.4.0.jar
│ ├── apm-xmemcached-2.x-plugin-8.4.0.jar
│ ├── apm-xxl-job-2.x-plugin-8.4.0.jar
│ ├── baidu-brpc-plugin-8.4.0.jar
│ ├── dbcp-2.x-plugin-8.4.0.jar
│ ├── dubbo-2.7.x-conflict-patch-8.4.0.jar
│ ├── dubbo-conflict-patch-8.4.0.jar
│ ├── graphql-12.x-plugin-8.4.0.jar
│ ├── graphql-8.x-plugin-8.4.0.jar
│ ├── graphql-9.x-plugin-8.4.0.jar
│ ├── motan-plugin-8.4.0.jar
│ ├── resteasy-server-3.x-plugin-8.4.0.jar
│ ├── sofa-rpc-plugin-8.4.0.jar
│ ├── spring-commons-8.4.0.jar
│ ├── spring-webflux-5.x-webclient-plugin-8.4.0.jar
│ ├── thrift-plugin-8.4.0.jar
│ └── tomcat-7.x-8.x-plugin-8.4.0.jar
└── skywalking-agent.jar # agent入口
源码项目结构
.
├── apm-application-toolkit # 工具包
│ ├── apm-toolkit-kafka
│ ├── apm-toolkit-log4j-1.x
│ ├── apm-toolkit-log4j-2.x
│ ├── apm-toolkit-logback-1.x
│ ├── apm-toolkit-meter
│ ├── apm-toolkit-micrometer-registry
│ ├── apm-toolkit-opentracing
│ └── apm-toolkit-trace
├── apm-checkstyle # checkstyle配置目录
├── apm-commons # common包相关
│ ├── apm-datacarrier
│ └── apm-util
├── apm-dist # 构建后生成的可执行项目目录
├── apm-dist-es7 # 构建后生成的可执行项目目录 base:es7
├── apm-protocol # 协议
│ └── apm-network
├── apm-sniffer # agent相关
│ ├── apm-agent
│ ├── apm-agent-core
│ ├── apm-sdk-plugin
│ │ ├── activemq-5.x-plugin
│ │ ├── armeria-0.84.x-plugin
│ │ ├── armeria-0.85.x-plugin
│ │ ├── asynchttpclient-2.x-plugin
│ │ ├── avro-plugin
│ │ ├── baidu-brpc-plugin
│ │ ├── canal-1.x-plugin
│ │ ├── cassandra-java-driver-3.x-plugin
│ │ ├── cxf-3.x-plugin
│ │ ├── dbcp-2.x-plugin
│ │ ├── dubbo-2.7.x-conflict-patch
│ │ ├── dubbo-2.7.x-plugin
│ │ ├── dubbo-conflict-patch
│ │ ├── dubbo-plugin
│ │ ├── ehcache-2.x-plugin
│ │ ├── elastic-job-2.x-plugin
│ │ ├── elastic-job-3.x-plugin
│ │ ├── elasticsearch-5.x-plugin
│ │ ├── elasticsearch-6.x-plugin
│ │ ├── feign-default-http-9.x-plugin
│ │ ├── finagle-6.25.x-plugin
│ │ ├── graphql-plugin
│ │ │ ├── graphql-12.x-plugin
│ │ │ ├── graphql-8.x-plugin
│ │ │ └── graphql-9.x-plugin
│ │ ├── grpc-1.x-plugin
│ │ ├── h2-1.x-plugin
│ │ ├── hbase-1.x-plugin
│ │ ├── httpClient-4.x-plugin
│ │ ├── httpasyncclient-4.x-plugin
│ │ ├── httpclient-3.x-plugin
│ │ ├── httpclient-commons
│ │ ├── hystrix-1.x-plugin
│ │ ├── influxdb-2.x-plugin
│ │ ├── jdbc-commons
│ │ ├── jedis-2.x-plugin
│ │ ├── jetty-plugin
│ │ │ ├── jetty-client-9.0-plugin
│ │ │ ├── jetty-client-9.x-plugin
│ │ │ └── jetty-server-9.x-plugin
│ │ ├── kafka-commons
│ │ ├── kafka-plugin
│ │ ├── lettuce-5.x-plugin
│ │ ├── light4j-plugins
│ │ │ └── light4j-plugin
│ │ ├── mariadb-2.x-plugin
│ │ ├── mongodb-2.x-plugin
│ │ ├── mongodb-3.x-plugin
│ │ ├── mongodb-4.x-plugin
│ │ ├── motan-plugin
│ │ ├── mssql-commons
│ │ ├── mssql-jdbc-plugin
│ │ ├── mssql-jtds-1.x-plugin
│ │ ├── mysql-5.x-plugin
│ │ ├── mysql-6.x-plugin
│ │ ├── mysql-8.x-plugin
│ │ ├── mysql-common
│ │ ├── netty-socketio-plugin
│ │ ├── nutz-plugins
│ │ │ ├── http-1.x-plugin
│ │ │ └── mvc-annotation-1.x-plugin
│ │ ├── okhttp-3.x-plugin
│ │ ├── play-2.x-plugin
│ │ ├── postgresql-8.x-plugin
│ │ ├── pulsar-plugin
│ │ ├── quasar-plugin
│ │ ├── rabbitmq-5.x-plugin
│ │ ├── redisson-3.x-plugin
│ │ ├── resteasy-plugin
│ │ │ └── resteasy-server-3.x-plugin
│ │ ├── rocketMQ-3.x-plugin
│ │ ├── rocketMQ-4.x-plugin
│ │ ├── servicecomb-plugin
│ │ │ ├── servicecomb-java-chassis-0.x-plugin
│ │ │ └── servicecomb-java-chassis-1.x-plugin
│ │ ├── sharding-jdbc-1.5.x-plugin
│ │ ├── sharding-sphere-3.x-plugin
│ │ ├── sharding-sphere-4.0.x-plugin
│ │ ├── sharding-sphere-4.1.0-plugin
│ │ ├── sharding-sphere-4.x-RC3-plugin
│ │ ├── sharding-sphere-4.x-plugin
│ │ ├── sofarpc-plugin
│ │ ├── solrj-7.x-plugin
│ │ ├── spring-plugins
│ │ │ ├── async-annotation-plugin
│ │ │ ├── concurrent-util-4.x-plugin
│ │ │ ├── core-patch
│ │ │ ├── mvc-annotation-3.x-plugin
│ │ │ ├── mvc-annotation-4.x-plugin
│ │ │ ├── mvc-annotation-5.x-plugin
│ │ │ ├── mvc-annotation-commons
│ │ │ ├── resttemplate-4.x-plugin
│ │ │ ├── scheduled-annotation-plugin
│ │ │ ├── spring-cloud
│ │ │ │ ├── netflix-plugins
│ │ │ │ │ └── spring-cloud-feign-1.x-plugin
│ │ │ │ └── spring-cloud-feign-2.x-plugin
│ │ │ ├── spring-commons
│ │ │ ├── spring-kafka-1.x-plugin
│ │ │ ├── spring-kafka-2.x-plugin
│ │ │ └── spring-webflux-5.x-webclient-plugin
│ │ ├── spymemcached-2.x-plugin
│ │ ├── struts2-2.x-plugin
│ │ ├── thrift-plugin
│ │ ├── tomcat-7.x-8.x-plugin
│ │ ├── undertow-plugins
│ │ │ └── undertow-2.x-plugin
│ │ ├── vertx-plugins
│ │ │ └── vertx-core-3.x-plugin
│ │ ├── xmemcached-2.x-plugin
│ │ └── xxl-job-2.x-plugin
│ ├── apm-test-tools
│ ├── apm-toolkit-activation
│ │ ├── apm-toolkit-kafka-activation
│ │ ├── apm-toolkit-log4j-1.x-activation
│ │ ├── apm-toolkit-log4j-2.x-activation
│ │ ├── apm-toolkit-logback-1.x-activation
│ │ ├── apm-toolkit-logging-common
│ │ ├── apm-toolkit-meter-activation
│ │ ├── apm-toolkit-opentracing-activation
│ │ └── apm-toolkit-trace-activation
│ ├── bootstrap-plugins
│ │ ├── jdk-http-plugin
│ │ └── jdk-threading-plugin
│ ├── config
│ ├── optional-plugins
│ │ ├── customize-enhance-plugin
│ │ ├── gson-2.8.x-plugin
│ │ ├── kotlin-coroutine-plugin
│ │ ├── optional-spring-plugins
│ │ │ ├── optional-spring-cloud
│ │ │ │ ├── gateway-2.0.x-plugin
│ │ │ │ └── gateway-2.1.x-plugin
│ │ │ ├── spring-annotation-plugin
│ │ │ ├── spring-tx-plugin
│ │ │ └── spring-webflux-5.x-plugin
│ │ ├── quartz-scheduler-2.x-plugin
│ │ ├── trace-ignore-plugin
│ │ └── zookeeper-3.4.x-plugin
│ └── optional-reporter-plugins
│ └── kafka-reporter-plugin
├── apm-webapp # ui项目后端
├── changes # change日志目录
├── dist-material # 生成的可执行项目相关配置目录
│ ├── bin
│ └── release-docs
│ └── licenses
│ └── ui-licenses
├── docker # 生成docker镜像
│ ├── oap
│ └── ui
├── docs # 官方文档目录
├── licenses # 证书目录
├── oap-server # oap服务相关
│ ├── analyzer # 分析器
│ │ ├── agent-analyzer
│ │ ├── log-analyzer
│ │ └── meter-analyzer
│ ├── exporter
│ ├── oal-grammar # oal解释器
│ ├── oal-rt # oal工具
│ ├── server-alarm-plugin # 告警插件
│ ├── server-bootstrap
│ ├── server-cluster-plugin # 集群插件
│ │ ├── cluster-consul-plugin
│ │ ├── cluster-etcd-plugin
│ │ ├── cluster-kubernetes-plugin
│ │ ├── cluster-nacos-plugin
│ │ ├── cluster-standalone-plugin
│ │ └── cluster-zookeeper-plugin
│ ├── server-configuration # 动态配置
│ │ ├── configuration-api
│ │ ├── configuration-apollo
│ │ ├── configuration-consul
│ │ ├── configuration-etcd
│ │ ├── configuration-k8s-configmap
│ │ ├── configuration-nacos
│ │ ├── configuration-zookeeper
│ │ └── grpc-configuration-sync
│ ├── server-core # 核心包
│ ├── server-fetcher-plugin # fetcher插件
│ │ ├── kafka-fetcher-plugin
│ │ └── prometheus-fetcher-plugin
│ ├── server-health-checker # 健康监测
│ ├── server-library #
│ │ ├── library-client
│ │ ├── library-module
│ │ ├── library-server
│ │ └── library-util
│ ├── server-query-plugin # 查询插件
│ │ └── query-graphql-plugin
│ ├── server-receiver-plugin # receiver插件
│ │ ├── configuration-discovery-receiver-plugin
│ │ ├── envoy-metrics-receiver-plugin
│ │ ├── jaeger-receiver-plugin
│ │ ├── otel-receiver-plugin
│ │ ├── receiver-proto
│ │ ├── skywalking-browser-receiver-plugin
│ │ ├── skywalking-clr-receiver-plugin
│ │ ├── skywalking-jvm-receiver-plugin
│ │ ├── skywalking-log-recevier-plugin
│ │ ├── skywalking-management-receiver-plugin
│ │ ├── skywalking-mesh-receiver-plugin
│ │ ├── skywalking-meter-receiver-plugin
│ │ ├── skywalking-profile-receiver-plugin
│ │ ├── skywalking-sharing-server-plugin
│ │ ├── skywalking-trace-receiver-plugin
│ │ └── zipkin-receiver-plugin
│ ├── server-starter # 启动器
│ ├── server-starter-es7 # 启动器 es7
│ ├── server-storage-plugin # 存储插件
│ │ ├── storage-elasticsearch-plugin
│ │ ├── storage-elasticsearch7-plugin
│ │ ├── storage-influxdb-plugin
│ │ ├── storage-jaeger-plugin
│ │ ├── storage-jdbc-hikaricp-plugin
│ │ ├── storage-tidb-plugin
│ │ └── storage-zipkin-plugin
│ ├── server-telemetry # 遥测
│ │ ├── telemetry-api
│ │ └── telemetry-prometheus
│ ├── server-testing #
│ └── server-tools # 服务工具
│ └── profile-exporter
│ ├── tool-profile-snapshot-bootstrap
│ ├── tool-profile-snapshot-exporter
│ ├── tool-profile-snapshot-exporter-es7
│ └── tool-profile-snapshot-server-mock
├── skywalking-ui # UI前端
├── test # 集成测试
└── tools # 工具
│ ├── TLS
│ ├── coverage
│ ├── dependencies
│ ├── plugin
│ ├── profile-exporter
│ ├── releasing
│ └── select-group.py
├── CHANGES.md
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── HEADER
├── LICENSE
├── Makefile # 构建文件
├── NOTICE
├── README.md # README
├── codeStyle.xml
├── lombok.config
├── mvnw
├── mvnw.cmd
└── pom.xml
Skywalking环境搭建
部署文件结构
.
├── docker-compose.yml # docker-compose部署文件
├── es # es集群目录
│ ├── es01
│ ├── es02
│ └── es03
├── kibana # kibana配置目录
│ └── kibana.yml
├── mysql # mysql存储目录
├── nacos # nacos配置目录
│ ├── init.d
│ │ └── custom.properties
│ ├── nacos01
│ ├── nacos02
│ └── nacos03
├── prometheus # prometheus配置目录
│ └── prometheus-cluster.yaml
├── skywalking # skywalking配置目录
│ ├── oap # oap服务配置
│ │ ├── oap01
│ │ │ └── config
│ │ └── oap02
│ │ └── config
│ └── ui # ui服务配置
│ └── webapp.yml
└── startup.sh # docker-compose脚本,提供易用性功能
docker-compose.yaml
version: '3.5'
networks:
skywalking_networks:
ipam:
config:
- subnet: 192.168.200.0/24
# elastic search参考:https://www.elastic.co/guide/en/elasticsearch/reference/7.13/docker.html
# kibana参考:https://www.elastic.co/guide/en/kibana/7.13/docker.html
# nacos参考:https://github.com/nacos-group/nacos-docker/tree/2.0.1
# nacos prometheus grafana监控参考:https://nacos.io/zh-cn/docs/monitor-guide.html
services:
es01:
image: docker.elastic.co/elasticsearch/elasticsearch:${ES_TAG}
container_name: es01
environment:
- node.name=es01
- cluster.name=es-docker-cluster
- discovery.seed_hosts=es02,es03
- cluster.initial_master_nodes=es01,es02,es03
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms1024m -Xmx1024m"
- cluster.max_shards_per_node=100000
- thread_pool.write.queue_size=1000
- cluster.routing.allocation.disk.threshold_enabled=false
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- "./es/es01/data:/usr/share/elasticsearch/data"
ports:
- 9201:9200
networks:
skywalking_networks:
ipv4_address: 192.168.200.10
es02:
image: docker.elastic.co/elasticsearch/elasticsearch:${ES_TAG}
container_name: es02
environment:
- node.name=es02
- cluster.name=es-docker-cluster
- discovery.seed_hosts=es01,es03
- cluster.initial_master_nodes=es01,es02,es03
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms1024m -Xmx1024m"
- cluster.max_shards_per_node=100000
- thread_pool.write.queue_size=1000
- cluster.routing.allocation.disk.threshold_enabled=false
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- "./es/es02/data:/usr/share/elasticsearch/data"
ports:
- 9202:9200
networks:
skywalking_networks:
ipv4_address: 192.168.200.11
es03:
image: docker.elastic.co/elasticsearch/elasticsearch:${ES_TAG}
container_name: es03
environment:
- node.name=es03
- cluster.name=es-docker-cluster
- discovery.seed_hosts=es01,es02
- cluster.initial_master_nodes=es01,es02,es03
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms1024m -Xmx1024m"
- cluster.max_shards_per_node=100000
- thread_pool.write.queue_size=1000
- cluster.routing.allocation.disk.threshold_enabled=false
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- "./es/es03/data:/usr/share/elasticsearch/data"
ports:
- 9203:9200
networks:
skywalking_networks:
ipv4_address: 192.168.200.12
kibana:
image: docker.elastic.co/kibana/kibana:${ES_TAG}
volumes:
- "./kibana/kibana.yml:/usr/share/kibana/config/kibana.yml"
ports:
- 5601:5601
depends_on:
- es01
- es02
- es03
networks:
skywalking_networks:
ipv4_address: 192.168.200.20
nacos01:
image: nacos/nacos-server:${NACOS_VERSION}
container_name: nacos01
networks:
skywalking_networks:
ipv4_address: 192.168.200.30
volumes:
- ./nacos/nacos01/logs:/home/nacos/logs
- ./nacos/init.d/custom.properties:/home/nacos/init.d/custom.properties
ports:
- "8848:8848"
- "9848:9848"
- "9555:9555"
environment:
- JVM_XMS=128m
- JVM_XMX=512m
- JVM_XMN=256m
- JVM_MS=128m
- JVM_MMS=256m
- NACOS_SERVERS=192.168.200.30:8848 192.168.200.31:8848 192.168.200.32:8848
- MYSQL_SERVICE_HOST=mysql
- MYSQL_SERVICE_DB_NAME=nacos_devtest
- MYSQL_SERVICE_PORT=3306
- MYSQL_SERVICE_USER=nacos
- MYSQL_SERVICE_PASSWORD=nacos
- MYSQL_SERVICE_DB_PARAM=characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC
depends_on:
- mysql
nacos02:
image: nacos/nacos-server:${NACOS_VERSION}
container_name: nacos02
networks:
skywalking_networks:
ipv4_address: 192.168.200.31
volumes:
- ./nacos/nacos02/logs:/home/nacos/logs
- ./nacos/init.d/custom.properties:/home/nacos/init.d/custom.properties
ports:
- "8849:8848"
- "9849:9848"
environment:
- JVM_XMS=128m
- JVM_XMX=512m
- JVM_XMN=256m
- JVM_MS=128m
- JVM_MMS=256m
- NACOS_SERVERS=192.168.200.30:8848 192.168.200.31:8848 192.168.200.32:8848
- MYSQL_SERVICE_HOST=mysql
- MYSQL_SERVICE_DB_NAME=nacos_devtest
- MYSQL_SERVICE_PORT=3306
- MYSQL_SERVICE_USER=nacos
- MYSQL_SERVICE_PASSWORD=nacos
- MYSQL_SERVICE_DB_PARAM=characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC
depends_on:
- mysql
nacos03:
image: nacos/nacos-server:${NACOS_VERSION}
container_name: nacos03
networks:
skywalking_networks:
ipv4_address: 192.168.200.32
volumes:
- ./nacos/nacos03/logs:/home/nacos/logs
- ./nacos/init.d/custom.properties:/home/nacos/init.d/custom.properties
ports:
- "8850:8848"
- "9850:9848"
environment:
- JVM_XMS=128m
- JVM_XMX=512m
- JVM_XMN=256m
- JVM_MS=128m
- JVM_MMS=256m
- NACOS_SERVERS=192.168.200.30:8848 192.168.200.31:8848 192.168.200.32:8848
- MYSQL_SERVICE_HOST=mysql
- MYSQL_SERVICE_DB_NAME=nacos_devtest
- MYSQL_SERVICE_PORT=3306
- MYSQL_SERVICE_USER=nacos
- MYSQL_SERVICE_PASSWORD=nacos
- MYSQL_SERVICE_DB_PARAM=characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC
depends_on:
- mysql
mysql:
container_name: mysql
image: nacos/nacos-mysql:5.7
networks:
skywalking_networks:
ipv4_address: 192.168.200.40
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_DATABASE=nacos_devtest
- MYSQL_USER=nacos
- MYSQL_PASSWORD=nacos
volumes:
- ./mysql:/var/lib/mysql
ports:
- "3307:3306"
prometheus:
container_name: prometheus
image: prom/prometheus:${PROMETHEUS_VERSION}
volumes:
- ./prometheus/prometheus-cluster.yaml:/etc/prometheus/prometheus.yml
ports:
- "9090:9090"
depends_on:
- nacos01
- nacos02
- nacos03
networks:
skywalking_networks:
ipv4_address: 192.168.200.50
grafana:
container_name: grafana
image: grafana/grafana:${GRAFANA_VERSION}
ports:
- 3000:3000
networks:
skywalking_networks:
ipv4_address: 192.168.200.60
skywalking-oap01:
image: switchvov/skywalking-oap:${TAG}
container_name: skywalking-oap01
depends_on:
- es01
- es02
- es03
- nacos01
- nacos02
- nacos03
volumes:
- "./skywalking/oap/oap01/config:/skywalking/config"
ports:
- 11801:11800
- 12801:12800
environment:
JAVA_OPTS: " -Xms256M -Xmx1024M"
# es7存储
SW_STORAGE: elasticsearch7
SW_STORAGE_ES_CLUSTER_NODES: es01:9200,es02:9200,es03:9200
# 健康检查
SW_HEALTH_CHECKER: default
# telemetry 与 prometheus
SW_TELEMETRY: prometheus
# 需要更改self->staticConfig->targets->url为当前容器名
# SW_PROMETHEUS_FETCHER: default
TZ: Asia/Shanghai
# 集群模式
SW_CLUSTER: nacos
SW_CLUSTER_NACOS_HOST_PORT: nacos01:8848,nacos02:8848,nacos03:8848
SW_CLUSTER_NACOS_USERNAME: nacos
SW_CLUSTER_NACOS_PASSWORD: nacos
SW_CLUSTER_NACOS_INTERNAL_COM_HOST: 192.168.200.100
SW_CLUSTER_NACOS_INTERNAL_COM_PORT: 11800
# 动态配置
SW_CONFIGURATION: nacos
SW_CONFIG_NACOS_SERVER_ADDR: nacos01
SW_CONFIG_NACOS_SERVER_PORT: 8848
SW_CONFIG_NACOS_SERVER_GROUP: skywalking
SW_CONFIG_NACOS_SERVER_NAMESPACE: skywalking
SW_CONFIG_NACOS_USERNAME: nacos
SW_CONFIG_NACOS_PASSWORD: nacos
restart: on-failure
healthcheck:
test: ["CMD", "./bin/swctl", "ch"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
networks:
skywalking_networks:
ipv4_address: 192.168.200.100
skywalking-oap02:
image: switchvov/skywalking-oap:${TAG}
container_name: skywalking-oap02
depends_on:
- es01
- es02
- es03
- nacos01
- nacos02
- nacos03
volumes:
- "./skywalking/oap/oap02/config:/skywalking/config"
ports:
- 11802:11800
- 12802:12800
environment:
JAVA_OPTS: " -Xms256M -Xmx1024M"
# es7存储
SW_STORAGE: elasticsearch7
SW_STORAGE_ES_CLUSTER_NODES: es01:9200,es02:9200,es03:9200
# 健康检查
SW_HEALTH_CHECKER: default
# telemetry 与 prometheus
SW_TELEMETRY: prometheus
# 需要更改self->staticConfig->targets->url为当前容器名
# SW_PROMETHEUS_FETCHER: default
TZ: Asia/Shanghai
# 集群模式
SW_CLUSTER: nacos
SW_CLUSTER_NACOS_HOST_PORT: nacos01:8848,nacos02:8848,nacos03:8848
SW_CLUSTER_NACOS_USERNAME: nacos
SW_CLUSTER_NACOS_PASSWORD: nacos
SW_CLUSTER_NACOS_INTERNAL_COM_HOST: 192.168.200.101
SW_CLUSTER_NACOS_INTERNAL_COM_PORT: 11800
# 动态配置
SW_CONFIGURATION: nacos
SW_CONFIG_NACOS_SERVER_ADDR: nacos01
SW_CONFIG_NACOS_SERVER_PORT: 8848
SW_CONFIG_NACOS_SERVER_GROUP: skywalking
SW_CONFIG_NACOS_SERVER_NAMESPACE: skywalking
SW_CONFIG_NACOS_USERNAME: nacos
SW_CONFIG_NACOS_PASSWORD: nacos
restart: on-failure
healthcheck:
test: ["CMD", "./bin/swctl", "ch"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
networks:
skywalking_networks:
ipv4_address: 192.168.200.101
skywalking-ui:
image: switchvov/skywalking-ui:${TAG}
container_name: skywalking-ui
depends_on:
- skywalking-oap01
- skywalking-oap02
ports:
- 18080:8080
volumes:
- "./skywalking/ui/webapp.yml:/skywalking/webapp/webapp.yml"
environment:
SW_OAP_ADDRESS: skywalking-oap01:12800,skywalking-oap02:12800
networks:
skywalking_networks:
ipv4_address: 192.168.200.110
deploy:
resources:
limits:
memory: 768M
部署文件:docker.zip
PS:可用内存未大于11G,切勿尝试,如想尝试,请限制容器内存使用。
参考文档
分享并记录所学所见