├── 5.x ├── agent │ ├── Dockerfile │ └── README.md ├── cluster │ └── collector │ │ ├── Dockerfile │ │ ├── README.md │ │ ├── application.yml │ │ └── docker-entrypoint.sh ├── kubernetes │ ├── all-in-one-standalone.yml │ └── collector-cluster.yml ├── quick-start │ ├── README.md │ └── docker-compose.yml └── standalone │ ├── all-in-one-xpack │ ├── Dockerfile │ ├── README.md │ ├── application.yml │ ├── docker-entrypoint.sh │ └── webapp.yml │ └── all-in-one │ ├── Dockerfile │ ├── README.md │ ├── application.yml │ ├── docker-entrypoint.sh │ ├── wait-for-it.sh │ └── webapp.yml ├── 6.x ├── README.md ├── config │ ├── alarm-settings.yml │ ├── application.yml │ ├── component-libraries.yml │ └── log4j2.xml ├── docker-compose │ └── docker-compose.yml └── image-build │ ├── oap │ ├── Dockerfile │ ├── docker-entrypoint.sh │ └── log4j2.xml │ └── ui │ ├── Dockerfile │ ├── docker-entrypoint.sh │ ├── logback.xml │ └── webapp.yml ├── README.md └── elasticsearch-Zone-Asia-SH ├── 5.6.10 ├── Dockerfile └── README.md ├── 6.3.2 ├── Dockerfile ├── README.md └── elasticsearch.yml ├── 6.6.2 ├── Dockerfile ├── README.md └── elasticsearch.yml └── 7.0.1 ├── Dockerfile ├── README.md └── elasticsearch.yml /5.x/agent/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.8 AS sky-builder 2 | 3 | ENV SKYWALKING_VERSION=5.0.0-GA 4 | 5 | # after ADD unzip does not work? 6 | ADD http://mirrors.tuna.tsinghua.edu.cn/apache/incubator/skywalking/${SKYWALKING_VERSION}/apache-skywalking-apm-incubating-${SKYWALKING_VERSION}.tar.gz / 7 | 8 | RUN tar -zxvf /apache-skywalking-apm-incubating-${SKYWALKING_VERSION}.tar.gz 9 | 10 | FROM java:openjdk-8u111-jre 11 | 12 | LABEL maintainer="jian.tan@daocloud.io" 13 | 14 | COPY --from=sky-builder /apache-skywalking-apm-incubating/agent /apache-skywalking-apm-incubating/agent 15 | 16 | 17 | # agent locations in /apache-skywalking-apm-incubating/agent folder. 18 | -------------------------------------------------------------------------------- /5.x/agent/README.md: -------------------------------------------------------------------------------- 1 | # Skywalking-Agent 2 | 3 | 此镜像提供了Agent基础镜像,你可以基于此镜像定制自己的应用镜像,类似于java镜像。 4 | 5 | ## 用法(Useage) 6 | 将一个Java应用程序接入Skywalking,其中agent包在容器内```/apache-skywalking-apm-incubating/agent/```目录下: 7 | 8 | ``` 9 | FROM wutang/skywalking-agent:latest 10 | 11 | LABEL maintainer="jian.tan@daocloud.io" 12 | 13 | ENV SW_APPLICATION_CODE=java-demo-application \ 14 | SW_COLLECTOR_SERVERS=192.168.1.1:10800,192.168.1.2:10800 15 | 16 | COPY demo.jar / 17 | 18 | # 更多参数请参考官方agent.config文件 19 | ENTRYPOINT java -javaagent:/apache-skywalking-apm-incubating/agent/skywalking-agent.jar -Dskywalking.collector.servers=${SW_COLLECTOR_SERVERS} \ 20 | -Dskywalking.agent.application_code=${SW_APPLICATION_CODE} -jar /demo.jar 21 | ``` 22 | -------------------------------------------------------------------------------- /5.x/cluster/collector/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.8 AS sky-builder 2 | 3 | ENV SKYWALKING_VERSION=5.0.0-GA 4 | 5 | # after ADD unzip does not work? 6 | ADD http://mirrors.tuna.tsinghua.edu.cn/apache/incubator/skywalking/${SKYWALKING_VERSION}/apache-skywalking-apm-incubating-${SKYWALKING_VERSION}.tar.gz / 7 | 8 | RUN tar -zxvf /apache-skywalking-apm-incubating-${SKYWALKING_VERSION}.tar.gz \ 9 | && cd /apache-skywalking-apm-incubating \ 10 | && rm -rf ./agent \ 11 | && rm -rf ./webapp 12 | 13 | FROM java:openjdk-8u111-jre 14 | 15 | LABEL maintainer="jian.tan@daocloud.io" 16 | 17 | ENV ZK_ADDRESSES=127.0.0.1:2181,127.0.0.1:2182,127.0.0.1:2183 \ 18 | DAE_NETWORK='mac' \ 19 | DAE_SEGMENT='^172\.17\.\d{1,3}.\d{1,3}$' \ 20 | ES_CLUSTER_NAME=elasticsearch \ 21 | ES_CLUSTER_SNIFFER=true \ 22 | ES_ADDRESSES=127.0.0.1:9300 \ 23 | BIND_HOST=localhost \ 24 | NAMING_BIND_HOST=localhost \ 25 | NAMING_BIND_PORT=10800 \ 26 | REMOTE_BIND_PORT=11800 \ 27 | AGENT_GRPC_BIND_PORT=11800 \ 28 | AGENT_JETTY_BIND_HOST=localhost \ 29 | AGENT_JETTY_BIND_PORT=12800 \ 30 | UI_JETTY_BIND_PORT=12800 \ 31 | UI_JETTY_BIND_HOST=0.0.0.0 \ 32 | BUFFER_FILE_PATH=../buffer/ \ 33 | BUFFER_OFFSET_MAX_FILE_SIZE=10M \ 34 | BUFFER_SEGMENT_MAX_FILE_SIZE=50M \ 35 | BUFFER_FILE_CLEAN_WHEN_RESTART=true \ 36 | ES_SHARDS_NUMBER=2 \ 37 | ES_REPLICAS_NUMBER=0 \ 38 | ES_BULK_ACTIONS=2000 \ 39 | ES_FLUSH_INTERVAL=10 \ 40 | ES_CONCURRENT_REQUESTS=2 \ 41 | ES_HIGH_PERFORMANCE_MODE=true \ 42 | ES_BULK_SIZE=20 \ 43 | TRACE_DATA_TTL=90 \ 44 | MINUTE_METRIC_DATA_TTL=90 \ 45 | HOUR_METRIC_DATA_TTL=36 \ 46 | DAY_METRIC_DATA_TTL=45 \ 47 | MONTH_METRIC_DATA_TTL=18 \ 48 | THRESHOLD_APPLICATION_APDEX=2000 \ 49 | THRESHOLD_SERVICE_ERROR_RATE=10.00 \ 50 | THRESHOLD_SERVICE_AVG_RESPONSE_TIME=2000 \ 51 | THRESHOLD_INSTANCE_ERROR_RATE=10.00 \ 52 | THRESHOLD_INSTANCE_AVG_RESPONSE_TIME=2000 \ 53 | THRESHOLD_APPLICATION_ERROR_RATE=10.00 \ 54 | THRESHOLD_APPLICATION_AVG_RESPONSE_TIME=2000 \ 55 | THERMODYNAMIC_RESPONSE_TIME=50 \ 56 | THERMODYNAMIC_COUNT_OF_RESPONSE_TIME=40 \ 57 | WORKER_CACHE_MAX_SIZE=10000 58 | 59 | COPY --from=sky-builder /apache-skywalking-apm-incubating /apache-skywalking-apm-incubating 60 | 61 | COPY application.yml /apache-skywalking-apm-incubating/config/application.yml 62 | 63 | COPY docker-entrypoint.sh /docker-entrypoint.sh 64 | 65 | ADD https://github.com/JaredTan95/docker-app-ip-entrypoint/releases/download/v1.0/dce-app-entrypoint / 66 | 67 | # logs locations in /apache-skywalking-apm-incubating/logs folder. 68 | 69 | RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \ 70 | && echo 'Asia/Shanghai' >/etc/timezone \ 71 | && chmod +x /docker-entrypoint.sh \ 72 | && chmod +x /dce-app-entrypoint \ 73 | && chmod +x /apache-skywalking-apm-incubating/bin/collectorService.sh \ 74 | && echo "tail -f -n 300 /apache-skywalking-apm-incubating/logs/collector.log" >> /apache-skywalking-apm-incubating/bin/collectorService.sh \ 75 | && rm -rf /apache-skywalking-apm-incubating/agent 76 | 77 | EXPOSE 8080 10800 11800 12800 78 | 79 | ENTRYPOINT ["/dce-app-entrypoint"] 80 | 81 | CMD /docker-entrypoint.sh && /apache-skywalking-apm-incubating/bin/collectorService.sh 82 | -------------------------------------------------------------------------------- /5.x/cluster/collector/README.md: -------------------------------------------------------------------------------- 1 | # skywalking-collector 2 | [![Docker Build Status](https://img.shields.io/docker/build/wutang/skywalking-collector.svg)](https://hub.docker.com/r/wutang/skywalking-collector/) 3 | [![Docker Pulls](https://img.shields.io/docker/pulls/wutang/skywalking-collector.svg)](https://hub.docker.com/r/wutang/skywalking-collector/) 4 | [![Docker Automated build](https://img.shields.io/docker/automated/wutang/skywalking-collector.svg)](https://hub.docker.com/r/wutang/skywalking-collector/builds/) 5 | 6 | Docker 镜像名称:[wutang/skywalking-collector](https://hub.docker.com/r/wutang/skywalking-collector/) 7 | 8 | 此镜像主要提供了Skywalking Collector服务的镜像,该镜像包含单机版和集群版的Collector收集器,通过此镜像部署Collector集群需要Zookeeper的支持。在启动是通过`ZK_ADDRESSES=127.0.0.1:2181,...,127.0.0.1:2182`传入Zookeeper集群地址。 9 | 10 | ## 拉取镜像(Pull Image): 11 | - 单机版Collector 12 | ```docker pull wutang/skywalking-collector:5.x```或者```docker pull wutang/skywalking-collector``` 13 | 14 | - 集群版Collector 15 | ```docker pull wutang/skywalking-collector:5.x-zk```或者```docker pull wutang/skywalking-collector:latest-zk``` 16 | 17 | ## 运行镜像(Run): 18 | - 单机版Collctor 19 | 20 | ### 主机模式启动(Host Mode): 21 | ``` 22 | docker run --net=host \ 23 | -m 2048m --memory-swap 2400m \ 24 | -e DAE_SEGMENT="^127\.0\.\d{1,3}.\d{1,3}$" \ 25 | -e JAVA_OPTS="-Xms1024m -Xmx2048m" \ 26 | -e ES_CLUSTER_NAME=elasticsearch \ 27 | -e ES_ADDRESSES=127.17.0.3:9300 \ 28 | -d wutang/skywalking-collector:5.x 29 | ``` 30 | 31 | ### 端口映射模式启动(Port-Mapping Mode) 32 | ``` 33 | docker run -p 10800:10800 -p 11800:11800 -p 12800:12800 \ 34 | -m 2048m --memory-swap 2400m \ 35 | -e DAE_SEGMENT="^172\.17\.\d{1,3}.\d{1,3}$" \ 36 | -e JAVA_OPTS="-Xms1024m -Xmx2048m" \ 37 | -e ES_CLUSTER_NAME=elasticsearch \ 38 | -e ES_ADDRESSES=127.17.0.3:9300 \ 39 | -d wutang/skywalking-collector:5.x 40 | ``` 41 | 42 | - 集群版Collctor 43 | - 注意:请确保Zookeeper集群已经处于运行状态,可参考[Zookeeper部署](https://hub.docker.com/_/zookeeper/) 44 | ``` 45 | docker run --net=host \ 46 | -m 2048m --memory-swap 2400m \ 47 | -e ZK_ADDRESSES=127.0.0.1:2181,127.0.0.1:2182 \ 48 | -e DAE_SEGMENT="^127\.0\.\d{1,3}.\d{1,3}$" \ 49 | -e JAVA_OPTS="-Xms1024m -Xmx2048m" \ 50 | -e ES_CLUSTER_NAME=elasticsearch \ 51 | -e ES_ADDRESSES=127.17.0.3:9300 \ 52 | -d wutang/skywalking-collector:5.x 53 | ``` 54 | 55 | ### 端口映射模式启动(Port-Mapping Mode) 56 | ``` 57 | docker run -p 10800:10800 -p 11800:11800 -p 12800:12800 \ 58 | -m 2048m --memory-swap 2400m \ 59 | -e ZK_ADDRESSES=127.0.0.1:2181,127.0.0.1:2182 \ 60 | -e DAE_SEGMENT="^172\.17\.\d{1,3}.\d{1,3}$" \ 61 | -e JAVA_OPTS="-Xms1024m -Xmx2048m" \ 62 | -e ES_CLUSTER_NAME=elasticsearch \ 63 | -e ES_ADDRESSES=127.17.0.3:9300 \ 64 | -d wutang/skywalking-collector:5.x 65 | ``` 66 | 67 | ## 环境变量(Environment Variables) 68 | - ```DAE_SEGMENT```:容器会根据该正则表达式所匹配到的IP进行绑定。 69 | - ```ES_CLUSTER_NAME```,```ES_ADDRESSES```:elasticsearch 地址和集群名称。注意:此处Elasticsearch地址中的端口务必是Elasticsearch TCP端口(9300)。 70 | 71 | ## Skywalking-Docker镜像配合使用请参考 72 | - [wutang/skywalking-docker](https://hub.docker.com/r/wutang/skywalking-docker/)镜像[使用说明](https://github.com/JaredTan95/skywalking-docker/blob/master/5.x/standalone/all-in-one/README.md) 73 | - [quick start](https://github.com/JaredTan95/skywalking-docker/blob/master/5.x/quick-start/README.md) 74 | 75 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /5.x/cluster/collector/application.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | cluster: 18 | zookeeper: 19 | hostPort: {ZK_ADDRESSES} 20 | sessionTimeout: 100000 21 | naming: 22 | jetty: 23 | #OS real network IP(binding required), for agent to find collector cluster 24 | host: {NAMING_BIND_HOST} 25 | port: {NAMING_BIND_PORT} 26 | contextPath: / 27 | cache: 28 | # guava: 29 | caffeine: 30 | remote: 31 | gRPC: 32 | # OS real network IP(binding required), for collector nodes communicate with each other in cluster. collectorN --(gRPC) --> collectorM 33 | host: {BIND_HOST} 34 | port: {REMOTE_BIND_PORT} 35 | agent_gRPC: 36 | gRPC: 37 | #OS real network IP(binding required), for agent to uplink data(trace/metrics) to collector. agent--(gRPC)--> collector 38 | host: {BIND_HOST} 39 | port: {AGENT_GRPC_BIND_PORT} 40 | # Set these two setting to open ssl 41 | #sslCertChainFile: $path 42 | #sslPrivateKeyFile: $path 43 | 44 | # Set your own token to active auth 45 | #authentication: xxxxxx 46 | agent_jetty: 47 | jetty: 48 | # OS real network IP(binding required), for agent to uplink data(trace/metrics) to collector through HTTP. agent--(HTTP)--> collector 49 | # SkyWalking native Java/.Net/node.js agents don't use this. 50 | # Open this for other implementor. 51 | host: {AGENT_JETTY_BIND_HOST} 52 | port: {AGENT_JETTY_BIND_PORT} 53 | contextPath: / 54 | analysis_register: 55 | default: 56 | analysis_jvm: 57 | default: 58 | analysis_segment_parser: 59 | default: 60 | bufferFilePath: {BUFFER_FILE_PATH} 61 | bufferOffsetMaxFileSize: {BUFFER_OFFSET_MAX_FILE_SIZE} 62 | bufferSegmentMaxFileSize: {BUFFER_SEGMENT_MAX_FILE_SIZE} 63 | bufferFileCleanWhenRestart: {BUFFER_FILE_CLEAN_WHEN_RESTART} 64 | ui: 65 | jetty: 66 | # Stay in `0.0.0.0` if UI starts up in default mode. 67 | # Change it to OS real network IP(binding required), if deploy collector in different machine. 68 | host: {UI_JETTY_BIND_HOST} 69 | port: {UI_JETTY_BIND_PORT} 70 | contextPath: / 71 | storage: 72 | elasticsearch: 73 | clusterName: {ES_CLUSTER_NAME} 74 | clusterTransportSniffer: false 75 | clusterNodes: {ES_ADDRESSES} 76 | indexShardsNumber: {ES_SHARDS_NUMBER} 77 | indexReplicasNumber: {ES_REPLICAS_NUMBER} 78 | highPerformanceMode: {ES_HIGH_PERFORMANCE_MODE} 79 | # Batch process setting, refer to https://www.elastic.co/guide/en/elasticsearch/client/java-api/5.5/java-docs-bulk-processor.html 80 | bulkActions: {ES_BULK_ACTIONS} # Execute the bulk every 2000 requests 81 | bulkSize: {ES_BULK_SIZE} # flush the bulk every 20mb 82 | flushInterval: {ES_FLUSH_INTERVAL} # flush the bulk every 10 seconds whatever the number of requests 83 | concurrentRequests: {ES_CONCURRENT_REQUESTS} # the number of concurrent requests 84 | # Set a timeout on metric data. After the timeout has expired, the metric data will automatically be deleted. 85 | traceDataTTL: {TRACE_DATA_TTL} # Unit is minute 86 | minuteMetricDataTTL: {MINUTE_METRIC_DATA_TTL} # Unit is minute 87 | hourMetricDataTTL: {HOUR_METRIC_DATA_TTL} # Unit is hour 88 | dayMetricDataTTL: {DAY_METRIC_DATA_TTL} # Unit is day 89 | monthMetricDataTTL: {MONTH_METRIC_DATA_TTL} # Unit is month 90 | #storage: 91 | # h2: 92 | # url: jdbc:h2:~/memorydb 93 | # userName: sa 94 | configuration: 95 | default: 96 | #namespace: xxxxx 97 | # alarm threshold 98 | applicationApdexThreshold: {THRESHOLD_APPLICATION_APDEX} 99 | serviceErrorRateThreshold: {THRESHOLD_SERVICE_ERROR_RATE} 100 | serviceAverageResponseTimeThreshold: {THRESHOLD_SERVICE_AVG_RESPONSE_TIME} 101 | instanceErrorRateThreshold: {THRESHOLD_INSTANCE_ERROR_RATE} 102 | instanceAverageResponseTimeThreshold: {THRESHOLD_INSTANCE_AVG_RESPONSE_TIME} 103 | applicationErrorRateThreshold: {THRESHOLD_APPLICATION_ERROR_RATE} 104 | applicationAverageResponseTimeThreshold: {THRESHOLD_APPLICATION_AVG_RESPONSE_TIME} 105 | # thermodynamic 106 | thermodynamicResponseTimeStep: {THERMODYNAMIC_RESPONSE_TIME} 107 | thermodynamicCountOfResponseTimeSteps: {THERMODYNAMIC_COUNT_OF_RESPONSE_TIME} 108 | # max collection's size of worker cache collection, setting it smaller when collector OutOfMemory crashed. 109 | workerCacheMaxSize: {WORKER_CACHE_MAX_SIZE} 110 | #receiver_zipkin: 111 | # default: 112 | # host: 0.0.0.0 113 | # port: 9411 114 | # contextPath: / 115 | -------------------------------------------------------------------------------- /5.x/cluster/collector/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | absolute_path="/apache-skywalking-apm-incubating/config/application.yml" 4 | 5 | echo "replace {ZK_ADDRESSES} to ${ZK_ADDRESSES}" 6 | eval sed -i -e 's/\{ZK_ADDRESSES\}/${ZK_ADDRESSES}/' ${absolute_path} 7 | 8 | echo "replace {ES_CLUSTER_NAME} to ${ES_CLUSTER_NAME}" 9 | eval sed -i -e 's/\{ES_CLUSTER_NAME\}/${ES_CLUSTER_NAME}/' ${absolute_path} 10 | 11 | echo "replace {ES_ADDRESSES} to ${ES_ADDRESSES}" 12 | eval sed -i -e 's/\{ES_ADDRESSES\}/${ES_ADDRESSES}/' ${absolute_path} 13 | 14 | echo "replace {BIND_HOST} to ${DCE_ADVERTISE_IP}" 15 | eval sed -i -e 's/\{BIND_HOST\}/${DCE_ADVERTISE_IP}/' ${absolute_path} 16 | 17 | echo "replace {NAMING_BIND_HOST} to ${NAMING_BIND_HOST}" 18 | eval sed -i -e 's/\{NAMING_BIND_HOST\}/${NAMING_BIND_HOST}/' ${absolute_path} 19 | 20 | echo "replace {NAMING_BIND_PORT} to ${NAMING_BIND_PORT}" 21 | eval sed -i -e 's/\{NAMING_BIND_PORT\}/${NAMING_BIND_PORT}/' ${absolute_path} 22 | 23 | echo "replace {REMOTE_BIND_PORT} to ${REMOTE_BIND_PORT}" 24 | eval sed -i -e 's/\{REMOTE_BIND_PORT\}/${REMOTE_BIND_PORT}/' ${absolute_path} 25 | 26 | echo "replace {AGENT_GRPC_BIND_PORT} to ${AGENT_GRPC_BIND_PORT}" 27 | eval sed -i -e 's/\{AGENT_GRPC_BIND_PORT\}/${AGENT_GRPC_BIND_PORT}/' ${absolute_path} 28 | 29 | echo "replace {AGENT_JETTY_BIND_HOST} to ${AGENT_JETTY_BIND_HOST}" 30 | eval sed -i -e 's/\{AGENT_JETTY_BIND_HOST\}/${AGENT_JETTY_BIND_HOST}/' ${absolute_path} 31 | 32 | echo "replace {AGENT_JETTY_BIND_PORT} to ${AGENT_JETTY_BIND_PORT}" 33 | eval sed -i -e 's/\{AGENT_JETTY_BIND_PORT\}/${AGENT_JETTY_BIND_PORT}/' ${absolute_path} 34 | 35 | echo "replace {UI_JETTY_BIND_PORT} to ${UI_JETTY_BIND_PORT}" 36 | eval sed -i -e 's/\{UI_JETTY_BIND_PORT\}/${UI_JETTY_BIND_PORT}/' ${absolute_path} 37 | 38 | echo "replace {UI_JETTY_BIND_HOST} to ${UI_JETTY_BIND_HOST}" 39 | eval sed -i -e 's/\{UI_JETTY_BIND_HOST\}/${UI_JETTY_BIND_HOST}/' ${absolute_path} 40 | 41 | echo "replace {BUFFER_FILE_PATH} to ${BUFFER_FILE_PATH}" 42 | eval sed -i -e 's/\{BUFFER_FILE_PATH\}/${BUFFER_FILE_PATH}/' ${absolute_path} 43 | 44 | echo "replace {BUFFER_OFFSET_MAX_FILE_SIZE} to ${BUFFER_OFFSET_MAX_FILE_SIZE}" 45 | eval sed -i -e 's/\{BUFFER_OFFSET_MAX_FILE_SIZE\}/${BUFFER_OFFSET_MAX_FILE_SIZE}/' ${absolute_path} 46 | 47 | echo "replace {BUFFER_SEGMENT_MAX_FILE_SIZE} to ${BUFFER_SEGMENT_MAX_FILE_SIZE}" 48 | eval sed -i -e 's/\{BUFFER_SEGMENT_MAX_FILE_SIZE\}/${BUFFER_SEGMENT_MAX_FILE_SIZE}/' ${absolute_path} 49 | 50 | echo "replace {BUFFER_FILE_CLEAN_WHEN_RESTART} to ${BUFFER_FILE_CLEAN_WHEN_RESTART}" 51 | eval sed -i -e 's/\{BUFFER_FILE_CLEAN_WHEN_RESTART\}/${BUFFER_FILE_CLEAN_WHEN_RESTART}/' ${absolute_path} 52 | 53 | echo "replace {ES_SHARDS_NUMBER} to ${ES_SHARDS_NUMBER}" 54 | eval sed -i -e 's/\{ES_SHARDS_NUMBER\}/${ES_SHARDS_NUMBER}/' ${absolute_path} 55 | 56 | echo "replace {ES_REPLICAS_NUMBER} to ${ES_REPLICAS_NUMBER}" 57 | eval sed -i -e 's/\{ES_REPLICAS_NUMBER\}/${ES_REPLICAS_NUMBER}/' ${absolute_path} 58 | 59 | echo "replace {ES_BULK_ACTIONS} to ${ES_BULK_ACTIONS}" 60 | eval sed -i -e 's/\{ES_BULK_ACTIONS\}/${ES_BULK_ACTIONS}/' ${absolute_path} 61 | 62 | echo "replace {ES_BULK_SIZE} to ${ES_BULK_SIZE}" 63 | eval sed -i -e 's/\{ES_BULK_SIZE\}/${ES_BULK_SIZE}/' ${absolute_path} 64 | 65 | echo "replace {ES_FLUSH_INTERVAL} to ${ES_FLUSH_INTERVAL}" 66 | eval sed -i -e 's/\{ES_FLUSH_INTERVAL\}/${ES_FLUSH_INTERVAL}/' ${absolute_path} 67 | 68 | echo "replace {ES_CONCURRENT_REQUESTS} to ${ES_CONCURRENT_REQUESTS}" 69 | eval sed -i -e 's/\{ES_CONCURRENT_REQUESTS\}/${ES_CONCURRENT_REQUESTS}/' ${absolute_path} 70 | 71 | echo "replace {ES_HIGH_PERFORMANCE_MODE} to ${ES_HIGH_PERFORMANCE_MODE}" 72 | eval sed -i -e 's/\{ES_HIGH_PERFORMANCE_MODE\}/${ES_HIGH_PERFORMANCE_MODE}/' ${absolute_path} 73 | 74 | echo "replace {TRACE_DATA_TTL} to ${TRACE_DATA_TTL}" 75 | eval sed -i -e 's/\{TRACE_DATA_TTL\}/${TRACE_DATA_TTL}/' ${absolute_path} 76 | 77 | echo "replace {MINUTE_METRIC_DATA_TTL} to ${MINUTE_METRIC_DATA_TTL}" 78 | eval sed -i -e 's/\{MINUTE_METRIC_DATA_TTL\}/${MINUTE_METRIC_DATA_TTL}/' ${absolute_path} 79 | 80 | echo "replace {HOUR_METRIC_DATA_TTL} to ${HOUR_METRIC_DATA_TTL}" 81 | eval sed -i -e 's/\{HOUR_METRIC_DATA_TTL\}/${HOUR_METRIC_DATA_TTL}/' ${absolute_path} 82 | 83 | echo "replace {DAY_METRIC_DATA_TTL} to ${DAY_METRIC_DATA_TTL}" 84 | eval sed -i -e 's/\{DAY_METRIC_DATA_TTL\}/${DAY_METRIC_DATA_TTL}/' ${absolute_path} 85 | 86 | echo "replace {MONTH_METRIC_DATA_TTL} to ${MONTH_METRIC_DATA_TTL}" 87 | eval sed -i -e 's/\{DAY_METRIC_DATA_TTL\}/${MONTH_METRIC_DATA_TTL}/' ${absolute_path} 88 | 89 | echo "replace {THRESHOLD_APPLICATION_APDEX} to ${THRESHOLD_APPLICATION_APDEX}" 90 | eval sed -i -e 's/\{THRESHOLD_APPLICATION_APDEX\}/${THRESHOLD_APPLICATION_APDEX}/' ${absolute_path} 91 | 92 | echo "replace {THRESHOLD_SERVICE_ERROR_RATE} to ${THRESHOLD_SERVICE_ERROR_RATE}" 93 | eval sed -i -e 's/\{THRESHOLD_SERVICE_ERROR_RATE\}/${THRESHOLD_SERVICE_ERROR_RATE}/' ${absolute_path} 94 | 95 | echo "replace {THRESHOLD_SERVICE_AVG_RESPONSE_TIME} to ${THRESHOLD_SERVICE_AVG_RESPONSE_TIME}" 96 | eval sed -i -e 's/\{THRESHOLD_SERVICE_AVG_RESPONSE_TIME\}/${THRESHOLD_SERVICE_AVG_RESPONSE_TIME}/' ${absolute_path} 97 | 98 | echo "replace {THRESHOLD_INSTANCE_ERROR_RATE} to ${THRESHOLD_INSTANCE_ERROR_RATE}" 99 | eval sed -i -e 's/\{THRESHOLD_INSTANCE_ERROR_RATE\}/${THRESHOLD_INSTANCE_ERROR_RATE}/' ${absolute_path} 100 | 101 | echo "replace {THRESHOLD_INSTANCE_AVG_RESPONSE_TIME} to ${THRESHOLD_INSTANCE_AVG_RESPONSE_TIME}" 102 | eval sed -i -e 's/\{THRESHOLD_INSTANCE_AVG_RESPONSE_TIME\}/${THRESHOLD_INSTANCE_AVG_RESPONSE_TIME}/' ${absolute_path} 103 | 104 | echo "replace {THRESHOLD_APPLICATION_ERROR_RATE} to ${THRESHOLD_APPLICATION_ERROR_RATE}" 105 | eval sed -i -e 's/\{THRESHOLD_APPLICATION_ERROR_RATE\}/${THRESHOLD_APPLICATION_ERROR_RATE}/' ${absolute_path} 106 | 107 | echo "replace {THRESHOLD_APPLICATION_AVG_RESPONSE_TIME} to ${THRESHOLD_APPLICATION_AVG_RESPONSE_TIME}" 108 | eval sed -i -e 's/\{THRESHOLD_APPLICATION_AVG_RESPONSE_TIME\}/${THRESHOLD_APPLICATION_AVG_RESPONSE_TIME}/' ${absolute_path} 109 | 110 | echo "replace {THERMODYNAMIC_RESPONSE_TIME} to ${THERMODYNAMIC_RESPONSE_TIME}" 111 | eval sed -i -e 's/\{THERMODYNAMIC_RESPONSE_TIME\}/${THERMODYNAMIC_RESPONSE_TIME}/' ${absolute_path} 112 | 113 | echo "replace {THERMODYNAMIC_COUNT_OF_RESPONSE_TIME} to ${THERMODYNAMIC_COUNT_OF_RESPONSE_TIME}" 114 | eval sed -i -e 's/\{THERMODYNAMIC_COUNT_OF_RESPONSE_TIME\}/${THERMODYNAMIC_COUNT_OF_RESPONSE_TIME}/' ${absolute_path} 115 | 116 | echo "replace {WORKER_CACHE_MAX_SIZE} to ${WORKER_CACHE_MAX_SIZE}" 117 | eval sed -i -e 's/\{WORKER_CACHE_MAX_SIZE\}/${WORKER_CACHE_MAX_SIZE}/' ${absolute_path} 118 | 119 | exec "$@" 120 | -------------------------------------------------------------------------------- /5.x/kubernetes/all-in-one-standalone.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: extensions/v1beta1 3 | kind: Deployment 4 | metadata: 5 | name: skywalking-docker 6 | labels: 7 | app: skywalking-docker 8 | spec: 9 | template: 10 | metadata: 11 | labels: 12 | app: skywalking-docker 13 | spec: 14 | containers: 15 | - image: wutang/skywalking-docker:5.x 16 | name: skywalking-docker 17 | volumeMounts: 18 | - name: host-time 19 | mountPath: /etc/localtime 20 | readOnly: true 21 | - name: skywalking-logs 22 | mountPath: /apache-skywalking-apm-incubating/logs 23 | ports: 24 | - containerPort: 10800 25 | name: skywalking-0 26 | - containerPort: 11800 27 | name: skywalking-1 28 | - containerPort: 12800 29 | name: skywalking-2 30 | - containerPort: 8080 31 | name: skywalking-3 32 | resources: 33 | limits: 34 | cpu: "1000m" 35 | memory: "2000Mi" 36 | requests: 37 | cpu: "1000m" 38 | memory: "2000Mi" 39 | env: 40 | - name: ES_CLUSTER_NAME 41 | value: docker-cluster 42 | - name: ES_ADDRESSES 43 | value: dmp-elasticsearch:9300 44 | - name: BIND_HOST 45 | value: {{ HOST_IP }} 46 | - name: AGENT_JETTY_BIND_HOST 47 | value: {{ HOST_IP }} 48 | - name: NAMING_BIND_HOST 49 | value: {{ HOST_IP }} 50 | - name: UI_JETTY_BIND_HOST 51 | value: 0.0.0.0 52 | - name: JAVA_OPTS 53 | value: -Xms1000m -Xmx1000m -XX:MaxRAM=2000m 54 | volumes: 55 | - name: host-time 56 | hostPath: 57 | path: /etc/localtime 58 | - name: skywalking-logs 59 | hostPath: 60 | path: /root/skywalking-logs/skywalking 61 | affinity: 62 | nodeAffinity: 63 | requiredDuringSchedulingIgnoredDuringExecution: 64 | nodeSelectorTerms: 65 | - matchExpressions: 66 | - operator: In 67 | values: 68 | - {{ DCE_SKY_WALKING_HOST_NAME }} 69 | key: kubernetes.io/hostname 70 | --- 71 | apiVersion: v1 72 | kind: Service 73 | metadata: 74 | name: skywalking-docker 75 | labels: 76 | app: skywalking-docker 77 | spec: 78 | type: NodePort 79 | ports: 80 | - port: 10800 81 | name: skywalking-0 82 | - port: 11800 83 | name: skywalking-1 84 | - port: 12800 85 | name: skywalking-2 86 | selector: 87 | app: skywalking-docker 88 | -------------------------------------------------------------------------------- /5.x/kubernetes/collector-cluster.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: extensions/v1beta1 3 | kind: Deployment 4 | metadata: 5 | name: skywalking-docker 6 | labels: 7 | app: skywalking-docker 8 | spec: 9 | template: 10 | metadata: 11 | labels: 12 | app: skywalking-docker 13 | spec: 14 | containers: 15 | - image: wutang/skywalking-collector:5.x-zk 16 | name: skywalking-docker 17 | volumeMounts: 18 | - name: host-time 19 | mountPath: /etc/localtime 20 | readOnly: true 21 | - name: skywalking-logs 22 | mountPath: /apache-skywalking-apm-incubating/logs 23 | ports: 24 | - containerPort: 10800 25 | name: skywalking-0 26 | - containerPort: 11800 27 | name: skywalking-1 28 | - containerPort: 12800 29 | name: skywalking-2 30 | resources: 31 | limits: 32 | cpu: "1000m" 33 | memory: "2000Mi" 34 | requests: 35 | cpu: "1000m" 36 | memory: "2000Mi" 37 | env: 38 | - name: ZK_ADDRESSES 39 | value: {{ ZK_CLUSTER }} 40 | - name: ES_CLUSTER_NAME 41 | value: docker-cluster 42 | - name: ES_ADDRESSES 43 | value: dmp-elasticsearch:9300 44 | - name: BIND_HOST 45 | value: {{ HOST_IP }} 46 | - name: AGENT_JETTY_BIND_HOST 47 | value: {{ HOST_IP }} 48 | - name: NAMING_BIND_HOST 49 | value: {{ HOST_IP }} 50 | - name: UI_JETTY_BIND_HOST 51 | value: 0.0.0.0 52 | - name: JAVA_OPTS 53 | value: -Xms1000m -Xmx1000m -XX:MaxRAM=2000m 54 | volumes: 55 | - name: host-time 56 | hostPath: 57 | path: /etc/localtime 58 | - name: skywalking-logs 59 | hostPath: 60 | path: /root/skywalking-logs/skywalking 61 | affinity: 62 | nodeAffinity: 63 | requiredDuringSchedulingIgnoredDuringExecution: 64 | nodeSelectorTerms: 65 | - matchExpressions: 66 | - operator: In 67 | values: 68 | - {{ DCE_SKY_WALKING_HOST_NAME }} 69 | key: kubernetes.io/hostname 70 | --- 71 | apiVersion: v1 72 | kind: Service 73 | metadata: 74 | name: skywalking-docker 75 | labels: 76 | app: skywalking-docker 77 | spec: 78 | type: NodePort 79 | ports: 80 | - port: 10800 81 | name: skywalking-0 82 | - port: 11800 83 | name: skywalking-1 84 | - port: 12800 85 | name: skywalking-2 86 | selector: 87 | app: skywalking-docker 88 | -------------------------------------------------------------------------------- /5.x/quick-start/README.md: -------------------------------------------------------------------------------- 1 | # Skywalking-Dcoker Quick Start 2 | 其中引用了[wutang/elasticsearch-shanghai-zone ](https://hub.docker.com/r/wutang/elasticsearch-shanghai-zone/)镜像和[wutang/skywalking-docker](https://hub.docker.com/r/wutang/skywalking-docker/) 镜像 3 | 4 | - ```cd /skywalking-docker/5.x/quick-start/``` 5 | - ```docker-compose up [-d]``` 6 | 7 | 偶尔可能因为elasticsearch启动较慢导致skywalking启动失败,常见于UI报500错误. 8 | 9 | 此时确保elasticsearch 9200能正常返回数据之后,重启一下skywalking容器即可. -------------------------------------------------------------------------------- /5.x/quick-start/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | services: 3 | elasticsearch-service: 4 | image: wutang/elasticsearch-shanghai-zone:5.6.10 5 | container_name: elasticsearch 6 | environment: 7 | - cluster.name=elasticsearch 8 | - bootstrap.memory_lock=true 9 | - xpack.security.enabled=false 10 | - "ES_JAVA_OPTS=-Xms2g -Xmx2g" 11 | - node.name=elasticsearch_node_1 12 | ulimits: 13 | memlock: 14 | soft: -1 15 | hard: -1 16 | ports: 17 | - 9200:9200 18 | - 9300:9300 19 | 20 | skywalking: 21 | image: wutang/skywalking-docker:5.x 22 | container_name: skywalking 23 | environment: 24 | - ES_CLUSTER_NAME=elasticsearch 25 | - ES_ADDRESSES=elasticsearch-service:9300 26 | depends_on: 27 | - elasticsearch-service 28 | command: ["/wait-for-it.sh", "elasticsearch-service:9300", "-t", "20"] 29 | links: 30 | - elasticsearch-service 31 | ports: 32 | - 8080:8080 33 | - 10800:10800 34 | - 11800:11800 35 | - 12800:12800 -------------------------------------------------------------------------------- /5.x/standalone/all-in-one-xpack/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.8 AS sky-builder 2 | 3 | ENV SKYWALKING_VERSION=5.0.0-RC2 4 | 5 | # after ADD unzip does not work? 6 | ADD apache-skywalking-apm-incubating.tar.gz / 7 | 8 | # RUN tar -zxvf /apache-skywalking-apm-incubating-${SKYWALKING_VERSION}.tar.gz 9 | 10 | FROM java:openjdk-8u111-jre 11 | 12 | LABEL maintainer="jian.tan@daocloud.io" 13 | 14 | ENV ES_CLUSTER_NAME=elasticsearch \ 15 | ES_ADDRESSES=localhost:9300 \ 16 | BIND_HOST=0.0.0.0 \ 17 | NAMING_BIND_HOST=0.0.0.0 \ 18 | NAMING_BIND_PORT=10800 \ 19 | REMOTE_BIND_PORT=11800 \ 20 | AGENT_GRPC_BIND_PORT=11800 \ 21 | AGENT_JETTY_BIND_HOST=0.0.0.0 \ 22 | AGENT_JETTY_BIND_PORT=12800 \ 23 | UI_JETTY_BIND_PORT=12800 \ 24 | UI_JETTY_BIND_HOST=0.0.0.0\ 25 | SECURITY_USER=''\ 26 | UI_SERVER_PORT=8080 \ 27 | UI_ADMIN_PASSWORD=admin \ 28 | UI_RIBBON_LIST_SERVERS=127.0.0.1:10800 29 | 30 | COPY --from=sky-builder /apache-skywalking-apm-incubating /apache-skywalking-apm-incubating 31 | 32 | COPY application.yml /apache-skywalking-apm-incubating/config/application.yml 33 | COPY webapp.yml /apache-skywalking-apm-incubating/webapp/webapp.yml 34 | 35 | COPY docker-entrypoint.sh /docker-entrypoint.sh 36 | 37 | # logs locations in /sky/logs folder. 38 | 39 | RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \ 40 | && echo 'Asia/Shanghai' >/etc/timezone \ 41 | && chmod +x /docker-entrypoint.sh \ 42 | && chmod +x /apache-skywalking-apm-incubating/bin/startup.sh \ 43 | && echo "tail -f /dev/null" >> /apache-skywalking-apm-incubating/bin/startup.sh \ 44 | && rm -rf /apache-skywalking-apm-incubating/agent 45 | 46 | EXPOSE 8080 10800 11800 12800 47 | 48 | ENTRYPOINT ["/docker-entrypoint.sh"] 49 | 50 | CMD ["/apache-skywalking-apm-incubating/bin/startup.sh"] 51 | -------------------------------------------------------------------------------- /5.x/standalone/all-in-one-xpack/README.md: -------------------------------------------------------------------------------- 1 | 2 | # Skywalking-Dcoker for ES xpack 镜像 3 | 4 | [![Docker Build Status](https://img.shields.io/docker/build/liguobao/skywalking-docker.svg)](https://hub.docker.com/r/liguobao/skywalking-docker/) 5 | [![Docker Pulls](https://img.shields.io/docker/pulls/liguobao/skywalking-docker.svg)](https://hub.docker.com/r/liguobao/skywalking-docker/) 6 | 7 | ## Dockerfile说明 8 | 9 | apache-skywalking-apm-incubating.tar.gz为支持ES X-Pack修改后打包出来的压缩包,此仓库没有这个文件的. 10 | 11 | 可以去QQ群:Apache SkyWalking交流群(392443393)群文件中下载apache-skywalking-apm-incubating-xpack.tar.gz 12 | 13 | 或者自行编译[liguobao/incubator-skywalking/tree/5.x](https://github.com/liguobao/incubator-skywalking/tree/5.x) 此版本的源码. 14 | 15 | 编译步骤: 16 | 17 | ```sh 18 | # Prepare git, JDK8 and maven3 19 | git clone https://github.com/liguobao/incubator-skywalking.git 20 | cd incubator-skywalking/ 21 | git checkout 5.x 22 | #Switch to the tag by using git checkout [tagname] (Optional, switch if want to build a release from source codes) 23 | git submodule init 24 | git submodule update 25 | Run ./mvnw clean package -DskipTests 26 | #All packages are in /dist.(.tar.gz for Linux and .zip for Windows). 27 | ``` 28 | 29 | Docker 镜像名称:[liguobao/skywalking-docker](https://hub.docker.com/r/liguobao/skywalking-docker/) 30 | 31 | ## 拉取镜像(Pull Image): 32 | ```docker pull liguobao/skywalking-docker:5.0.RC2.xpack``` 33 | 34 | ## 运行镜像(Run)for ES xpack: 35 | - ```docker run -p 8080:8080 -p 10800:10800 -p 11800:11800 -p 12800:12800 -e ES_CLUSTER_NAME=elasticsearch -e ES_ADDRESSES=192.168.2.96:9300 -e SECURITY_USER='elastic:password' -d liguobao/skywalking-docker:5.0.RC2.xpack``` 36 | - 使用浏览器访问```http://localhost:8080```即可. 37 | - 日志挂载 ```-v /your/log/path:/apache-skywalking-apm-incubating/logs``` 38 | 39 | ## 环境变量(Environment Variables) 40 | - ```ES_CLUSTER_NAME```,```ES_ADDRESSES```:elasticsearch 地址和集群名称。注意:此处Elasticsearch地址中的端口务必是Elasticsearch TCP端口。 41 | - ```SECURITY_USER```,```SECURITY_USER```:elasticsearch 的账号密码,使用X-Pack实现的,常见阿里云ES,格式为:'user:password'.此参数不传入或者传入'' ,默认使用没有授权的client. 42 | - ```NAMING_BIND_HOST```,```NAMING_BIND_PORT```:OS real network IP(binding required),for agent to find collector cluster. 43 | - ```BIND_HOST```,```REMOTE_BIND_PORT```:OS real network IP(binding required),for collector nodes communicate with each other in cluster. collectorN --(gRPC) --> collectorM 44 | - ```AGENT_GRPC_BIND_PORT```:OS real network IP(binding required),for agent to uplink data(trace/metrics) to collector. agent--(gRPC)--> collector 45 | - ```AGENT_JETTY_BIND_HOST```,```AGENT_JETTY_BIND_PORT```:OS real network IP(binding required), for agent to uplink data(trace/metrics) to collector through HTTP. agent--(HTTP)--> collector 46 | -```UI_JETTY_BIND_HOST```,```UI_JETTY_BIND_PORT```:Stay in `0.0.0.0` if UI starts up in default mode.Change it to OS real network IP(binding required), if deploy collector in different machine. 47 | 48 | 49 | 50 | ## 与elasticsearch-shanghai-zone镜像配合使用请参考 51 | - [wutang/elasticsearch-shanghai-zone](../../../elasticsearch-5.6.10-Zone-Asia-SH/README.md) 52 | - [quick start](../5.x/quick-start/README.md) 53 | 54 | 55 | -------------------------------------------------------------------------------- /5.x/standalone/all-in-one-xpack/application.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | #cluster: 18 | # zookeeper: 19 | # #hostPort: 0.0.0.0:2181 20 | # hostPort: {ZK_ADDRESSES} 21 | # sessionTimeout: 100000 22 | naming: 23 | jetty: 24 | #OS real network IP(binding required), for agent to find collector cluster 25 | host: {NAMING_BIND_HOST} 26 | port: {NAMING_BIND_PORT} 27 | contextPath: / 28 | cache: 29 | # guava: 30 | caffeine: 31 | remote: 32 | gRPC: 33 | # OS real network IP(binding required), for collector nodes communicate with each other in cluster. collectorN --(gRPC) --> collectorM 34 | host: {BIND_HOST} 35 | port: {REMOTE_BIND_PORT} 36 | agent_gRPC: 37 | gRPC: 38 | #OS real network IP(binding required), for agent to uplink data(trace/metrics) to collector. agent--(gRPC)--> collector 39 | host: {BIND_HOST} 40 | port: {AGENT_GRPC_BIND_PORT} 41 | # Set these two setting to open ssl 42 | #sslCertChainFile: $path 43 | #sslPrivateKeyFile: $path 44 | 45 | # Set your own token to active auth 46 | #authentication: xxxxxx 47 | agent_jetty: 48 | jetty: 49 | # OS real network IP(binding required), for agent to uplink data(trace/metrics) to collector through HTTP. agent--(HTTP)--> collector 50 | # SkyWalking native Java/.Net/node.js agents don't use this. 51 | # Open this for other implementor. 52 | host: {AGENT_JETTY_BIND_HOST} 53 | port: {AGENT_JETTY_BIND_PORT} 54 | contextPath: / 55 | analysis_register: 56 | default: 57 | analysis_jvm: 58 | default: 59 | analysis_segment_parser: 60 | default: 61 | bufferFilePath: ../buffer/ 62 | bufferOffsetMaxFileSize: 10M 63 | bufferSegmentMaxFileSize: 500M 64 | bufferFileCleanWhenRestart: false 65 | ui: 66 | jetty: 67 | # Stay in `0.0.0.0` if UI starts up in default mode. 68 | # Change it to OS real network IP(binding required), if deploy collector in different machine. 69 | host: {UI_JETTY_BIND_HOST} 70 | port: {UI_JETTY_BIND_PORT} 71 | contextPath: / 72 | storage: 73 | elasticsearch: 74 | clusterName: {ES_CLUSTER_NAME} 75 | clusterTransportSniffer: true 76 | clusterNodes: {ES_ADDRESSES} 77 | securityUser: '{SECURITY_USER}' 78 | indexShardsNumber: 2 79 | indexReplicasNumber: 0 80 | highPerformanceMode: true 81 | # Batch process setting, refer to https://www.elastic.co/guide/en/elasticsearch/client/java-api/5.5/java-docs-bulk-processor.html 82 | bulkActions: 2000 # Execute the bulk every 2000 requests 83 | bulkSize: 20 # flush the bulk every 20mb 84 | flushInterval: 10 # flush the bulk every 10 seconds whatever the number of requests 85 | concurrentRequests: 2 # the number of concurrent requests 86 | # Set a timeout on metric data. After the timeout has expired, the metric data will automatically be deleted. 87 | traceDataTTL: 90 # Unit is minute 88 | minuteMetricDataTTL: 90 # Unit is minute 89 | hourMetricDataTTL: 36 # Unit is hour 90 | dayMetricDataTTL: 45 # Unit is day 91 | monthMetricDataTTL: 18 # Unit is month 92 | #storage: 93 | # h2: 94 | # url: jdbc:h2:~/memorydb 95 | # userName: sa 96 | configuration: 97 | default: 98 | #namespace: xxxxx 99 | # alarm threshold 100 | applicationApdexThreshold: 2000 101 | serviceErrorRateThreshold: 10.00 102 | serviceAverageResponseTimeThreshold: 2000 103 | instanceErrorRateThreshold: 10.00 104 | instanceAverageResponseTimeThreshold: 2000 105 | applicationErrorRateThreshold: 10.00 106 | applicationAverageResponseTimeThreshold: 2000 107 | # thermodynamic 108 | thermodynamicResponseTimeStep: 50 109 | thermodynamicCountOfResponseTimeSteps: 40 110 | # max collection's size of worker cache collection, setting it smaller when collector OutOfMemory crashed. 111 | workerCacheMaxSize: 10000 112 | #receiver_zipkin: 113 | # default: 114 | # host: 0.0.0.0 115 | # port: 9411 116 | # contextPath: / 117 | -------------------------------------------------------------------------------- /5.x/standalone/all-in-one-xpack/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | absolute_path="/apache-skywalking-apm-incubating/config/application.yml" 4 | 5 | webapp_config_path="/apache-skywalking-apm-incubating/webapp/webapp.yml" 6 | 7 | echo "replace {ES_CLUSTER_NAME} to ${ES_CLUSTER_NAME}" 8 | eval sed -i -e 's/\{ES_CLUSTER_NAME\}/${ES_CLUSTER_NAME}/' ${absolute_path} 9 | 10 | echo "replace {ES_ADDRESSES} to ${ES_ADDRESSES}" 11 | eval sed -i -e 's/\{ES_ADDRESSES\}/${ES_ADDRESSES}/' ${absolute_path} 12 | 13 | echo "replace {BIND_HOST} to ${BIND_HOST}" 14 | eval sed -i -e 's/\{BIND_HOST\}/${BIND_HOST}/' ${absolute_path} 15 | 16 | echo "replace {NAMING_BIND_HOST} to ${NAMING_BIND_HOST}" 17 | eval sed -i -e 's/\{NAMING_BIND_HOST\}/${NAMING_BIND_HOST}/' ${absolute_path} 18 | 19 | echo "replace {NAMING_BIND_PORT} to ${NAMING_BIND_PORT}" 20 | eval sed -i -e 's/\{NAMING_BIND_PORT\}/${NAMING_BIND_PORT}/' ${absolute_path} 21 | 22 | echo "replace {REMOTE_BIND_PORT} to ${REMOTE_BIND_PORT}" 23 | eval sed -i -e 's/\{REMOTE_BIND_PORT\}/${REMOTE_BIND_PORT}/' ${absolute_path} 24 | 25 | echo "replace {AGENT_GRPC_BIND_PORT} to ${AGENT_GRPC_BIND_PORT}" 26 | eval sed -i -e 's/\{AGENT_GRPC_BIND_PORT\}/${AGENT_GRPC_BIND_PORT}/' ${absolute_path} 27 | 28 | echo "replace {AGENT_JETTY_BIND_HOST} to ${AGENT_JETTY_BIND_HOST}" 29 | eval sed -i -e 's/\{AGENT_JETTY_BIND_HOST\}/${AGENT_JETTY_BIND_HOST}/' ${absolute_path} 30 | 31 | echo "replace {AGENT_JETTY_BIND_PORT} to ${AGENT_JETTY_BIND_PORT}" 32 | eval sed -i -e 's/\{AGENT_JETTY_BIND_PORT\}/${AGENT_JETTY_BIND_PORT}/' ${absolute_path} 33 | 34 | echo "replace {UI_JETTY_BIND_PORT} to ${UI_JETTY_BIND_PORT}" 35 | eval sed -i -e 's/\{UI_JETTY_BIND_PORT\}/${UI_JETTY_BIND_PORT}/' ${absolute_path} 36 | 37 | echo "replace {UI_JETTY_BIND_HOST} to ${UI_JETTY_BIND_HOST}" 38 | eval sed -i -e 's/\{UI_JETTY_BIND_HOST\}/${UI_JETTY_BIND_HOST}/' ${absolute_path} 39 | 40 | echo "replace {SECURITY_USER} to ${SECURITY_USER}" 41 | eval sed -i -e 's/\{SECURITY_USER\}/${SECURITY_USER}/' ${absolute_path} 42 | 43 | echo "replace {UI_SERVER_PORT} to ${UI_SERVER_PORT}" 44 | eval sed -i -e 's/\{UI_SERVER_PORT\}/${UI_SERVER_PORT}/' ${webapp_config_path} 45 | 46 | echo "replace {UI_ADMIN_PASSWORD} to ${UI_ADMIN_PASSWORD}" 47 | eval sed -i -e 's/\{UI_ADMIN_PASSWORD\}/${UI_ADMIN_PASSWORD}/' ${webapp_config_path} 48 | 49 | echo "replace {UI_RIBBON_LIST_SERVERS} to ${UI_RIBBON_LIST_SERVERS}" 50 | eval sed -i -e 's/\{UI_RIBBON_LIST_SERVERS\}/${UI_RIBBON_LIST_SERVERS}/' ${webapp_config_path} 51 | 52 | 53 | exec "$@" 54 | -------------------------------------------------------------------------------- /5.x/standalone/all-in-one-xpack/webapp.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | server: 18 | port: {UI_SERVER_PORT} 19 | 20 | collector: 21 | path: /graphql 22 | ribbon: 23 | ReadTimeout: 10000 24 | listOfServers: {UI_RIBBON_LIST_SERVERS} 25 | 26 | security: 27 | user: 28 | admin: 29 | password: {UI_ADMIN_PASSWORD} 30 | -------------------------------------------------------------------------------- /5.x/standalone/all-in-one/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.8 AS sky-builder 2 | 3 | ENV SKYWALKING_VERSION=5.0.0-GA 4 | 5 | # after ADD unzip does not work? 6 | ADD http://mirrors.tuna.tsinghua.edu.cn/apache/incubator/skywalking/${SKYWALKING_VERSION}/apache-skywalking-apm-incubating-${SKYWALKING_VERSION}.tar.gz / 7 | 8 | RUN tar -zxvf /apache-skywalking-apm-incubating-${SKYWALKING_VERSION}.tar.gz 9 | 10 | FROM java:openjdk-8u111-jre 11 | 12 | LABEL maintainer="jian.tan@daocloud.io" 13 | 14 | ENV ES_CLUSTER_NAME=elasticsearch \ 15 | ES_ADDRESSES=127.0.0.1:9300 \ 16 | BIND_HOST=0.0.0.0 \ 17 | NAMING_BIND_HOST=0.0.0.0 \ 18 | NAMING_BIND_PORT=10800 \ 19 | REMOTE_BIND_PORT=11800 \ 20 | AGENT_GRPC_BIND_PORT=11800 \ 21 | AGENT_JETTY_BIND_HOST=localhost \ 22 | AGENT_JETTY_BIND_PORT=12800 \ 23 | UI_JETTY_BIND_PORT=12800 \ 24 | UI_JETTY_BIND_HOST=0.0.0.0 \ 25 | BUFFER_OFFSET_MAX_FILE_SIZE=10M \ 26 | BUFFER_SEGMENT_MAX_FILE_SIZE=50M \ 27 | BUFFER_FILE_CLEAN_WHEN_RESTART=true \ 28 | ES_SHARDS_NUMBER=2 \ 29 | ES_REPLICAS_NUMBER=0 \ 30 | ES_BULK_ACTIONS=2000 \ 31 | ES_FLUSH_INTERVAL=10 \ 32 | ES_CONCURRENT_REQUESTS=2 \ 33 | ES_HIGH_PERFORMANCE_MODE=true \ 34 | ES_BULK_SIZE=20 \ 35 | TRACE_DATA_TTL=90 \ 36 | MINUTE_METRIC_DATA_TTL=90 \ 37 | HOUR_METRIC_DATA_TTL=36 \ 38 | DAY_METRIC_DATA_TTL=45 \ 39 | MONTH_METRIC_DATA_TTL=18 \ 40 | THRESHOLD_APPLICATION_APDEX=2000 \ 41 | THRESHOLD_SERVICE_ERROR_RATE=10.00 \ 42 | THRESHOLD_SERVICE_AVG_RESPONSE_TIME=2000 \ 43 | THRESHOLD_INSTANCE_ERROR_RATE=10.00 \ 44 | THRESHOLD_INSTANCE_AVG_RESPONSE_TIME=2000 \ 45 | THRESHOLD_APPLICATION_ERROR_RATE=10.00 \ 46 | THRESHOLD_APPLICATION_AVG_RESPONSE_TIME=2000 \ 47 | THERMODYNAMIC_RESPONSE_TIME=50 \ 48 | THERMODYNAMIC_COUNT_OF_RESPONSE_TIME=40 \ 49 | WORKER_CACHE_MAX_SIZE=10000 50 | 51 | COPY --from=sky-builder /apache-skywalking-apm-incubating /apache-skywalking-apm-incubating 52 | 53 | COPY application.yml /apache-skywalking-apm-incubating/config/application.yml 54 | 55 | COPY webapp.yml /apache-skywalking-apm-incubating/webapp/webapp.yml 56 | 57 | COPY docker-entrypoint.sh /docker-entrypoint.sh 58 | 59 | COPY wait-for-it.sh /wait-for-it.sh 60 | 61 | # logs locations in /sky/logs folder. 62 | RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \ 63 | && echo 'Asia/Shanghai' > /etc/timezone \ 64 | && chmod +x /docker-entrypoint.sh \ 65 | && chmod +x /apache-skywalking-apm-incubating/bin/startup.sh \ 66 | && echo "tail -f -n 300 /apache-skywalking-apm-incubating/logs/skywalking-collector-server.log" >> /apache-skywalking-apm-incubating/bin/startup.sh \ 67 | && rm -rf /apache-skywalking-apm-incubating/agent 68 | 69 | EXPOSE 8080 10800 11800 12800 70 | 71 | CMD /docker-entrypoint.sh && /apache-skywalking-apm-incubating/bin/startup.sh 72 | -------------------------------------------------------------------------------- /5.x/standalone/all-in-one/README.md: -------------------------------------------------------------------------------- 1 | # Skywalking-Docker 镜像 2 | 3 | [![Docker Build Status](https://img.shields.io/docker/build/wutang/skywalking-docker.svg)](https://hub.docker.com/r/wutang/skywalking-docker/) 4 | [![Docker Pulls](https://img.shields.io/docker/pulls/wutang/skywalking-docker.svg)](https://hub.docker.com/r/wutang/skywalking-docker/) 5 | 6 | 7 | Docker 镜像名称:[wutang/skywalking-docker](https://hub.docker.com/r/wutang/skywalking-docker/) 8 | 9 | ## 拉取镜像(Pull Image): 10 | ```docker pull wutang/skywalking-docker``` 11 | 12 | ## 运行镜像(Run): 13 | ### 主机模式启动(Host Mode): 14 | ``` 15 | docker run -d --net=host \ 16 | -m 2048m --memory-swap 2400m \ 17 | -e JAVA_OPTS="-Xms1024m -Xmx2048m" \ 18 | -e ES_CLUSTER_NAME=elasticsearch \ 19 | -e ES_ADDRESSES=127.17.0.3:9300 \ 20 | wutang/skywalking-docker 21 | ``` 22 | 23 | ### 端口映射模式启动(Port-Mapping Mode) 24 | ``` 25 | docker run -d -p 8080:8080 -p 10800:10800 -p 11800:11800 -p 12800:12800 \ 26 | -m 2048m --memory-swap 2400m \ 27 | -e JAVA_OPTS="-Xms1024m -Xmx2048m" \ 28 | -e ES_CLUSTER_NAME=elasticsearch \ 29 | -e ES_ADDRESSES=127.17.0.3:9300 \ 30 | wutang/skywalking-docker 31 | ``` 32 | - 使用浏览器访问```http://localhost:8080```即可. 33 | - 日志挂载 ```-v /your/log/path:/apache-skywalking-apm-incubating/logs``` 34 | 35 | ## 环境变量(Environment Variables) 36 | - ```DAE_SEGMENT```:容器会根据该正则表达式所匹配到的IP进行绑定。 37 | - ```ES_CLUSTER_NAME```,```ES_ADDRESSES```:elasticsearch 地址和集群名称。注意:此处Elasticsearch地址中的端口务必是Elasticsearch TCP端口(9300)。 38 | - ```BIND_HOST```: 操作系统IP或容器IP。 39 | - ```UI_ADMIN_PASSWORD```:UI界面中管理员‘admin’的登录密码。 40 | 41 | ## 与elasticsearch-shanghai-zone镜像配合使用请参考 42 | - [wutang/elasticsearch-shanghai-zone](https://github.com/JaredTan95/skywalking-docker/blob/master/elasticsearch-Zone-Asia-SH/README.md) 43 | - [quick start](https://github.com/JaredTan95/skywalking-docker/blob/master/5.x/quick-start/README.md) 44 | 45 | 46 | -------------------------------------------------------------------------------- /5.x/standalone/all-in-one/application.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | #cluster: 18 | # zookeeper: 19 | # #hostPort: 0.0.0.0:2181 20 | # hostPort: {ZK_ADDRESSES} 21 | # sessionTimeout: 100000 22 | naming: 23 | jetty: 24 | #OS real network IP(binding required), for agent to find collector cluster 25 | host: {NAMING_BIND_HOST} 26 | port: {NAMING_BIND_PORT} 27 | contextPath: / 28 | cache: 29 | # guava: 30 | caffeine: 31 | remote: 32 | gRPC: 33 | # OS real network IP(binding required), for collector nodes communicate with each other in cluster. collectorN --(gRPC) --> collectorM 34 | host: {BIND_HOST} 35 | port: {REMOTE_BIND_PORT} 36 | agent_gRPC: 37 | gRPC: 38 | #OS real network IP(binding required), for agent to uplink data(trace/metrics) to collector. agent--(gRPC)--> collector 39 | host: {BIND_HOST} 40 | port: {AGENT_GRPC_BIND_PORT} 41 | # Set these two setting to open ssl 42 | #sslCertChainFile: $path 43 | #sslPrivateKeyFile: $path 44 | 45 | # Set your own token to active auth 46 | #authentication: xxxxxx 47 | agent_jetty: 48 | jetty: 49 | # OS real network IP(binding required), for agent to uplink data(trace/metrics) to collector through HTTP. agent--(HTTP)--> collector 50 | # SkyWalking native Java/.Net/node.js agents don't use this. 51 | # Open this for other implementor. 52 | host: {AGENT_JETTY_BIND_HOST} 53 | port: {AGENT_JETTY_BIND_PORT} 54 | contextPath: / 55 | analysis_register: 56 | default: 57 | analysis_jvm: 58 | default: 59 | analysis_segment_parser: 60 | default: 61 | bufferFilePath: ../buffer/ 62 | bufferOffsetMaxFileSize: {BUFFER_OFFSET_MAX_FILE_SIZE} 63 | bufferSegmentMaxFileSize: {BUFFER_SEGMENT_MAX_FILE_SIZE} 64 | bufferFileCleanWhenRestart: {BUFFER_FILE_CLEAN_WHEN_RESTART} 65 | ui: 66 | jetty: 67 | # Stay in `0.0.0.0` if UI starts up in default mode. 68 | # Change it to OS real network IP(binding required), if deploy collector in different machine. 69 | host: {UI_JETTY_BIND_HOST} 70 | port: {UI_JETTY_BIND_PORT} 71 | contextPath: / 72 | storage: 73 | elasticsearch: 74 | clusterName: {ES_CLUSTER_NAME} 75 | clusterTransportSniffer: false 76 | clusterNodes: {ES_ADDRESSES} 77 | indexShardsNumber: {ES_SHARDS_NUMBER} 78 | indexReplicasNumber: {ES_REPLICAS_NUMBER} 79 | highPerformanceMode: {ES_HIGH_PERFORMANCE_MODE} 80 | # Batch process setting, refer to https://www.elastic.co/guide/en/elasticsearch/client/java-api/5.5/java-docs-bulk-processor.html 81 | bulkActions: {ES_BULK_ACTIONS} # Execute the bulk every 2000 requests 82 | bulkSize: {ES_BULK_SIZE} # flush the bulk every 20mb 83 | flushInterval: {ES_FLUSH_INTERVAL} # flush the bulk every 10 seconds whatever the number of requests 84 | concurrentRequests: {ES_CONCURRENT_REQUESTS} # the number of concurrent requests 85 | # Set a timeout on metric data. After the timeout has expired, the metric data will automatically be deleted. 86 | traceDataTTL: {TRACE_DATA_TTL} # Unit is minute 87 | minuteMetricDataTTL: {MINUTE_METRIC_DATA_TTL} # Unit is minute 88 | hourMetricDataTTL: {HOUR_METRIC_DATA_TTL} # Unit is hour 89 | dayMetricDataTTL: {DAY_METRIC_DATA_TTL} # Unit is day 90 | monthMetricDataTTL: {MONTH_METRIC_DATA_TTL} # Unit is month 91 | #storage: 92 | # h2: 93 | # url: jdbc:h2:~/memorydb 94 | # userName: sa 95 | configuration: 96 | default: 97 | #namespace: xxxxx 98 | # alarm threshold 99 | applicationApdexThreshold: {THRESHOLD_APPLICATION_APDEX} 100 | serviceErrorRateThreshold: {THRESHOLD_SERVICE_ERROR_RATE} 101 | serviceAverageResponseTimeThreshold: {THRESHOLD_SERVICE_AVG_RESPONSE_TIME} 102 | instanceErrorRateThreshold: {THRESHOLD_INSTANCE_ERROR_RATE} 103 | instanceAverageResponseTimeThreshold: {THRESHOLD_INSTANCE_AVG_RESPONSE_TIME} 104 | applicationErrorRateThreshold: {THRESHOLD_APPLICATION_ERROR_RATE} 105 | applicationAverageResponseTimeThreshold: {THRESHOLD_APPLICATION_AVG_RESPONSE_TIME} 106 | # thermodynamic 107 | thermodynamicResponseTimeStep: {THERMODYNAMIC_RESPONSE_TIME} 108 | thermodynamicCountOfResponseTimeSteps: {THERMODYNAMIC_COUNT_OF_RESPONSE_TIME} 109 | # max collection's size of worker cache collection, setting it smaller when collector OutOfMemory crashed. 110 | workerCacheMaxSize: {WORKER_CACHE_MAX_SIZE} 111 | #receiver_zipkin: 112 | # default: 113 | # host: 0.0.0.0 114 | # port: 9411 115 | # contextPath: / 116 | -------------------------------------------------------------------------------- /5.x/standalone/all-in-one/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | application_config_path="/apache-skywalking-apm-incubating/config/application.yml" 4 | 5 | webapp_config_path="/apache-skywalking-apm-incubating/webapp/webapp.yml" 6 | 7 | echo "replace {ES_CLUSTER_NAME} to ${ES_CLUSTER_NAME}" 8 | eval sed -i -e 's/\{ES_CLUSTER_NAME\}/${ES_CLUSTER_NAME}/' ${application_config_path} 9 | 10 | echo "replace {ES_ADDRESSES} to ${ES_ADDRESSES}" 11 | eval sed -i -e 's/\{ES_ADDRESSES\}/${ES_ADDRESSES}/' ${application_config_path} 12 | 13 | echo "replace {BIND_HOST} to ${BIND_HOST}" 14 | eval sed -i -e 's/\{BIND_HOST\}/${BIND_HOST}/' ${application_config_path} 15 | 16 | echo "replace {NAMING_BIND_HOST} to ${NAMING_BIND_HOST}" 17 | eval sed -i -e 's/\{NAMING_BIND_HOST\}/${NAMING_BIND_HOST}/' ${application_config_path} 18 | 19 | echo "replace {NAMING_BIND_PORT} to ${NAMING_BIND_PORT}" 20 | eval sed -i -e 's/\{NAMING_BIND_PORT\}/${NAMING_BIND_PORT}/' ${application_config_path} 21 | 22 | echo "replace {REMOTE_BIND_PORT} to ${REMOTE_BIND_PORT}" 23 | eval sed -i -e 's/\{REMOTE_BIND_PORT\}/${REMOTE_BIND_PORT}/' ${application_config_path} 24 | 25 | echo "replace {AGENT_GRPC_BIND_PORT} to ${AGENT_GRPC_BIND_PORT}" 26 | eval sed -i -e 's/\{AGENT_GRPC_BIND_PORT\}/${AGENT_GRPC_BIND_PORT}/' ${application_config_path} 27 | 28 | echo "replace {AGENT_JETTY_BIND_HOST} to ${AGENT_JETTY_BIND_HOST}" 29 | eval sed -i -e 's/\{AGENT_JETTY_BIND_HOST\}/${AGENT_JETTY_BIND_HOST}/' ${application_config_path} 30 | 31 | echo "replace {AGENT_JETTY_BIND_PORT} to ${AGENT_JETTY_BIND_PORT}" 32 | eval sed -i -e 's/\{AGENT_JETTY_BIND_PORT\}/${AGENT_JETTY_BIND_PORT}/' ${application_config_path} 33 | 34 | echo "replace {UI_JETTY_BIND_PORT} to ${UI_JETTY_BIND_PORT}" 35 | eval sed -i -e 's/\{UI_JETTY_BIND_PORT\}/${UI_JETTY_BIND_PORT}/' ${application_config_path} 36 | 37 | echo "replace {UI_JETTY_BIND_HOST} to ${UI_JETTY_BIND_HOST}" 38 | eval sed -i -e 's/\{UI_JETTY_BIND_HOST\}/${UI_JETTY_BIND_HOST}/' ${application_config_path} 39 | 40 | echo "replace {BUFFER_OFFSET_MAX_FILE_SIZE} to ${BUFFER_OFFSET_MAX_FILE_SIZE}" 41 | eval sed -i -e 's/\{BUFFER_OFFSET_MAX_FILE_SIZE\}/${BUFFER_OFFSET_MAX_FILE_SIZE}/' ${application_config_path} 42 | 43 | echo "replace {BUFFER_SEGMENT_MAX_FILE_SIZE} to ${BUFFER_SEGMENT_MAX_FILE_SIZE}" 44 | eval sed -i -e 's/\{BUFFER_SEGMENT_MAX_FILE_SIZE\}/${BUFFER_SEGMENT_MAX_FILE_SIZE}/' ${application_config_path} 45 | 46 | echo "replace {BUFFER_FILE_CLEAN_WHEN_RESTART} to ${BUFFER_FILE_CLEAN_WHEN_RESTART}" 47 | eval sed -i -e 's/\{BUFFER_FILE_CLEAN_WHEN_RESTART\}/${BUFFER_FILE_CLEAN_WHEN_RESTART}/' ${application_config_path} 48 | 49 | echo "replace {ES_SHARDS_NUMBER} to ${ES_SHARDS_NUMBER}" 50 | eval sed -i -e 's/\{ES_SHARDS_NUMBER\}/${ES_SHARDS_NUMBER}/' ${application_config_path} 51 | 52 | echo "replace {ES_REPLICAS_NUMBER} to ${ES_REPLICAS_NUMBER}" 53 | eval sed -i -e 's/\{ES_REPLICAS_NUMBER\}/${ES_REPLICAS_NUMBER}/' ${application_config_path} 54 | 55 | echo "replace {ES_BULK_ACTIONS} to ${ES_BULK_ACTIONS}" 56 | eval sed -i -e 's/\{ES_BULK_ACTIONS\}/${ES_BULK_ACTIONS}/' ${application_config_path} 57 | 58 | echo "replace {ES_BULK_SIZE} to ${ES_BULK_SIZE}" 59 | eval sed -i -e 's/\{ES_BULK_SIZE\}/${ES_BULK_SIZE}/' ${application_config_path} 60 | 61 | echo "replace {ES_FLUSH_INTERVAL} to ${ES_FLUSH_INTERVAL}" 62 | eval sed -i -e 's/\{ES_FLUSH_INTERVAL\}/${ES_FLUSH_INTERVAL}/' ${application_config_path} 63 | 64 | echo "replace {ES_CONCURRENT_REQUESTS} to ${ES_CONCURRENT_REQUESTS}" 65 | eval sed -i -e 's/\{ES_CONCURRENT_REQUESTS\}/${ES_CONCURRENT_REQUESTS}/' ${application_config_path} 66 | 67 | echo "replace {ES_HIGH_PERFORMANCE_MODE} to ${ES_HIGH_PERFORMANCE_MODE}" 68 | eval sed -i -e 's/\{ES_HIGH_PERFORMANCE_MODE\}/${ES_HIGH_PERFORMANCE_MODE}/' ${application_config_path} 69 | 70 | echo "replace {TRACE_DATA_TTL} to ${TRACE_DATA_TTL}" 71 | eval sed -i -e 's/\{TRACE_DATA_TTL\}/${TRACE_DATA_TTL}/' ${application_config_path} 72 | 73 | echo "replace {MINUTE_METRIC_DATA_TTL} to ${MINUTE_METRIC_DATA_TTL}" 74 | eval sed -i -e 's/\{MINUTE_METRIC_DATA_TTL\}/${MINUTE_METRIC_DATA_TTL}/' ${application_config_path} 75 | 76 | echo "replace {HOUR_METRIC_DATA_TTL} to ${HOUR_METRIC_DATA_TTL}" 77 | eval sed -i -e 's/\{HOUR_METRIC_DATA_TTL\}/${HOUR_METRIC_DATA_TTL}/' ${application_config_path} 78 | 79 | echo "replace {DAY_METRIC_DATA_TTL} to ${DAY_METRIC_DATA_TTL}" 80 | eval sed -i -e 's/\{DAY_METRIC_DATA_TTL\}/${DAY_METRIC_DATA_TTL}/' ${application_config_path} 81 | 82 | echo "replace {MONTH_METRIC_DATA_TTL} to ${MONTH_METRIC_DATA_TTL}" 83 | eval sed -i -e 's/\{MONTH_METRIC_DATA_TTL\}/${MONTH_METRIC_DATA_TTL}/' ${application_config_path} 84 | 85 | echo "replace {THRESHOLD_APPLICATION_APDEX} to ${THRESHOLD_APPLICATION_APDEX}" 86 | eval sed -i -e 's/\{THRESHOLD_APPLICATION_APDEX\}/${THRESHOLD_APPLICATION_APDEX}/' ${application_config_path} 87 | 88 | echo "replace {THRESHOLD_SERVICE_ERROR_RATE} to ${THRESHOLD_SERVICE_ERROR_RATE}" 89 | eval sed -i -e 's/\{THRESHOLD_SERVICE_ERROR_RATE\}/${THRESHOLD_SERVICE_ERROR_RATE}/' ${application_config_path} 90 | 91 | echo "replace {THRESHOLD_SERVICE_AVG_RESPONSE_TIME} to ${THRESHOLD_SERVICE_AVG_RESPONSE_TIME}" 92 | eval sed -i -e 's/\{THRESHOLD_SERVICE_AVG_RESPONSE_TIME\}/${THRESHOLD_SERVICE_AVG_RESPONSE_TIME}/' ${application_config_path} 93 | 94 | echo "replace {THRESHOLD_INSTANCE_ERROR_RATE} to ${THRESHOLD_INSTANCE_ERROR_RATE}" 95 | eval sed -i -e 's/\{THRESHOLD_INSTANCE_ERROR_RATE\}/${THRESHOLD_INSTANCE_ERROR_RATE}/' ${application_config_path} 96 | 97 | echo "replace {THRESHOLD_INSTANCE_AVG_RESPONSE_TIME} to ${THRESHOLD_INSTANCE_AVG_RESPONSE_TIME}" 98 | eval sed -i -e 's/\{THRESHOLD_INSTANCE_AVG_RESPONSE_TIME\}/${THRESHOLD_INSTANCE_AVG_RESPONSE_TIME}/' ${application_config_path} 99 | 100 | echo "replace {THRESHOLD_APPLICATION_ERROR_RATE} to ${THRESHOLD_APPLICATION_ERROR_RATE}" 101 | eval sed -i -e 's/\{THRESHOLD_APPLICATION_ERROR_RATE\}/${THRESHOLD_APPLICATION_ERROR_RATE}/' ${application_config_path} 102 | 103 | echo "replace {THRESHOLD_APPLICATION_AVG_RESPONSE_TIME} to ${THRESHOLD_APPLICATION_AVG_RESPONSE_TIME}" 104 | eval sed -i -e 's/\{THRESHOLD_APPLICATION_AVG_RESPONSE_TIME\}/${THRESHOLD_APPLICATION_AVG_RESPONSE_TIME}/' ${application_config_path} 105 | 106 | echo "replace {THERMODYNAMIC_RESPONSE_TIME} to ${THERMODYNAMIC_RESPONSE_TIME}" 107 | eval sed -i -e 's/\{THERMODYNAMIC_RESPONSE_TIME\}/${THERMODYNAMIC_RESPONSE_TIME}/' ${application_config_path} 108 | 109 | echo "replace {THERMODYNAMIC_COUNT_OF_RESPONSE_TIME} to ${THERMODYNAMIC_COUNT_OF_RESPONSE_TIME}" 110 | eval sed -i -e 's/\{THERMODYNAMIC_COUNT_OF_RESPONSE_TIME\}/${THERMODYNAMIC_COUNT_OF_RESPONSE_TIME}/' ${application_config_path} 111 | 112 | echo "replace {WORKER_CACHE_MAX_SIZE} to ${WORKER_CACHE_MAX_SIZE}" 113 | eval sed -i -e 's/\{WORKER_CACHE_MAX_SIZE\}/${WORKER_CACHE_MAX_SIZE}/' ${application_config_path} 114 | 115 | echo "replace {UI_SERVER_PORT} to ${UI_SERVER_PORT} for UI config." 116 | eval sed -i -e 's/\{UI_SERVER_PORT\}/${UI_SERVER_PORT}/' ${webapp_config_path} 117 | 118 | echo "replace {UI_RIBBON_LIST_SERVERS} to ${UI_RIBBON_LIST_SERVERS} for UI config." 119 | eval sed -i -e 's/\{UI_RIBBON_LIST_SERVERS\}/${UI_RIBBON_LIST_SERVERS}/' ${webapp_config_path} 120 | 121 | echo "replace {UI_ADMIN_PASSWORD} to ${UI_ADMIN_PASSWORD} for UI config." 122 | eval sed -i -e 's/\{UI_ADMIN_PASSWORD\}/${UI_ADMIN_PASSWORD}/' ${webapp_config_path} 123 | 124 | exec "$@" 125 | -------------------------------------------------------------------------------- /5.x/standalone/all-in-one/wait-for-it.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Use this script to test if a given TCP host/port are available 3 | 4 | cmdname=$(basename $0) 5 | 6 | echoerr() { if [[ $QUIET -ne 1 ]]; then echo "$@" 1>&2; fi } 7 | 8 | usage() 9 | { 10 | cat << USAGE >&2 11 | Usage: 12 | $cmdname host:port [-s] [-t timeout] [-- command args] 13 | -h HOST | --host=HOST Host or IP under test 14 | -p PORT | --port=PORT TCP port under test 15 | Alternatively, you specify the host and port as host:port 16 | -s | --strict Only execute subcommand if the test succeeds 17 | -q | --quiet Don't output any status messages 18 | -t TIMEOUT | --timeout=TIMEOUT 19 | Timeout in seconds, zero for no timeout 20 | -- COMMAND ARGS Execute command with args after the test finishes 21 | USAGE 22 | exit 1 23 | } 24 | 25 | wait_for() 26 | { 27 | if [[ $TIMEOUT -gt 0 ]]; then 28 | echoerr "$cmdname: waiting $TIMEOUT seconds for $HOST:$PORT" 29 | else 30 | echoerr "$cmdname: waiting for $HOST:$PORT without a timeout" 31 | fi 32 | start_ts=$(date +%s) 33 | while : 34 | do 35 | if [[ $ISBUSY -eq 1 ]]; then 36 | nc -z $HOST $PORT 37 | result=$? 38 | else 39 | (echo > /dev/tcp/$HOST/$PORT) >/dev/null 2>&1 40 | result=$? 41 | fi 42 | if [[ $result -eq 0 ]]; then 43 | end_ts=$(date +%s) 44 | echoerr "$cmdname: $HOST:$PORT is available after $((end_ts - start_ts)) seconds" 45 | break 46 | fi 47 | sleep 1 48 | done 49 | return $result 50 | } 51 | 52 | wait_for_wrapper() 53 | { 54 | # In order to support SIGINT during timeout: http://unix.stackexchange.com/a/57692 55 | if [[ $QUIET -eq 1 ]]; then 56 | timeout $BUSYTIMEFLAG $TIMEOUT $0 --quiet --child --host=$HOST --port=$PORT --timeout=$TIMEOUT & 57 | else 58 | timeout $BUSYTIMEFLAG $TIMEOUT $0 --child --host=$HOST --port=$PORT --timeout=$TIMEOUT & 59 | fi 60 | PID=$! 61 | trap "kill -INT -$PID" INT 62 | wait $PID 63 | RESULT=$? 64 | if [[ $RESULT -ne 0 ]]; then 65 | echoerr "$cmdname: timeout occurred after waiting $TIMEOUT seconds for $HOST:$PORT" 66 | fi 67 | return $RESULT 68 | } 69 | 70 | # process arguments 71 | while [[ $# -gt 0 ]] 72 | do 73 | case "$1" in 74 | *:* ) 75 | hostport=(${1//:/ }) 76 | HOST=${hostport[0]} 77 | PORT=${hostport[1]} 78 | shift 1 79 | ;; 80 | --child) 81 | CHILD=1 82 | shift 1 83 | ;; 84 | -q | --quiet) 85 | QUIET=1 86 | shift 1 87 | ;; 88 | -s | --strict) 89 | STRICT=1 90 | shift 1 91 | ;; 92 | -h) 93 | HOST="$2" 94 | if [[ $HOST == "" ]]; then break; fi 95 | shift 2 96 | ;; 97 | --host=*) 98 | HOST="${1#*=}" 99 | shift 1 100 | ;; 101 | -p) 102 | PORT="$2" 103 | if [[ $PORT == "" ]]; then break; fi 104 | shift 2 105 | ;; 106 | --port=*) 107 | PORT="${1#*=}" 108 | shift 1 109 | ;; 110 | -t) 111 | TIMEOUT="$2" 112 | if [[ $TIMEOUT == "" ]]; then break; fi 113 | shift 2 114 | ;; 115 | --timeout=*) 116 | TIMEOUT="${1#*=}" 117 | shift 1 118 | ;; 119 | --) 120 | shift 121 | CLI=("$@") 122 | break 123 | ;; 124 | --help) 125 | usage 126 | ;; 127 | *) 128 | echoerr "Unknown argument: $1" 129 | usage 130 | ;; 131 | esac 132 | done 133 | 134 | if [[ "$HOST" == "" || "$PORT" == "" ]]; then 135 | echoerr "Error: you need to provide a host and port to test." 136 | usage 137 | fi 138 | 139 | TIMEOUT=${TIMEOUT:-15} 140 | STRICT=${STRICT:-0} 141 | CHILD=${CHILD:-0} 142 | QUIET=${QUIET:-0} 143 | 144 | # check to see if timeout is from busybox? 145 | # check to see if timeout is from busybox? 146 | TIMEOUT_PATH=$(realpath $(which timeout)) 147 | if [[ $TIMEOUT_PATH =~ "busybox" ]]; then 148 | ISBUSY=1 149 | BUSYTIMEFLAG="-t" 150 | else 151 | ISBUSY=0 152 | BUSYTIMEFLAG="" 153 | fi 154 | 155 | if [[ $CHILD -gt 0 ]]; then 156 | wait_for 157 | RESULT=$? 158 | exit $RESULT 159 | else 160 | if [[ $TIMEOUT -gt 0 ]]; then 161 | wait_for_wrapper 162 | RESULT=$? 163 | else 164 | wait_for 165 | RESULT=$? 166 | fi 167 | fi 168 | 169 | if [[ $CLI != "" ]]; then 170 | if [[ $RESULT -ne 0 && $STRICT -eq 1 ]]; then 171 | echoerr "$cmdname: strict mode, refusing to execute subprocess" 172 | exit $RESULT 173 | fi 174 | exec "${CLI[@]}" 175 | else 176 | exit $RESULT 177 | fi -------------------------------------------------------------------------------- /5.x/standalone/all-in-one/webapp.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | server: 18 | port: {UI_SERVER_PORT} 19 | 20 | collector: 21 | path: /graphql 22 | ribbon: 23 | ReadTimeout: 10000 24 | listOfServers: {UI_RIBBON_LIST_SERVERS} 25 | 26 | security: 27 | user: 28 | admin: 29 | password: {UI_ADMIN_PASSWORD} 30 | -------------------------------------------------------------------------------- /6.x/README.md: -------------------------------------------------------------------------------- 1 | # Skywalking 6.x 镜像 2 | 3 | [![Docker Build Status](https://img.shields.io/docker/build/wutang/skywalking-docker.svg)](https://hub.docker.com/r/wutang/skywalking-oap/) [![Docker Automated build](https://img.shields.io/docker/automated/wutang/skywalking-oap.svg)](https://hub.docker.com/r/wutang/skywalking-oap/builds/) 4 | 5 | ## 运行镜像(Run): 6 | 7 | ``` 8 | docker-compose up [-d] 9 | ``` 10 | 11 | ## 目录结构(Structure) 12 | 13 | - **image-build/oap** : Skywalking-OAP-Server镜像构建。 14 | 15 | - **image-build/ui**: Skywalking-UI 镜像构建 16 | 17 | - **config**: 关于*Skywalking-OAP-Server*的配置文件。 18 | 19 | - **docker-compose/docker-compose.yml**: 快速启动。 20 | 21 | - **TODO: kubernetes**: kubernetes快速启动。 22 | 23 | ## 手动构建镜像 24 | 25 | - Skywalking-OAP镜像构建 26 | 27 | ```bash 28 | cd image-build/oap 29 | 30 | docker build -t skywalking-oap . 31 | 32 | ``` 33 | 34 | - Skywalking-UI镜像构建 35 | 36 | ```bash 37 | cd image-build/ui 38 | 39 | docker build -t skywalking-ui . 40 | 41 | ``` 42 | 43 | ## 与elasticsearch-shanghai-zone镜像配合使用请参考 44 | 45 | - [wutang/elasticsearch-shanghai-zone:6.3.2](https://github.com/JaredTan95/skywalking-docker/blob/master/elasticsearch-6.3.2-Zone-Asia-SH/README.md) 46 | - [quick start](https://github.com/JaredTan95/skywalking-docker/blob/master/6.x/quick-start/README.md) 47 | -------------------------------------------------------------------------------- /6.x/config/alarm-settings.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # Sample alarm rules. 18 | rules: 19 | # Rule unique name, must be ended with `_rule`. 20 | service_resp_time_rule: 21 | indicator-name: service_resp_time 22 | op: ">" 23 | threshold: 1000 24 | period: 10 25 | count: 3 26 | silence-period: 5 27 | message: Response time of service {name} is more than 1000ms in 3 minutes of last 10 minutes. 28 | service_sla_rule: 29 | # Indicator value need to be long, double or int 30 | indicator-name: service_sla 31 | op: "<" 32 | threshold: 8000 33 | # The length of time to evaluate the metric 34 | period: 10 35 | # How many times after the metric match the condition, will trigger alarm 36 | count: 2 37 | # How many times of checks, the alarm keeps silence after alarm triggered, default as same as period. 38 | silence-period: 3 39 | message: Successful rate of service {name} is lower than 80% in 2 minutes of last 10 minutes 40 | service_p90_sla_rule: 41 | # Indicator value need to be long, double or int 42 | indicator-name: service_p90 43 | op: ">" 44 | threshold: 1000 45 | period: 10 46 | count: 3 47 | silence-period: 5 48 | message: 90% response time of service {name} is more than 1000ms in 3 minutes of last 10 minutes 49 | service_instance_resp_time_rule: 50 | indicator-name: service_instance_resp_time 51 | op: ">" 52 | threshold: 1000 53 | period: 10 54 | count: 2 55 | silence-period: 5 56 | message: Response time of service instance {name} is more than 1000ms in 2 minutes of last 10 minutes 57 | # Active endpoint related metric alarm will cost more memory than service and service instance metric alarm. 58 | # Because the number of endpoint is much more than service and instance. 59 | # 60 | # endpoint_avg_rule: 61 | # indicator-name: endpoint_avg 62 | # op: ">" 63 | # threshold: 1000 64 | # period: 10 65 | # count: 2 66 | # silence-period: 5 67 | # message: Response time of endpoint {name} is more than 1000ms in 2 minutes of last 10 minutes 68 | 69 | webhooks: 70 | # - http://127.0.0.1/notify/ 71 | # - http://127.0.0.1/go-wechat/ 72 | 73 | -------------------------------------------------------------------------------- /6.x/config/application.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | cluster: 18 | standalone: 19 | # Please check your ZooKeeper is 3.5+, However, it is also compatible with ZooKeeper 3.4.x. Replace the ZooKeeper 3.5+ 20 | # library the oap-libs folder with your ZooKeeper 3.4.x library. 21 | # zookeeper: 22 | # nameSpace: ${SW_NAMESPACE:""} 23 | # hostPort: ${SW_CLUSTER_ZK_HOST_PORT:localhost:2181} 24 | # #Retry Policy 25 | # baseSleepTimeMs: ${SW_CLUSTER_ZK_SLEEP_TIME:1000} # initial amount of time to wait between retries 26 | # maxRetries: ${SW_CLUSTER_ZK_MAX_RETRIES:3} # max number of times to retry 27 | # kubernetes: 28 | # watchTimeoutSeconds: ${SW_CLUSTER_K8S_WATCH_TIMEOUT:60} 29 | # namespace: ${SW_CLUSTER_K8S_NAMESPACE:default} 30 | # labelSelector: ${SW_CLUSTER_K8S_LABEL:app=collector,release=skywalking} 31 | # uidEnvName: ${SW_CLUSTER_K8S_UID:SKYWALKING_COLLECTOR_UID} 32 | # consul: 33 | # serviceName: ${SW_SERVICE_NAME:"SkyWalking_OAP_Cluster"} 34 | # Consul cluster nodes, example: 10.0.0.1:8500,10.0.0.2:8500,10.0.0.3:8500 35 | # hostPort: ${SW_CLUSTER_CONSUL_HOST_PORT:localhost:8500} 36 | core: 37 | default: 38 | # Mixed: Receive agent data, Level 1 aggregate, Level 2 aggregate 39 | # Receiver: Receive agent data, Level 1 aggregate 40 | # Aggregator: Level 2 aggregate 41 | role: ${SW_CORE_ROLE:Mixed} # Mixed/Receiver/Aggregator 42 | restHost: ${SW_CORE_REST_HOST:0.0.0.0} 43 | restPort: ${SW_CORE_REST_PORT:12800} 44 | restContextPath: ${SW_CORE_REST_CONTEXT_PATH:/} 45 | gRPCHost: ${SW_CORE_GRPC_HOST:0.0.0.0} 46 | gRPCPort: ${SW_CORE_GRPC_PORT:11800} 47 | downsampling: 48 | - Hour 49 | - Day 50 | - Month 51 | # Set a timeout on metric data. After the timeout has expired, the metric data will automatically be deleted. 52 | recordDataTTL: ${SW_CORE_RECORD_DATA_TTL:90} # Unit is minute 53 | minuteMetricsDataTTL: ${SW_CORE_MINUTE_METRIC_DATA_TTL:90} # Unit is minute 54 | hourMetricsDataTTL: ${SW_CORE_HOUR_METRIC_DATA_TTL:36} # Unit is hour 55 | dayMetricsDataTTL: ${SW_CORE_DAY_METRIC_DATA_TTL:45} # Unit is day 56 | monthMetricsDataTTL: ${SW_CORE_MONTH_METRIC_DATA_TTL:18} # Unit is month 57 | storage: 58 | elasticsearch: 59 | nameSpace: ${SW_NAMESPACE:""} 60 | clusterNodes: ${SW_STORAGE_ES_CLUSTER_NODES:localhost:9200} 61 | user: ${SW_ES_USER:""} 62 | password: ${SW_ES_PASSWORD:""} 63 | indexShardsNumber: ${SW_STORAGE_ES_INDEX_SHARDS_NUMBER:2} 64 | indexReplicasNumber: ${SW_STORAGE_ES_INDEX_REPLICAS_NUMBER:0} 65 | # Batch process setting, refer to https://www.elastic.co/guide/en/elasticsearch/client/java-api/5.5/java-docs-bulk-processor.html 66 | bulkActions: ${SW_STORAGE_ES_BULK_ACTIONS:2000} # Execute the bulk every 2000 requests 67 | bulkSize: ${SW_STORAGE_ES_BULK_SIZE:20} # flush the bulk every 20mb 68 | flushInterval: ${SW_STORAGE_ES_FLUSH_INTERVAL:10} # flush the bulk every 10 seconds whatever the number of requests 69 | concurrentRequests: ${SW_STORAGE_ES_CONCURRENT_REQUESTS:2} # the number of concurrent requests 70 | metadataQueryMaxSize: ${SW_STORAGE_ES_QUERY_MAX_SIZE:5000} 71 | segmentQueryMaxSize: ${SW_STORAGE_ES_QUERY_SEGMENT_SIZE:200} 72 | # h2: 73 | # driver: ${SW_STORAGE_H2_DRIVER:org.h2.jdbcx.JdbcDataSource} 74 | # url: ${SW_STORAGE_H2_URL:jdbc:h2:mem:skywalking-oap-db} 75 | # user: ${SW_STORAGE_H2_USER:sa} 76 | # metadataQueryMaxSize: ${SW_STORAGE_H2_QUERY_MAX_SIZE:5000} 77 | # mysql: 78 | # metadataQueryMaxSize: ${SW_STORAGE_H2_QUERY_MAX_SIZE:5000} 79 | receiver-sharing-server: 80 | default: 81 | receiver-register: 82 | default: 83 | receiver-trace: 84 | default: 85 | bufferPath: ${SW_RECEIVER_BUFFER_PATH:../trace-buffer/} # Path to trace buffer files, suggest to use absolute path 86 | bufferOffsetMaxFileSize: ${SW_RECEIVER_BUFFER_OFFSET_MAX_FILE_SIZE:100} # Unit is MB 87 | bufferDataMaxFileSize: ${SW_RECEIVER_BUFFER_DATA_MAX_FILE_SIZE:500} # Unit is MB 88 | bufferFileCleanWhenRestart: ${SW_RECEIVER_BUFFER_FILE_CLEAN_WHEN_RESTART:false} 89 | sampleRate: ${SW_TRACE_SAMPLE_RATE:10000} # The sample rate precision is 1/10000. 10000 means 100% sample in default. 90 | slowDBAccessThreshold: ${SW_SLOW_DB_THRESHOLD:default:200,mongodb:100} # The slow database access thresholds. Unit ms. 91 | receiver-jvm: 92 | default: 93 | receiver-clr: 94 | default: 95 | service-mesh: 96 | default: 97 | bufferPath: ${SW_SERVICE_MESH_BUFFER_PATH:../mesh-buffer/} # Path to trace buffer files, suggest to use absolute path 98 | bufferOffsetMaxFileSize: ${SW_SERVICE_MESH_OFFSET_MAX_FILE_SIZE:100} # Unit is MB 99 | bufferDataMaxFileSize: ${SW_SERVICE_MESH_BUFFER_DATA_MAX_FILE_SIZE:500} # Unit is MB 100 | bufferFileCleanWhenRestart: ${SW_SERVICE_MESH_BUFFER_FILE_CLEAN_WHEN_RESTART:false} 101 | istio-telemetry: 102 | default: 103 | envoy-metric: 104 | default: 105 | #receiver_zipkin: 106 | # default: 107 | # host: ${SW_RECEIVER_ZIPKIN_HOST:0.0.0.0} 108 | # port: ${SW_RECEIVER_ZIPKIN_PORT:9411} 109 | # contextPath: ${SW_RECEIVER_ZIPKIN_CONTEXT_PATH:/} 110 | #receiver_jaeger: 111 | # default: 112 | # gRPCHost: ${SW_RECEIVER_JAEGER_HOST:0.0.0.0} 113 | # gRPCPort: ${SW_RECEIVER_JAEGER_PORT:14250} 114 | query: 115 | graphql: 116 | path: ${SW_QUERY_GRAPHQL_PATH:/graphql} 117 | alarm: 118 | default: 119 | telemetry: 120 | prometheus: 121 | #exporter: 122 | # grpc: 123 | # targetHost: 127.0.0.1 124 | # targetPort: 9870 125 | -------------------------------------------------------------------------------- /6.x/config/component-libraries.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # Define all component libraries' names and IDs, used in monitored application. 18 | # This is a bothway mapping, agent or SDK could use the value(ID) to represent the component name in uplink data. 19 | # 20 | # ###### 21 | # id 22 | # ###### 23 | # We highly recommend DO NOT change the IDs in these file, just append new one, and make sure the ID unique. 24 | # Any replacement will cause visualization and aggregation error. 25 | # 26 | # All IDs in this files are reserved, even some IDs removed by some reasons, those IDs will be abandoned. 27 | # 28 | # ###### 29 | # languages 30 | # ###### 31 | # Languages declare which languages are using this component. Multi languages should be separated by `,` 32 | 33 | Tomcat: 34 | id: 1 35 | languages: Java 36 | HttpClient: 37 | id: 2 38 | languages: Java,C#,Node.js 39 | Dubbo: 40 | id: 3 41 | languages: Java 42 | H2: 43 | id: 4 44 | languages: Java 45 | Mysql: 46 | id: 5 47 | languages: Java,C#,Node.js 48 | ORACLE: 49 | id: 6 50 | languages: Java 51 | Redis: 52 | id: 7 53 | languages: Java,C#,Node.js 54 | Motan: 55 | id: 8 56 | languages: Java 57 | MongoDB: 58 | id: 9 59 | languages: Java,C#,Node.js 60 | Resin: 61 | id: 10 62 | languages: Java 63 | Feign: 64 | id: 11 65 | languages: Java 66 | OKHttp: 67 | id: 12 68 | languages: Java 69 | SpringRestTemplate: 70 | id: 13 71 | languages: Java 72 | SpringMVC: 73 | id: 14 74 | languages: Java 75 | Struts2: 76 | id: 15 77 | languages: Java 78 | NutzMVC: 79 | id: 16 80 | languages: Java 81 | NutzHttp: 82 | id: 17 83 | languages: Java 84 | JettyClient: 85 | id: 18 86 | languages: Java 87 | JettyServer: 88 | id: 19 89 | languages: Java 90 | Memcached: 91 | id: 20 92 | languages: Java 93 | ShardingJDBC: 94 | id: 21 95 | languages: Java 96 | PostgreSQL: 97 | id: 22 98 | languages: Java,C#,Node.js 99 | GRPC: 100 | id: 23 101 | languages: Java 102 | ElasticJob: 103 | id: 24 104 | languages: Java 105 | RocketMQ: 106 | id: 25 107 | languages: Java 108 | httpasyncclient: 109 | id: 26 110 | languages: Java 111 | Kafka: 112 | id: 27 113 | languages: Java 114 | ServiceComb: 115 | id: 28 116 | languages: Java 117 | Hystrix: 118 | id: 29 119 | languages: Java 120 | Jedis: 121 | id: 30 122 | languages: Java 123 | SQLite: 124 | id: 31 125 | languages: Java,C# 126 | h2-jdbc-driver: 127 | id: 32 128 | languages: Java 129 | mysql-connector-java: 130 | id: 33 131 | languages: Java 132 | ojdbc: 133 | id: 34 134 | languages: Java 135 | Spymemcached: 136 | id: 35 137 | languages: Java 138 | Xmemcached: 139 | id: 36 140 | languages: Java 141 | postgresql-jdbc-driver: 142 | id: 37 143 | languages: Java 144 | rocketMQ-producer: 145 | id: 38 146 | languages: Java 147 | rocketMQ-consumer: 148 | id: 39 149 | languages: Java 150 | kafka-producer: 151 | id: 40 152 | languages: Java 153 | kafka-consumer: 154 | id: 41 155 | languages: Java 156 | mongodb-driver: 157 | id: 42 158 | languages: Java 159 | SOFARPC: 160 | id: 43 161 | languages: Java 162 | ActiveMQ: 163 | id: 44 164 | languages: Java 165 | activemq-producer: 166 | id: 45 167 | languages: Java 168 | activemq-consumer: 169 | id: 46 170 | languages: Java 171 | Elasticsearch: 172 | id: 47 173 | languages: Java 174 | transport-client: 175 | id: 48 176 | languages: Java 177 | http: 178 | id: 49 179 | languages: Java,C#,Node.js 180 | rpc: 181 | id: 50 182 | languages: Java,C#,Node.js 183 | RabbitMQ: 184 | id: 51 185 | languages: Java 186 | rabbitmq-producer: 187 | id: 52 188 | languages: Java 189 | rabbitmq-consumer: 190 | id: 53 191 | languages: Java 192 | Canal: 193 | id: 54 194 | languages: Java 195 | Gson: 196 | id: 55 197 | languages: Java 198 | Redisson: 199 | id: 56 200 | languages: Java 201 | Lettuce: 202 | id: 57 203 | languages: Java 204 | Zookeeper: 205 | id: 58 206 | languages: Java 207 | Vertx: 208 | id: 59 209 | languages: Java 210 | 211 | # .NET/.NET Core components 212 | # [3000, 4000) for C#/.NET only 213 | AspNetCore: 214 | id: 3001 215 | languages: C# 216 | EntityFrameworkCore: 217 | id: 3002 218 | languages: C# 219 | SqlClient: 220 | id: 3003 221 | languages: C# 222 | CAP: 223 | id: 3004 224 | languages: C# 225 | StackExchange.Redis: 226 | id: 3005 227 | languages: C# 228 | SqlServer: 229 | id: 3006 230 | languages: C# 231 | Npgsql: 232 | id: 3007 233 | languages: C# 234 | MySqlConnector: 235 | id: 3008 236 | languages: C# 237 | EntityFrameworkCore.InMemory: 238 | id: 3009 239 | languages: C# 240 | EntityFrameworkCore.SqlServer: 241 | id: 3010 242 | languages: C# 243 | EntityFrameworkCore.Sqlite: 244 | id: 3011 245 | languages: C# 246 | Pomelo.EntityFrameworkCore.MySql: 247 | id: 3012 248 | languages: C# 249 | Npgsql.EntityFrameworkCore.PostgreSQL: 250 | id: 3013 251 | languages: C# 252 | InMemoryDatabase: 253 | id: 3014 254 | languages: C# 255 | AspNet: 256 | id: 3015 257 | languages: C# 258 | SmartSql: 259 | id: 3016 260 | languages: C# 261 | 262 | # NoeJS components 263 | # [4000, 5000) for Node.js agent 264 | HttpServer: 265 | id: 4001 266 | languages: Node.js 267 | express: 268 | id: 4002 269 | languages: Node.js 270 | Egg: 271 | id: 4003 272 | languages: Node.js 273 | Koa: 274 | id: 4004 275 | languages: Node.js 276 | 277 | # Component Server mapping defines the server display names of some components 278 | # e.g. 279 | # Jedis is a client library in Java for Redis server 280 | Component-Server-Mappings: 281 | mongodb-driver: MongoDB 282 | rocketMQ-producer: RocketMQ 283 | rocketMQ-consumer: RocketMQ 284 | kafka-producer: Kafka 285 | kafka-consumer: Kafka 286 | activemq-producer: ActiveMQ 287 | activemq-consumer: ActiveMQ 288 | rabbitmq-producer: RabbitMQ 289 | rabbitmq-consumer: RabbitMQ 290 | postgresql-jdbc-driver: PostgreSQL 291 | Xmemcached: Memcached 292 | Spymemcached: Memcached 293 | h2-jdbc-driver: H2 294 | mysql-connector-java: Mysql 295 | Jedis: Redis 296 | StackExchange.Redis: Redis 297 | Redisson: Redis 298 | Lettuce: Redis 299 | Zookeeper: Zookeeper 300 | SqlClient: SqlServer 301 | Npgsql: PostgreSQL 302 | MySqlConnector: Mysql 303 | EntityFrameworkCore.InMemory: InMemoryDatabase 304 | EntityFrameworkCore.SqlServer: SqlServer 305 | EntityFrameworkCore.Sqlite: SQLite 306 | Pomelo.EntityFrameworkCore.MySql: Mysql 307 | Npgsql.EntityFrameworkCore.PostgreSQL: PostgreSQL 308 | transport-client: Elasticsearch 309 | -------------------------------------------------------------------------------- /6.x/config/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /6.x/docker-compose/docker-compose.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | version: '3.3' 18 | services: 19 | elasticsearch: 20 | image: wutang/elasticsearch-shanghai-zone:6.3.2 21 | container_name: elasticsearch 22 | restart: always 23 | ports: 24 | - 9200:9200 25 | - 9300:9300 26 | environment: 27 | discovery.type: single-node 28 | oap: 29 | image: wutang/skywalking-oap:6.1.0 30 | container_name: oap 31 | depends_on: 32 | - elasticsearch 33 | links: 34 | - elasticsearch 35 | restart: always 36 | ports: 37 | - 11800:11800 38 | - 12800:12800 39 | environment: 40 | SW_STORAGE_ES_CLUSTER_NODES: elasticsearch:9200 41 | volumes: 42 | - ../config:/apache-skywalking-apm-bin/config:ro 43 | ui: 44 | image: wutang/skywalking-ui:6.1.0 45 | container_name: ui 46 | depends_on: 47 | - oap 48 | links: 49 | - oap 50 | restart: always 51 | ports: 52 | - 8080:8080 53 | environment: 54 | collector.ribbon.listOfServers: oap:12800 55 | -------------------------------------------------------------------------------- /6.x/image-build/oap/Dockerfile: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | FROM openjdk:8-jre-alpine 18 | 19 | LABEL maintainer="jian.tan@daocloud.io" 20 | 21 | ENV SKYWALKING_VERSION=6.1.0 \ 22 | TZ=Asia/Shanghai \ 23 | PACKAGE_NAME=apache-skywalking-apm \ 24 | DIST_NAME=apache-skywalking-apm-bin \ 25 | JAVA_OPTS=" -Xms512M -Xmx1024M" 26 | 27 | # after ADD unzip does not work? 28 | ADD http://mirrors.tuna.tsinghua.edu.cn/apache/skywalking/${SKYWALKING_VERSION}/${PACKAGE_NAME}-${SKYWALKING_VERSION}.tar.gz / 29 | 30 | # Install required packages 31 | RUN apk add --no-cache \ 32 | bash 33 | 34 | # logs locations in /$DIST_NAME/logs folder. 35 | RUN set -ex; \ 36 | ln -sf /usr/share/zoneinfo/$TZ /etc/localtime; \ 37 | echo $TZ > /etc/timezone; \ 38 | tar -zxvf /${PACKAGE_NAME}-${SKYWALKING_VERSION}.tar.gz; \ 39 | rm -rf "${PACKAGE_NAME}-${SKYWALKING_VERSION}.tar.gz"; rm -rf "$DIST_NAME/config/log4j2.xml"; \ 40 | rm -rf "$DIST_NAME/bin"; rm -rf "$DIST_NAME/webapp"; rm -rf "$DIST_NAME/agent"; 41 | 42 | WORKDIR $DIST_NAME 43 | 44 | COPY log4j2.xml config/ 45 | COPY docker-entrypoint.sh . 46 | 47 | EXPOSE 12800 11800 48 | 49 | ENTRYPOINT ["sh", "docker-entrypoint.sh"] 50 | -------------------------------------------------------------------------------- /6.x/image-build/oap/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | #!/bin/bash 18 | 19 | set -ex 20 | 21 | CLASSPATH="config:$CLASSPATH" 22 | for i in oap-libs/*.jar 23 | do 24 | CLASSPATH="$i:$CLASSPATH" 25 | done 26 | 27 | exec java ${JAVA_OPTS} -classpath $CLASSPATH \ 28 | org.apache.skywalking.oap.server.starter.OAPServerStartUp "$@" -------------------------------------------------------------------------------- /6.x/image-build/oap/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /6.x/image-build/ui/Dockerfile: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | FROM openjdk:8-jre-alpine 18 | 19 | LABEL maintainer="jian.tan@daocloud.io" 20 | 21 | ENV SKYWALKING_VERSION=6.1.0 \ 22 | TZ=Asia/Shanghai \ 23 | PACKAGE_NAME=apache-skywalking-apm \ 24 | DIST_NAME=apache-skywalking-apm-bin \ 25 | JAVA_OPTS=" -Xms512M -Xmx1024M" 26 | 27 | # after ADD unzip does not work? 28 | ADD http://mirrors.tuna.tsinghua.edu.cn/apache/skywalking/${SKYWALKING_VERSION}/${PACKAGE_NAME}-${SKYWALKING_VERSION}.tar.gz / 29 | 30 | # Install required packages 31 | RUN apk add --no-cache \ 32 | bash 33 | 34 | # logs locations in /$DIST_NAME/logs folder. 35 | RUN set -ex; \ 36 | ln -sf /usr/share/zoneinfo/$TZ /etc/localtime; \ 37 | echo $TZ > /etc/timezone; \ 38 | tar -zxvf /${PACKAGE_NAME}-${SKYWALKING_VERSION}.tar.gz; \ 39 | rm -rf "${PACKAGE_NAME}-${SKYWALKING_VERSION}.tar.gz"; rm -rf "$DIST_NAME/config"; \ 40 | rm -rf "$DIST_NAME/bin"; rm -rf "$DIST_NAME/oap-libs"; rm -rf "$DIST_NAME/agent"; 41 | 42 | WORKDIR $DIST_NAME 43 | 44 | COPY docker-entrypoint.sh . 45 | COPY logback.xml webapp/ 46 | 47 | EXPOSE 12800 11800 48 | 49 | ENTRYPOINT ["sh", "docker-entrypoint.sh"] -------------------------------------------------------------------------------- /6.x/image-build/ui/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | #!/bin/bash 18 | 19 | set -ex 20 | 21 | exec java -jar webapp/skywalking-webapp.jar --logging.config=webapp/logback.xml "$@" -------------------------------------------------------------------------------- /6.x/image-build/ui/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /6.x/image-build/ui/webapp.yml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | server: 18 | port: 8080 19 | 20 | zuul: 21 | ignoredServices: '*' 22 | routes: 23 | api: 24 | path: /api/** 25 | serviceId: collector 26 | 27 | collector: 28 | path: /graphql 29 | ribbon: 30 | # Point to all backend's restHost:restPort, split by , 31 | listOfServers: 127.0.0.1:12800 32 | 33 | security: 34 | user: 35 | admin: 36 | password: admin -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Skywalking-Docker 2 | 3 | **⚠️NOTE**: Apache Skywalking开始提供Docker镜像,此仓库即将不再更新,更多请参考 [apache/skywalking-docker](https://github.com/apache/skywalking-docker)。关于 Apache Skywalking 部署请参考:[apache/skywalking-kubernetes](https://github.com/apache/skywalking-kubernetes) 4 | 5 | 通过[Apache-skywalking](https://github.com/apache/incubator-skywalking/) 6 | 官方发布的[压缩包](https://skywalking.incubator.apache.org/)构建Docker镜像。并提供容器部署Skywalking的方式。 7 | 8 | [![GitHub stars](https://img.shields.io/github/stars/JaredTan95/skywalking-docker.svg?style=for-the-badge&label=Stars&logo=github)](https://github.com/JaredTan95/skywalking-docker) [![Docker Build Status](https://img.shields.io/docker/build/wutang/skywalking-docker.svg)](https://hub.docker.com/r/wutang/skywalking-docker/) [![Docker Automated build](https://img.shields.io/docker/automated/wutang/skywalking-docker.svg)](https://hub.docker.com/r/wutang/skywalking-docker/builds/) 9 | 10 | ## Quick Start(快速开始) 11 | 12 | ```bash 13 | 14 | git clone https://github.com/JaredTan95/skywalking-docker.git 15 | cd skywalking-docker/6.x/docker-compose/ 16 | docker-compose up 17 | 18 | ``` 19 | 20 | 21 | [![asciicast](https://asciinema.org/a/rwZPy0SROmI1we0Na5Q4W6dRG.svg)](https://asciinema.org/a/rwZPy0SROmI1we0Na5Q4W6dRG?autoplay=1) 22 | 23 | 24 | ## Docker Hub 25 | 26 | | Skywalking 6.x(推荐) | Skywalking 5.x| 27 | | :------| ------: | 28 | | [wutang/skywalking-oap:6.1.0](https://hub.docker.com/r/wutang/skywalking-oap/) [![Docker Pulls](https://img.shields.io/docker/pulls/wutang/skywalking-oap.svg)](https://hub.docker.com/r/wutang/skywalking-oap/)| [wutang/skywalking-docker](https://hub.docker.com/r/wutang/skywalking-docker/) [![Docker Pulls](https://img.shields.io/docker/pulls/wutang/skywalking-docker.svg)](https://hub.docker.com/r/wutang/skywalking-docker/) | 29 | | [wutang/skywalking-ui:6.1.0](https://hub.docker.com/r/wutang/skywalking-ui/) [![Docker Pulls](https://img.shields.io/docker/pulls/wutang/skywalking-ui.svg)](https://hub.docker.com/r/wutang/skywalking-ui/) | [wutang/skywalking-collector](https://hub.docker.com/r/wutang/skywalking-collector/) [![Docker Pulls](https://img.shields.io/docker/pulls/wutang/skywalking-collector.svg)](https://hub.docker.com/r/wutang/skywalking-collector/)| 30 | |[wutang/elasticsearch-shanghai-zone:6.3.2](https://hub.docker.com/r/wutang/elasticsearch-shanghai-zone/) [![Docker Pulls](https://img.shields.io/docker/pulls/wutang/elasticsearch-shanghai-zone.svg)](https://hub.docker.com/r/wutang/elasticsearch-shanghai-zone/)|[wutang/elasticsearch-shanghai-zone:5.6.10](https://hub.docker.com/r/wutang/elasticsearch-shanghai-zone/) [![Docker Pulls](https://img.shields.io/docker/pulls/wutang/elasticsearch-shanghai-zone.svg)](https://hub.docker.com/r/wutang/elasticsearch-shanghai-zone/)| 31 | 32 | ## 前置条件(Precondition) 33 | 34 | 了解Docker或者使用过Docker、Kubernetes相关命令。 35 | 36 | ## 目录结构(Structure) 37 | 38 | - `6.x`目录:官方仓库`6.x`分支容器部署镜像源文件: 39 | 40 | - `elasticsearch-Zone-Asia-SH`目录:同步上海时区的Elasticsearch镜像源文件: 41 | 42 | - 用于自动构建[wutang/elasticsearch-shanghai-zone](https://hub.docker.com/r/wutang/elasticsearch-shanghai-zone/) Docker镜像。 43 | - 其中`5.6.10`对应ES 5.6.10 44 | - `6.3.2`对应ES 6.3.2版本。 45 | 46 | - `5.x`目录:官方仓库`5.x`分支容器部署镜像源文件: 47 | 48 | - `standalone/all-in-one`:用于自动构建[wutang/skywalking-docker](https://hub.docker.com/r/wutang/skywalking-docker/) Docker镜像。 49 | - `standalone/all-in-one-xpack`:用于构建支持Elastic xpack账号密码登录的skywalking,常见阿里云ES,代码源由[liguobao/incubator-skywalking](https://github.com/liguobao/incubator-skywalking)基于incubator-skywalking 官方源码修改而来。 50 | - `standalone/collector`:用于自动构建[wutang/skywalking-collector](https://hub.docker.com/r/wutang/skywalking-collector/) Docker镜像,该镜像用于部署单机Skywalking Collector。 51 | - `cluster/collector`:用于自动构建[wutang/skywalking-collector](https://hub.docker.com/r/wutang/skywalking-collector/):5.x-zk 镜像,该镜像用于通过Zookeeper实现集群部署Skywalking Collector。 52 | - `quick-start`:通过Docker stack或者Docker Compose快速启动Skywalking,其中包含启动[wutang/elasticsearch-shanghai-zone](https://hub.docker.com/r/wutang/elasticsearch-shanghai-zone/) 和[wutang/skywalking-docker](https://hub.docker.com/r/wutang/skywalking-docker/)两个容器。 53 | 54 | ## 如何使用(Usage) 55 | 56 | ### 方式一、直接拉取镜像运行(Pull Image) 57 | 58 | 参考[6.x/docker-compose/docker-compose.yml](6.x/docker-compose/docker-compose.yml) 59 | 60 | ### 方式二、通过源码构建镜像(Build Image) 61 | 62 | 参考[6.x/README.md](6.x/README.md) 63 | -------------------------------------------------------------------------------- /elasticsearch-Zone-Asia-SH/5.6.10/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM docker.elastic.co/elasticsearch/elasticsearch:5.6.10 2 | 3 | LABEL maintainer="jian.tan@daocloud.io" 4 | 5 | USER root 6 | 7 | RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \ 8 | && echo "Asia/Shanghai" > /etc/timezone \ 9 | && chown elasticsearch:elasticsearch config/elasticsearch.yml 10 | 11 | USER elasticsearch 12 | -------------------------------------------------------------------------------- /elasticsearch-Zone-Asia-SH/5.6.10/README.md: -------------------------------------------------------------------------------- 1 | # elasticsearch-Zone-Asia-SH 2 | 3 | [![Docker Build Status](https://img.shields.io/docker/build/wutang/skywalking-docker.svg)](https://hub.docker.com/r/wutang/skywalking-docker/) 4 | [![Docker Pulls](https://img.shields.io/docker/pulls/wutang/elasticsearch-shanghai-zone.svg)](https://hub.docker.com/r/wutang/elasticsearch-shanghai-zone/) 5 | [![Docker Automated build](https://img.shields.io/docker/automated/wutang/elasticsearch-shanghai-zone.svg)](https://hub.docker.com/r/wutang/elasticsearch-shanghai-zone/builds/) 6 | [![ImageLayers Size](https://img.shields.io/imagelayers/image-size/wutang/elasticsearch-shanghai-zone/latest.svg)](https://hub.docker.com/r/wutang/elasticsearch-shanghai-zone/) 7 | [![ImageLayers Layers](https://img.shields.io/imagelayers/layers/wutang/elasticsearch-shanghai-zone/latest.svg)](https://hub.docker.com/r/wutang/elasticsearch-shanghai-zone/) 8 | 9 | Docker 镜像名称:[wutang/elasticsearch-shanghai-zone:5.6.10](https://hub.docker.com/r/wutang/elasticsearch-shanghai-zone/) 10 | 11 | 此镜像主要对官方的Elasticsearch的```docker.elastic.co/elasticsearch/elasticsearch:5.6.10```镜像做了封装,调整了镜像时区(Asia/ShangHai),解决了在运行Skywalking的时候连接Elasticsearch时报错的问题。 12 | 13 | ## 拉取镜像(Pull Image): 14 | ```docker pull wutang/elasticsearch-shanghai-zone:5.6.10``` 15 | 16 | ## 运行镜像(Run): 17 | ```docker run -p 9200:9200 -p 9300:9300 -e cluster.name=elasticsearch -e xpack.security.enabled=false -d wutang/elasticsearch-shanghai-zone:5.6.10``` 18 | 19 | ## 环境变量(Environment Variables) 20 | ```cluster.name``` 21 | Elasticsearch集群名称,运行Skywalking需要与此名称保持一致。 22 | 23 | ```xpack.security.enabled``` 24 | 是否开启xpack安全验证,在运行Skywalking中需要将其关闭。 25 | 26 | ## 与Skywalking-Docker镜像配合使用请参考 27 | - [wutang/skywalking-docker](https://hub.docker.com/r/wutang/skywalking-docker/)镜像[使用说明](../5.x/standalone/all-in-one/README.md) 28 | - [quick start](../5.x/quick-start/README.md) 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /elasticsearch-Zone-Asia-SH/6.3.2/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM docker.elastic.co/elasticsearch/elasticsearch:6.3.2 2 | 3 | LABEL maintainer="jian.tan@daocloud.io" 4 | 5 | ENV discovery.type=single-node \ 6 | xpack.security.enabled=false \ 7 | cluster.name=elasticsearch \ 8 | bootstrap.memory_lock=true 9 | 10 | USER root 11 | 12 | COPY elasticsearch.yml /config/elasticsearch.yml 13 | 14 | RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \ 15 | && echo "Asia/Shanghai" > /etc/timezone \ 16 | && chown elasticsearch:elasticsearch config/elasticsearch.yml 17 | 18 | USER elasticsearch 19 | -------------------------------------------------------------------------------- /elasticsearch-Zone-Asia-SH/6.3.2/README.md: -------------------------------------------------------------------------------- 1 | # elasticsearch-Zone-Asia-SH 2 | 3 | Docker 镜像名称:[wutang/elasticsearch-shanghai-zone](https://hub.docker.com/r/wutang/elasticsearch-shanghai-zone/) 4 | 5 | 此镜像主要对官方的Elasticsearch的```docker.elastic.co/elasticsearch/elasticsearch:6.3.2```镜像做了封装,调整了镜像时区(Asia/ShangHai),解决了在运行Skywalking的时候连接Elasticsearch时报错的问题。 6 | 7 | ## 拉取镜像(Pull Image): 8 | ```docker pull wutang/elasticsearch-shanghai-zone:6.3.2``` 9 | 10 | ## 运行镜像(Run): 11 | ```docker run -p 9200:9200 -p 9300:9300 -e cluster.name=elasticsearch -d wutang/elasticsearch-shanghai-zone:6.3.2``` 12 | 13 | ## 环境变量(Environment Variables) 14 | ```cluster.name``` 15 | Elasticsearch集群名称,运行Skywalking需要与此名称保持一致。 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /elasticsearch-Zone-Asia-SH/6.3.2/elasticsearch.yml: -------------------------------------------------------------------------------- 1 | cluster.name: "docker-cluster" 2 | network.host: 0.0.0.0 3 | 4 | # minimum_master_nodes need to be explicitly set when bound on a public IP 5 | # set to 1 to allow single node clusters 6 | # Details: https://github.com/elastic/elasticsearch/pull/17288 7 | discovery.zen.minimum_master_nodes: 1 8 | -------------------------------------------------------------------------------- /elasticsearch-Zone-Asia-SH/6.6.2/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM docker.elastic.co/elasticsearch/elasticsearch:6.6.2 2 | 3 | LABEL maintainer="jian.tan@daocloud.io" 4 | 5 | ENV discovery.type=single-node \ 6 | xpack.security.enabled=false \ 7 | cluster.name=elasticsearch \ 8 | bootstrap.memory_lock=true 9 | 10 | USER root 11 | 12 | COPY elasticsearch.yml /config/elasticsearch.yml 13 | 14 | RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \ 15 | && echo "Asia/Shanghai" > /etc/timezone \ 16 | && chown elasticsearch:elasticsearch config/elasticsearch.yml 17 | 18 | USER elasticsearch 19 | -------------------------------------------------------------------------------- /elasticsearch-Zone-Asia-SH/6.6.2/README.md: -------------------------------------------------------------------------------- 1 | # elasticsearch-Zone-Asia-SH 2 | 3 | Docker 镜像名称:[wutang/elasticsearch-shanghai-zone](https://hub.docker.com/r/wutang/elasticsearch-shanghai-zone/) 4 | 5 | 此镜像主要对官方的Elasticsearch的```docker.elastic.co/elasticsearch/elasticsearch:6.6.2```镜像做了封装,调整了镜像时区(Asia/ShangHai),解决了在运行Skywalking的时候连接Elasticsearch时报错的问题。 6 | 7 | ## 拉取镜像(Pull Image): 8 | ```docker pull wutang/elasticsearch-shanghai-zone:6.6.2``` 9 | 10 | ## 运行镜像(Run): 11 | ```docker run -p 9200:9200 -p 9300:9300 -e cluster.name=elasticsearch -d wutang/elasticsearch-shanghai-zone:6.6.2``` 12 | 13 | ## 环境变量(Environment Variables) 14 | ```cluster.name``` 15 | Elasticsearch集群名称,运行Skywalking需要与此名称保持一致。 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /elasticsearch-Zone-Asia-SH/6.6.2/elasticsearch.yml: -------------------------------------------------------------------------------- 1 | cluster.name: "docker-cluster" 2 | network.host: 0.0.0.0 3 | 4 | # minimum_master_nodes need to be explicitly set when bound on a public IP 5 | # set to 1 to allow single node clusters 6 | # Details: https://github.com/elastic/elasticsearch/pull/17288 7 | discovery.zen.minimum_master_nodes: 1 8 | -------------------------------------------------------------------------------- /elasticsearch-Zone-Asia-SH/7.0.1/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM elasticsearch:7.0.1 2 | 3 | LABEL maintainer="jian.tan@daocloud.io" 4 | 5 | ENV discovery.type=single-node \ 6 | xpack.security.enabled=false \ 7 | cluster.name=elasticsearch \ 8 | bootstrap.memory_lock=true 9 | 10 | USER root 11 | 12 | COPY elasticsearch.yml /config/elasticsearch.yml 13 | 14 | RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \ 15 | && echo "Asia/Shanghai" > /etc/timezone \ 16 | && chown elasticsearch:elasticsearch config/elasticsearch.yml 17 | 18 | USER elasticsearch 19 | -------------------------------------------------------------------------------- /elasticsearch-Zone-Asia-SH/7.0.1/README.md: -------------------------------------------------------------------------------- 1 | # elasticsearch-Zone-Asia-SH 2 | 3 | Docker 镜像名称:[wutang/elasticsearch-shanghai-zone](https://hub.docker.com/r/wutang/elasticsearch-shanghai-zone/) 4 | 5 | 此镜像主要对官方的Elasticsearch的```docker.elastic.co/elasticsearch/elasticsearch:7.0.1```镜像做了封装,调整了镜像时区(Asia/ShangHai),解决了在运行Skywalking的时候连接Elasticsearch时报错的问题。 6 | 7 | ## 拉取镜像(Pull Image): 8 | ```docker pull wutang/elasticsearch-shanghai-zone:7.0.1``` 9 | 10 | ## 运行镜像(Run): 11 | ```docker run -p 9200:9200 -p 9300:9300 -e cluster.name=elasticsearch -d wutang/elasticsearch-shanghai-zone:7.0.1``` 12 | 13 | ## 环境变量(Environment Variables) 14 | ```cluster.name``` 15 | Elasticsearch集群名称,运行Skywalking需要与此名称保持一致。 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /elasticsearch-Zone-Asia-SH/7.0.1/elasticsearch.yml: -------------------------------------------------------------------------------- 1 | cluster.name: "docker-cluster" 2 | network.host: 0.0.0.0 3 | 4 | # minimum_master_nodes need to be explicitly set when bound on a public IP 5 | # set to 1 to allow single node clusters 6 | # Details: https://github.com/elastic/elasticsearch/pull/17288 7 | discovery.zen.minimum_master_nodes: 1 8 | --------------------------------------------------------------------------------