一旦你的程序docker化之后,你会遇到各种问题,比如原来采用的本地记日志的方式就不再方便了,虽然你可以挂载到宿主机,但你使用 --scale 的话,会导致

记录日志异常,所以最好的方式还是要做日志中心化,另一个问题,原来一个请求在一个进程中的痉挛失败,你可以在日志中巡查出调用堆栈,但是docker化之后,

原来一个进程的东西会拆成几个微服务,这时候最好就要有一个分布式的调用链跟踪,类似于wcf中的svctraceview工具。

一:搭建skywalking

  gihub地址是:https://github.com/apache/incubator-skywalking 从文档中大概看的出来,大体分三个部分:存储,收集器,探针,存储这里就选用推荐的

elasticsearch。收集器准备和es部署在一起,探针就有各自语言的实现了,总之这里就有三个docker container: es,kibana,skywalking, 如果不用容器编排工具

的话就比较麻烦。

下面是本次搭建的一个目录结构:

1.  elasticsearch.yml

es的配置文件,不过这里有一个坑,就是一定要将 network.publish_host: 0.0.0.0 ,否则skywalking会连不上 9300端口。

network.publish_host: 0.0.0.0
transport.tcp.port:
network.host: 0.0.0.0

2. elasticsearch.dockerfile

在up的时候,将这个es文件copy到 容器的config文件夹下。

FROM elasticsearch:5.6.

EXPOSE  

COPY elasticsearch.yml /usr/share/elasticsearch/config/

3. application.yml

skywalking的配置文件,这里也有一个坑:连接es的地址中,配置的 clustername一定要修改成和es的clustername保持一致,否则会连不上,这里容器之间用link

进行互联,所以es的ip改成elasticsearch就可以了,其他的ip改成0.0.0.0 。

# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License. #cluster:
# zookeeper:
# hostPort: localhost:
# sessionTimeout:
naming:
jetty:
host: 0.0.0.0
port:
contextPath: /
cache:
# guava:
caffeine:
remote:
gRPC:
host: 0.0.0.0
port:
agent_gRPC:
gRPC:
host: 0.0.0.0
port:
#Set these two setting to open ssl
#sslCertChainFile: $path
#sslPrivateKeyFile: $path #Set your own token to active auth
#authentication: xxxxxx
agent_jetty:
jetty:
host: 0.0.0.0
port:
contextPath: /
analysis_register:
default:
analysis_jvm:
default:
analysis_segment_parser:
default:
bufferFilePath: ../buffer/
bufferOffsetMaxFileSize: 10M
bufferSegmentMaxFileSize: 500M
bufferFileCleanWhenRestart: true
ui:
jetty:
host: 0.0.0.0
port:
contextPath: /
storage:
elasticsearch:
clusterName: elasticsearch
clusterTransportSniffer: true
clusterNodes: elasticsearch:
indexShardsNumber:
indexReplicasNumber:
highPerformanceMode: true
ttl:
#storage:
# h2:
# url: jdbc:h2:~/memorydb
# userName: sa
configuration:
default:
# namespace: xxxxx
# alarm threshold
applicationApdexThreshold:
serviceErrorRateThreshold: 10.00
serviceAverageResponseTimeThreshold:
instanceErrorRateThreshold: 10.00
instanceAverageResponseTimeThreshold:
applicationErrorRateThreshold: 10.00
applicationAverageResponseTimeThreshold:
# thermodynamic
thermodynamicResponseTimeStep:
thermodynamicCountOfResponseTimeSteps:

4.  skywalking.dockerfile

接下来就是 skywalking的 下载安装,使用dockerfile流程化。

FROM centos:

LABEL username="hxc@qq.com"

WORKDIR /app

RUN yum install -y wget && \
yum install -y java-1.8.-openjdk ADD http://mirrors.hust.edu.cn/apache/incubator/skywalking/5.0.0-RC2/apache-skywalking-apm-incubating-5.0.0-RC2.tar.gz /app RUN tar -xf apache-skywalking-apm-incubating-5.0.-RC2.tar.gz && \
mv apache-skywalking-apm-incubating skywalking RUN ls /app #copy文件
COPY application.yml /app/skywalking/config/application.yml WORKDIR /app/skywalking/bin USER root RUN echo "tail -f /dev/null" >> /app/skywalking/bin/startup.sh CMD ["/bin/sh","-c","/app/skywalking/bin/startup.sh" ]

5. docker-compose.yml

最后就是将这三个容器进行编排,要注意的是,因为收集器会将数据放入到es中,所有一定要将es的data挂载到宿主机的大硬盘下,否则你的空间会不足的。

version: '3.1'

services:

  #elastic 镜像
elasticsearch:
build:
context: .
dockerfile: elasticsearch.dockerfile
# ports:
# - "9200:9200"
# - "9300:9300"
volumes:
- "/data/es2:/usr/share/elasticsearch/data" #kibana 可视化查询,暴露
kibana:
image: kibana
links:
- elasticsearch
ports:
- :
depends_on:
- "elasticsearch" #skywalking
skywalking:
build:
context: .
dockerfile: skywalking.dockerfile
ports:
- "10800:10800"
- "11800:11800"
- "12800:12800"
- "8080:8080"
links:
- elasticsearch
depends_on:
- "elasticsearch"

二:一键部署

要部署在docker中,你还得需要安装docker-ce 和 docker-compose,大家可以参照官方安装一下。

1. Docker-ce 的安装

sudo yum remove docker \
docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-logrotate \
docker-selinux \
docker-engine-selinux \
docker-engine sudo yum install -y yum-utils \
device-mapper-persistent-data \
lvm2 sudo yum-config-manager \
--add-repo \
https://download.docker.com/linux/centos/docker-ce.repo sudo yum install docker-ce

然后启动一下docker 服务,可以看到版本是18.06.1

[root@localhost ~]# service docker start
Redirecting to /bin/systemctl start docker.service
[root@localhost ~]# docker -v
Docker version 18.06.-ce, build e68fc7a

2. docker-compose的安装

sudo curl -L "https://github.com/docker/compose/releases/download/1.22.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

sudo chmod +x /usr/local/bin/docker-compose

3.  最后在centos上执行 docker-compopse up --build 就可以了,如果不想terminal上运行,可以加 -d 使用后台执行。

[root@localhost docker]# docker-compose up --build
Creating network "docker_default" with the default driver
Building elasticsearch
Step / : FROM elasticsearch:5.6.
---> 7a047c21aa48
Step / : EXPOSE
---> Using cache
---> 8d66bb57b09d
Step / : COPY elasticsearch.yml /usr/share/elasticsearch/config/
---> Using cache
---> 02b516c03b95
Successfully built 02b516c03b95
Successfully tagged docker_elasticsearch:latest
Building skywalking
Step / : FROM centos:
---> 5182e96772bf
Step / : LABEL username="hxc@qq.com"
---> Using cache
---> b95b96a92042
Step / : WORKDIR /app
---> Using cache
---> afdf4efe3426
Step / : RUN yum install -y wget && yum install -y java-1.8.-openjdk
---> Using cache
---> 46be0ca0f7b5
Step / : ADD http://mirrors.hust.edu.cn/apache/incubator/skywalking/5.0.0-RC2/apache-skywalking-apm-incubating-5.0.0-RC2.tar.gz /app ---> Using cache
---> d5c30bcfd5ea
Step / : RUN tar -xf apache-skywalking-apm-incubating-5.0.-RC2.tar.gz && mv apache-skywalking-apm-incubating skywalking
---> Using cache
---> 1438d08d18fa
Step / : RUN ls /app
---> Using cache
---> b594124672ea
Step / : COPY application.yml /app/skywalking/config/application.yml
---> Using cache
---> 10eaf0805a65
Step / : WORKDIR /app/skywalking/bin
---> Using cache
---> bc0f02291536
Step / : USER root
---> Using cache
---> 4498afca5fe6
Step / : RUN echo "tail -f /dev/null" >> /app/skywalking/bin/startup.sh
---> Using cache
---> 1c4be7c6b32a
Step / : CMD ["/bin/sh","-c","/app/skywalking/bin/startup.sh" ]
---> Using cache
---> ecfc97e4c97d
Successfully built ecfc97e4c97d
Successfully tagged docker_skywalking:latest
Creating docker_elasticsearch_1 ... done
Creating docker_skywalking_1 ... done
Creating docker_kibana_1 ... done
Attaching to docker_elasticsearch_1, docker_kibana_1, docker_skywalking_1
elasticsearch_1 | [--17T23::,][INFO ][o.e.n.Node ] [] initializing ...
elasticsearch_1 | [--17T23::,][INFO ][o.e.e.NodeEnvironment ] [FC_bOh1] using [] data paths, mounts [[/usr/share/elasticsearch/data (/dev/sda3)]], net usable_space [5gb], net total_space [.1gb], spins? [possibly], types [xfs]
elasticsearch_1 | [--17T23::,][INFO ][o.e.e.NodeEnvironment ] [FC_bOh1] heap size [.9gb], compressed ordinary object pointers [true]
elasticsearch_1 | [--17T23::,][INFO ][o.e.n.Node ] node name [FC_bOh1] derived from node ID [FC_bOh1nS_uW6JKy_46iBg]; set [node.name] to override
elasticsearch_1 | [--17T23::,][INFO ][o.e.n.Node ] version[5.6.], pid[], build[8bbedf5/--31T18::.105Z], OS[Linux/3.10.-.el7.x86_64/amd64], JVM[Oracle Corporation/OpenJDK -Bit Server VM/1.8.0_151/25.151-b12]
elasticsearch_1 | [--17T23::,][INFO ][o.e.n.Node ] JVM arguments [-Xms2g, -Xmx2g, -XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=, -XX:+UseCMSInitiatingOccupancyOnly, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-, -Djna.nosys=true, -Djdk.io.permissionsUseCanonicalPath=true, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Dlog4j.skipJansi=true, -XX:+HeapDumpOnOutOfMemoryError, -Des.path.home=/usr/share/elasticsearch]
skywalking_1 | SkyWalking Collector started successfully!
elasticsearch_1 | [--17T23::,][INFO ][o.e.p.PluginsService ] [FC_bOh1] loaded module [aggs-matrix-stats]
elasticsearch_1 | [--17T23::,][INFO ][o.e.p.PluginsService ] [FC_bOh1] loaded module [ingest-common]
elasticsearch_1 | [--17T23::,][INFO ][o.e.p.PluginsService ] [FC_bOh1] loaded module [lang-expression]
elasticsearch_1 | [--17T23::,][INFO ][o.e.p.PluginsService ] [FC_bOh1] loaded module [lang-groovy]
elasticsearch_1 | [--17T23::,][INFO ][o.e.p.PluginsService ] [FC_bOh1] loaded module [lang-mustache]
elasticsearch_1 | [--17T23::,][INFO ][o.e.p.PluginsService ] [FC_bOh1] loaded module [lang-painless]
elasticsearch_1 | [--17T23::,][INFO ][o.e.p.PluginsService ] [FC_bOh1] loaded module [parent-join]
elasticsearch_1 | [--17T23::,][INFO ][o.e.p.PluginsService ] [FC_bOh1] loaded module [percolator]
elasticsearch_1 | [--17T23::,][INFO ][o.e.p.PluginsService ] [FC_bOh1] loaded module [reindex]
elasticsearch_1 | [--17T23::,][INFO ][o.e.p.PluginsService ] [FC_bOh1] loaded module [transport-netty3]
elasticsearch_1 | [--17T23::,][INFO ][o.e.p.PluginsService ] [FC_bOh1] loaded module [transport-netty4]
elasticsearch_1 | [--17T23::,][INFO ][o.e.p.PluginsService ] [FC_bOh1] no plugins loaded
skywalking_1 | SkyWalking Web Application started successfully!
elasticsearch_1 | [--17T23::,][INFO ][o.e.d.DiscoveryModule ] [FC_bOh1] using discovery type [zen]
kibana_1 | {"type":"log","@timestamp":"2018-09-17T23:51:53Z","tags":["status","plugin:kibana@5.6.11","info"],"pid":,"state":"green","message":"Status changed from uninitialized to green - Ready","prevState":"uninitialized","prevMsg":"uninitialized"}
elasticsearch_1 | [--17T23::,][INFO ][o.e.n.Node ] initialized
elasticsearch_1 | [--17T23::,][INFO ][o.e.n.Node ] [FC_bOh1] starting ...
kibana_1 | {"type":"log","@timestamp":"2018-09-17T23:51:53Z","tags":["status","plugin:elasticsearch@5.6.11","info"],"pid":,"state":"yellow","message":"Status changed from uninitialized to yellow - Waiting for Elasticsearch","prevState":"uninitialized","prevMsg":"uninitialized"}
kibana_1 | {"type":"log","@timestamp":"2018-09-17T23:51:53Z","tags":["status","plugin:console@5.6.11","info"],"pid":,"state":"green","message":"Status changed from uninitialized to green - Ready","prevState":"uninitialized","prevMsg":"uninitialized"}
kibana_1 | {"type":"log","@timestamp":"2018-09-17T23:51:53Z","tags":["error","elasticsearch","admin"],"pid":,"message":"Request error, retrying\nHEAD http://elasticsearch:9200/ => connect ECONNREFUSED 172.21.0.2:9200"}
kibana_1 | {"type":"log","@timestamp":"2018-09-17T23:51:53Z","tags":["warning","elasticsearch","admin"],"pid":,"message":"Unable to revive connection: http://elasticsearch:9200/"}
kibana_1 | {"type":"log","@timestamp":"2018-09-17T23:51:53Z","tags":["warning","elasticsearch","admin"],"pid":,"message":"No living connections"}
kibana_1 | {"type":"log","@timestamp":"2018-09-17T23:51:53Z","tags":["status","plugin:metrics@5.6.11","info"],"pid":,"state":"green","message":"Status changed from uninitialized to green - Ready","prevState":"uninitialized","prevMsg":"uninitialized"}
kibana_1 | {"type":"log","@timestamp":"2018-09-17T23:51:53Z","tags":["status","plugin:elasticsearch@5.6.11","error"],"pid":,"state":"red","message":"Status changed from yellow to red - Unable to connect to Elasticsearch at http://elasticsearch:9200.","prevState":"yellow","prevMsg":"Waiting for Elasticsearch"}
elasticsearch_1 | [--17T23::,][INFO ][o.e.t.TransportService ] [FC_bOh1] publish_address {172.21.0.2:}, bound_addresses {0.0.0.0:}
elasticsearch_1 | [--17T23::,][INFO ][o.e.b.BootstrapChecks ] [FC_bOh1] bound or publishing to a non-loopback or non-link-local address, enforcing bootstrap checks
kibana_1 | {"type":"log","@timestamp":"2018-09-17T23:51:53Z","tags":["status","plugin:timelion@5.6.11","info"],"pid":,"state":"green","message":"Status changed from uninitialized to green - Ready","prevState":"uninitialized","prevMsg":"uninitialized"}
kibana_1 | {"type":"log","@timestamp":"2018-09-17T23:51:53Z","tags":["listening","info"],"pid":,"message":"Server running at http://0.0.0.0:5601"}
kibana_1 | {"type":"log","@timestamp":"2018-09-17T23:51:53Z","tags":["status","ui settings","error"],"pid":,"state":"red","message":"Status changed from uninitialized to red - Elasticsearch plugin is red","prevState":"uninitialized","prevMsg":"uninitialized"}
kibana_1 | {"type":"log","@timestamp":"2018-09-17T23:51:56Z","tags":["warning","elasticsearch","admin"],"pid":,"message":"Unable to revive connection: http://elasticsearch:9200/"}
kibana_1 | {"type":"log","@timestamp":"2018-09-17T23:51:56Z","tags":["warning","elasticsearch","admin"],"pid":,"message":"No living connections"}
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.s.ClusterService ] [FC_bOh1] new_master {FC_bOh1}{FC_bOh1nS_uW6JKy_46iBg}{tNMEW5HYQm6O4aiqpU0uWA}{172.21.0.2}{172.21.0.2:}, reason: zen-disco-elected-as-master ([] nodes joined)
elasticsearch_1 | [--17T23::,][INFO ][o.e.h.n.Netty4HttpServerTransport] [FC_bOh1] publish_address {172.21.0.2:}, bound_addresses {0.0.0.0:}
elasticsearch_1 | [--17T23::,][INFO ][o.e.n.Node ] [FC_bOh1] started
elasticsearch_1 | [--17T23::,][INFO ][o.e.g.GatewayService ] [FC_bOh1] recovered [] indices into cluster_state
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [application_alarm_list_month] creating index, cause [api], templates [], shards []/[], mappings [type]
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.r.a.AllocationService] [FC_bOh1] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[application_alarm_list_month][]] ...]).
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [memory_pool_metric_month] creating index, cause [api], templates [], shards []/[], mappings [type]
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.r.a.AllocationService] [FC_bOh1] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[memory_pool_metric_month][]] ...]).
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [service_metric_day] creating index, cause [api], templates [], shards []/[], mappings [type]
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.r.a.AllocationService] [FC_bOh1] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[service_metric_day][]] ...]).
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [application_metric_hour] creating index, cause [api], templates [], shards []/[], mappings [type]
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.r.a.AllocationService] [FC_bOh1] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[application_metric_hour][]] ...]).
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [application_metric_month] creating index, cause [api], templates [], shards []/[], mappings [type]
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.r.a.AllocationService] [FC_bOh1] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[application_metric_month][]] ...]).
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [instance_mapping_month] creating index, cause [api], templates [], shards []/[], mappings [type]
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.r.a.AllocationService] [FC_bOh1] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[instance_mapping_month][]] ...]).
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [service_reference_metric_day] creating index, cause [api], templates [], shards []/[], mappings [type]
kibana_1 | {"type":"log","@timestamp":"2018-09-17T23:51:58Z","tags":["warning"],"pid":,"kibanaVersion":"5.6.11","nodes":[{"version":"5.6.4","http":{"publish_address":"172.21.0.2:9200"},"ip":"172.21.0.2"}],"message":"You're running Kibana 5.6.11 with some different versions of Elasticsearch. Update Kibana or Elasticsearch to the same version to prevent compatibility issues: v5.6.4 @ 172.21.0.2:9200 (172.21.0.2)"}
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.r.a.AllocationService] [FC_bOh1] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[service_reference_metric_day][]] ...]).
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [instance_reference_alarm] creating index, cause [api], templates [], shards []/[], mappings [type]
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.r.a.AllocationService] [FC_bOh1] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[instance_reference_alarm][]] ...]).
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [instance_alarm_list] creating index, cause [api], templates [], shards []/[], mappings [type]
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.r.a.AllocationService] [FC_bOh1] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[instance_alarm_list][]] ...]).
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [application_mapping_minute] creating index, cause [api], templates [], shards []/[], mappings [type]
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.r.a.AllocationService] [FC_bOh1] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[application_mapping_minute][], [application_mapping_minute][]] ...]).
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [response_time_distribution_minute] creating index, cause [api], templates [], shards []/[], mappings [type]
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.r.a.AllocationService] [FC_bOh1] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[response_time_distribution_minute][]] ...]).
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [application] creating index, cause [api], templates [], shards []/[], mappings [type]
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.r.a.AllocationService] [FC_bOh1] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[application][]] ...]).
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [service_reference_metric_hour] creating index, cause [api], templates [], shards []/[], mappings [type]
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.r.a.AllocationService] [FC_bOh1] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[service_reference_metric_hour][]] ...]).
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [memory_metric_minute] creating index, cause [api], templates [], shards []/[], mappings [type]
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.r.a.AllocationService] [FC_bOh1] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[memory_metric_minute][], [memory_metric_minute][]] ...]).
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [application_alarm_list_day] creating index, cause [api], templates [], shards []/[], mappings [type]
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.r.a.AllocationService] [FC_bOh1] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[application_alarm_list_day][]] ...]).
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [service_reference_alarm] creating index, cause [api], templates [], shards []/[], mappings [type]
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.r.a.AllocationService] [FC_bOh1] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[service_reference_alarm][]] ...]).
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [application_metric_day] creating index, cause [api], templates [], shards []/[], mappings [type]
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.r.a.AllocationService] [FC_bOh1] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[application_metric_day][]] ...]).
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [segment] creating index, cause [api], templates [], shards []/[], mappings [type]
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.r.a.AllocationService] [FC_bOh1] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[segment][], [segment][]] ...]).
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [global_trace] creating index, cause [api], templates [], shards []/[], mappings [type]
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.r.a.AllocationService] [FC_bOh1] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[global_trace][]] ...]).
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [service_alarm_list] creating index, cause [api], templates [], shards []/[], mappings [type]
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.r.a.AllocationService] [FC_bOh1] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[service_alarm_list][]] ...]).
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [service_metric_month] creating index, cause [api], templates [], shards []/[], mappings [type]
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.r.a.AllocationService] [FC_bOh1] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[service_metric_month][]] ...]).
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [instance_reference_metric_day] creating index, cause [api], templates [], shards []/[], mappings [type]
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.r.a.AllocationService] [FC_bOh1] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[instance_reference_metric_day][]] ...]).
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [application_component_month] creating index, cause [api], templates [], shards []/[], mappings [type]
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.r.a.AllocationService] [FC_bOh1] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[application_component_month][]] ...]).
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [application_metric_minute] creating index, cause [api], templates [], shards []/[], mappings [type]
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.r.a.AllocationService] [FC_bOh1] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[application_metric_minute][]] ...]).
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [application_reference_metric_day] creating index, cause [api], templates [], shards []/[], mappings [type]
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.r.a.AllocationService] [FC_bOh1] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[application_reference_metric_day][]] ...]).
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [application_reference_metric_month] creating index, cause [api], templates [], shards []/[], mappings [type]
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.r.a.AllocationService] [FC_bOh1] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[application_reference_metric_month][]] ...]).
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [cpu_metric_minute] creating index, cause [api], templates [], shards []/[], mappings [type]
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.r.a.AllocationService] [FC_bOh1] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[cpu_metric_minute][]] ...]).
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [gc_metric_hour] creating index, cause [api], templates [], shards []/[], mappings [type]
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.r.a.AllocationService] [FC_bOh1] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[gc_metric_hour][]] ...]).
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [response_time_distribution_month] creating index, cause [api], templates [], shards []/[], mappings [type]
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.r.a.AllocationService] [FC_bOh1] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[response_time_distribution_month][]] ...]).
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [service_reference_metric_minute] creating index, cause [api], templates [], shards []/[], mappings [type]
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.r.a.AllocationService] [FC_bOh1] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[service_reference_metric_minute][]] ...]).
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [instance_mapping_minute] creating index, cause [api], templates [], shards []/[], mappings [type]
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.r.a.AllocationService] [FC_bOh1] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[instance_mapping_minute][]] ...]).
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [cpu_metric_month] creating index, cause [api], templates [], shards []/[], mappings [type]
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.r.a.AllocationService] [FC_bOh1] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[cpu_metric_month][]] ...]).
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [instance_metric_month] creating index, cause [api], templates [], shards []/[], mappings [type]
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.r.a.AllocationService] [FC_bOh1] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[instance_metric_month][]] ...]).
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [instance_mapping_hour] creating index, cause [api], templates [], shards []/[], mappings [type]
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.r.a.AllocationService] [FC_bOh1] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[instance_mapping_hour][]] ...]).
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [service_alarm] creating index, cause [api], templates [], shards []/[], mappings [type]
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.r.a.AllocationService] [FC_bOh1] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[service_alarm][]] ...]).
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [memory_pool_metric_minute] creating index, cause [api], templates [], shards []/[], mappings [type]
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.r.a.AllocationService] [FC_bOh1] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[memory_pool_metric_minute][]] ...]).
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [application_component_day] creating index, cause [api], templates [], shards []/[], mappings [type]
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.r.a.AllocationService] [FC_bOh1] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[application_component_day][]] ...]).
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [service_name] creating index, cause [api], templates [], shards []/[], mappings [type]
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.r.a.AllocationService] [FC_bOh1] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[service_name][]] ...]).
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [cpu_metric_day] creating index, cause [api], templates [], shards []/[], mappings [type]
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.r.a.AllocationService] [FC_bOh1] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[cpu_metric_day][]] ...]).
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [instance_reference_metric_hour] creating index, cause [api], templates [], shards []/[], mappings [type]
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.r.a.AllocationService] [FC_bOh1] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[instance_reference_metric_hour][]] ...]).
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [network_address] creating index, cause [api], templates [], shards []/[], mappings [type]
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.r.a.AllocationService] [FC_bOh1] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[network_address][]] ...]).
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [cpu_metric_hour] creating index, cause [api], templates [], shards []/[], mappings [type]
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.r.a.AllocationService] [FC_bOh1] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[cpu_metric_hour][]] ...]).
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [application_mapping_day] creating index, cause [api], templates [], shards []/[], mappings [type]
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.r.a.AllocationService] [FC_bOh1] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[application_mapping_day][]] ...]).
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [gc_metric_day] creating index, cause [api], templates [], shards []/[], mappings [type]
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.r.a.AllocationService] [FC_bOh1] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[gc_metric_day][]] ...]).
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [memory_metric_day] creating index, cause [api], templates [], shards []/[], mappings [type]
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.r.a.AllocationService] [FC_bOh1] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[memory_metric_day][]] ...]).
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [instance_reference_metric_minute] creating index, cause [api], templates [], shards []/[], mappings [type]
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.r.a.AllocationService] [FC_bOh1] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[instance_reference_metric_minute][]] ...]).
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [application_reference_metric_minute] creating index, cause [api], templates [], shards []/[], mappings [type]
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.r.a.AllocationService] [FC_bOh1] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[application_reference_metric_minute][]] ...]).
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [application_component_minute] creating index, cause [api], templates [], shards []/[], mappings [type]
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.r.a.AllocationService] [FC_bOh1] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[application_component_minute][]] ...]).
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [instance_alarm] creating index, cause [api], templates [], shards []/[], mappings [type]
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.r.a.AllocationService] [FC_bOh1] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[instance_alarm][]] ...]).
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [instance_metric_hour] creating index, cause [api], templates [], shards []/[], mappings [type]
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.r.a.AllocationService] [FC_bOh1] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[instance_metric_hour][]] ...]).
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [application_reference_alarm] creating index, cause [api], templates [], shards []/[], mappings [type]
kibana_1 | {"type":"log","@timestamp":"2018-09-17T23:52:03Z","tags":["status","plugin:elasticsearch@5.6.11","info"],"pid":,"state":"yellow","message":"Status changed from red to yellow - No existing Kibana index found","prevState":"red","prevMsg":"Unable to connect to Elasticsearch at http://elasticsearch:9200."}
kibana_1 | {"type":"log","@timestamp":"2018-09-17T23:52:03Z","tags":["status","ui settings","info"],"pid":,"state":"yellow","message":"Status changed from red to yellow - Elasticsearch plugin is yellow","prevState":"red","prevMsg":"Elasticsearch plugin is red"}
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [.kibana] creating index, cause [api], templates [], shards []/[], mappings [_default_, index-pattern, server, visualization, search, timelion-sheet, config, dashboard, url]
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [instance_reference_alarm_list] creating index, cause [api], templates [], shards []/[], mappings [type]
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [service_reference_metric_month] creating index, cause [api], templates [], shards []/[], mappings [type]
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [memory_pool_metric_day] creating index, cause [api], templates [], shards []/[], mappings [type]
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [segment_duration] creating index, cause [api], templates [], shards []/[], mappings [type]
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [service_metric_minute] creating index, cause [api], templates [], shards []/[], mappings [type]
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [response_time_distribution_hour] creating index, cause [api], templates [], shards []/[], mappings [type]
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [application_component_hour] creating index, cause [api], templates [], shards []/[], mappings [type]
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [memory_metric_month] creating index, cause [api], templates [], shards []/[], mappings [type]
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [application_alarm_list_hour] creating index, cause [api], templates [], shards []/[], mappings [type]
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [application_alarm] creating index, cause [api], templates [], shards []/[], mappings [type]
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [instance] creating index, cause [api], templates [], shards []/[], mappings [type]
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [application_reference_metric_hour] creating index, cause [api], templates [], shards []/[], mappings [type]
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [instance_metric_minute] creating index, cause [api], templates [], shards []/[], mappings [type]
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [memory_metric_hour] creating index, cause [api], templates [], shards []/[], mappings [type]
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [instance_reference_metric_month] creating index, cause [api], templates [], shards []/[], mappings [type]
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [service_reference_alarm_list] creating index, cause [api], templates [], shards []/[], mappings [type]
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [gc_metric_month] creating index, cause [api], templates [], shards []/[], mappings [type]
kibana_1 | {"type":"log","@timestamp":"2018-09-17T23:52:05Z","tags":["status","plugin:elasticsearch@5.6.11","info"],"pid":,"state":"green","message":"Status changed from yellow to green - Kibana index ready","prevState":"yellow","prevMsg":"No existing Kibana index found"}
kibana_1 | {"type":"log","@timestamp":"2018-09-17T23:52:05Z","tags":["status","ui settings","info"],"pid":,"state":"green","message":"Status changed from yellow to green - Ready","prevState":"yellow","prevMsg":"Elasticsearch plugin is yellow"}
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [application_reference_alarm_list] creating index, cause [api], templates [], shards []/[], mappings [type]
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [memory_pool_metric_hour] creating index, cause [api], templates [], shards []/[], mappings [type]
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [application_alarm_list_minute] creating index, cause [api], templates [], shards []/[], mappings [type]
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [instance_mapping_day] creating index, cause [api], templates [], shards []/[], mappings [type]
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [instance_metric_day] creating index, cause [api], templates [], shards []/[], mappings [type]
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [application_mapping_month] creating index, cause [api], templates [], shards []/[], mappings [type]
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [application_mapping_hour] creating index, cause [api], templates [], shards []/[], mappings [type]
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [response_time_distribution_day] creating index, cause [api], templates [], shards []/[], mappings [type]
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [service_metric_hour] creating index, cause [api], templates [], shards []/[], mappings [type]
elasticsearch_1 | [--17T23::,][INFO ][o.e.c.m.MetaDataCreateIndexService] [FC_bOh1] [gc_metric_minute] creating index, cause [api], templates [], shards []/[], mappings [type]

从上图中可以看到 es,kibana,skywalking都启动成功了,你也可以通过docker-compose ps 看一下是否都起来了,netstat 看一下宿主机开放了哪些端口。

[root@localhost docker]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
9aa90401ca16 kibana "/docker-entrypoint.…" minutes ago Up minutes 0.0.0.0:->/tcp docker_kibana_1
c551248e32af docker_skywalking "/bin/sh -c /app/sky…" minutes ago Up minutes 0.0.0.0:->/tcp, 0.0.0.0:->/tcp, 0.0.0.0:->/tcp, 0.0.0.0:->/tcp docker_skywalking_1
765d38469ff1 docker_elasticsearch "/docker-entrypoint.…" minutes ago Up minutes /tcp, /tcp docker_elasticsearch_1
[root@localhost docker]# netstat -tlnp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 192.168.122.1: 0.0.0.0:* LISTEN /dnsmasq
tcp 0.0.0.0: 0.0.0.0:* LISTEN /sshd
tcp 127.0.0.1: 0.0.0.0:* LISTEN /cupsd
tcp 127.0.0.1: 0.0.0.0:* LISTEN /master
tcp6 ::: :::* LISTEN /docker-proxy
tcp6 ::: :::* LISTEN /docker-proxy
tcp6 ::: :::* LISTEN /sshd
tcp6 ::: :::* LISTEN /cupsd
tcp6 ::: :::* LISTEN /docker-proxy
tcp6 ::: :::* LISTEN /master
tcp6 ::: :::* LISTEN /docker-proxy
tcp6 ::: :::* LISTEN /docker-proxy
[root@localhost docker]#

然后就可以看一些8080端口的可视化UI,默认用户名密码admin,admin,一个比较耐看的UI就出来了。

三: net下的探针

  从nuget上拉取一个SkyWalking.AspNetCore探针进行代码埋点,github地址:https://github.com/OpenSkywalking/skywalking-netcore

在startup类中进行注入,在页面请求中进行一次cnblogs.com的请求操作,然后仔细观察一下调用链跟踪是一个什么样子?

using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
using SkyWalking.Extensions;
using SkyWalking.AspNetCore;
using System.Net; namespace WebApplication1
{
public class Startup
{
// This method gets called by the runtime. Use this method to add services to the container.
// For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940
public void ConfigureServices(IServiceCollection services)
{
services.AddSkyWalking(option =>
{
// Application code is showed in sky-walking-ui
option.ApplicationCode = "10001 测试站点"; //Collector agent_gRPC/grpc service addresses.
option.DirectServers = "192.168.23.183:11800";
});
} // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
} app.Run(async (context) =>
{
WebClient client = new WebClient(); var str = client.DownloadString("http://cnblogs.com"); await context.Response.WriteAsync(str);
});
}
}
}

可以看到这张图还是蛮漂亮的哈,也方便我们快速的跟踪代码,发现问题,找出问题, 还有更多的功能期待你的挖掘啦。 好了,本篇就说到这里,希望对你有帮助。

Demo下载

使用docker-compose 一键部署你的分布式调用链跟踪框架skywalking的更多相关文章

  1. 部署你的分布式调用链跟踪框架skywalking

    使用docker-compose 一键部署你的分布式调用链跟踪框架skywalking https://www.cnblogs.com/huangxincheng/p/9666930.html 一旦你 ...

  2. Docker Compose 一键部署LNMP

    Docker Compose 一键部署LNMP 目录结构 [root@localhost ~]# tree compose_lnmp/ compose_lnmp/ ├── docker-compose ...

  3. Docker Compose 一键部署Nginx代理Tomcat集群

    Docker Compose 一键部署Nginx代理Tomcat集群 目录结构 [root@localhost ~]# tree compose_nginx_tomcat/ compose_nginx ...

  4. Docker Compose 一键部署多节点爬虫程序

    Docker Compose 一键部署多节点爬虫程序 目录结构 [root@localhost ~]# tree compose_crawler/ compose_crawler/ ├── cento ...

  5. 分布式调用链跟踪工具Jaeger?两分钟极速体验

    欢迎访问我的GitHub https://github.com/zq2599/blog_demos 内容:所有原创文章分类汇总及配套源码,涉及Java.Docker.Kubernetes.DevOPS ...

  6. 开源跨境ERP - 小老板 Docker/Docker Compose一键部署

    先上部署成功后的截图,各个菜单点击均无报错 DockerCompose 包含: 1. 三个mysql5.7数据库 2. redis php会话存储+ memcached 3. 小老板php主程序 do ...

  7. [Docker]compose一键部署nginx

    Docker-compose部署nginx 创建配置文件 mkdir -p /usr/local/docker/nginx cat > /usr/local/docker/nginx/docke ...

  8. Docker Compose一键部署Nginx反向代理Tomcat集群

    目录结构如下 mysql/conf/my.cnf [mysqld] user=mysql port=3306 datadir=/var/lib/mysql socket=/var/lib/mysql/ ...

  9. Docker Compose安装部署Jenkins

    流水线可以让项目发布流程更加清晰,docker可以大大减少Jenkins配置. 1.前言 数据卷挂载到 /var 磁盘目录下,因为该磁盘空间较大,后面需要挂载容器数据卷,以防内存吃紧. 为了可以留存启 ...

随机推荐

  1. HTML学习笔记8:表单

      什么是表单?     一个网页表单可以将用户输入的数据发送到服务器进行处理.因为互联网用户使用复选框,单选按钮或文本字段填写表格,所以WebForms的形式类似文件或数据库.例如,WebForms ...

  2. jmeter如何录制App及Web应用

    1.添加一个线程组(Test Plan上右键,添加_Threads_线程组) 2.添加一个HTTP代理服务器(Test Plan上右键,添加_非测试元件_HTTP代理服务器) 3.在HTTP代理服务器 ...

  3. 微信小程序-统一下单、微信支付(Java后台)

    1.首先分享 微信统一下单接口: https://pay.weixin.qq.com/wiki/doc/api/jsapi.php?chapter=9_1   微信接口 签名 对比网址: https: ...

  4. C语言 > 数组和指针

    C语言 数组和指针 const: 关于指针和const需要注意一些规则.首先,把const数据或非const数据的地址初始化为指向const的指针或为其赋值是合法的. 然而,只能把非const数据的地 ...

  5. 如何在Visual Studio和CodeBlocks中反编译C++代码

    在Visual Studio中 第一步:打断点 第二步:Debug->Star Debugging 或直接按"F5" 第三步:Debug->Windows->Di ...

  6. cmd命令行下登陆备份导入导出msql数据

    1.进入服务,找到mysql服务,在属性里找到mysql的安装路径 2.登陆  mysql -h 192.168.0.11 -P 3310 -u root -p 如果是访问的本机并且端口是默认的,那么 ...

  7. 使用WordPress搭建的网站如何使URL中不出现”wordpress”

    问题描述: 当我们在服务器中安装WordPress时,通常,WordPress默认是将WordPress的文件安装到了一个名为"wordpress"的文件夹里.这样在一般情况下,如 ...

  8. Nginx+Tomcat搭建高性能负载均衡集群

    一.       工具   nginx-1.8.0 apache-tomcat-6.0.33 二.    目标   实现高性能负载均衡的Tomcat集群: 三.    步骤   1.首先下载Nginx ...

  9. ASP.NET CORE Linux发布工具(文件对比 只上传差异文件;自动启停WebServer命令;上传完成自动预热WebServer)

    最近这几日在搞一个小网站:教你啊 :(感兴趣的朋友可以来捧场,在这个网站上有任何消费我都可以退还) 由于更新频繁,手动更新特别麻烦,于是开发了这个小工具 用了一段时间,还是挺顺手的,同时.NET Co ...

  10. 关于基线baseline及与inline-block、vertical-aline等属性的关系(完善中.......)

    1. 基本含义 基线(base line):而是英文字母x的下端沿,是a,c,z,x等字母的底边线,并不是汉字文字的下端沿,.下图的红色线即为基线.凡是涉及到垂直方向的排版或者对齐的,都离不开最最基本 ...