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?
Overview and Core concepts
Project Goals
Project Goals
Introduction
Service auto instrument agent
Manual instrument SDK
Service Mesh probe
Backend
Overview
Observability Analysis Language
Query in OAP
Meter Analysis Language
UI
Overview
Setup
Language agents in Service
Agents
Java agent
Supported middleware, framework and library
Agent Configuration Properties
Optional plugins
Bootstrap/JVM class plugin
Advanced reporters
Plugin development guide
Agent plugin tests and performance tests
Other language agents
Service Mesh
Observe Istio Control Plane
Observe Service Mesh
Proxy
Envoy Proxy
Send Envoy metrics to SkyWalking with / without Istio
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
UI Introduction
Contributing Guides
Contact us
Process to become official Apache SkyWalking Committer
Compiling Guide
Agent plugin development guide
Protocols
Query Protocol
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。htmlservices: 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,切勿嘗試,如想嘗試,請限制容器記憶體使用。
參考文件
Skywalking官網
Skywalking專案README文件v8。4。0
分享並記錄所學所見