docker zipkin 链路监控

yangyutong00 2020-04-16

docker zookeeper install

docker search zookeeper
docker pull wurstmeister/zookeeper:3.4.13  #如果版本不存在就不加版本号
docker run -d --name zookeeper --restart=always -p 2181:2181 -t wurstmeister/zookeeper3.4.13

docker Kafka install

docker search kafka
docker pull wurstmeister/kafka:2.1.1   #如果版本不存在则去掉版本号
//docker run -d --name kafka --restart=always --publish 9092:9092 --link zookeeper --env KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181 --env KAFKA_ADVERTISED_HOST_NAME=10.0.1.66 --env KAFKA_ADVERTISED_PORT=9092 --volume /etc/localtime:/etc/localtime wurstmeister/kafka:latest
docker run -d --name kafka --restart=always -p 9092:9092 --env KAFKA_ADVERTISED_HOST_NAME=10.0.1.66 --env KAFKA_ADVERTISED_PORT=9092 -e KAFKA_BROKER_ID=0 \ 
-e KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181 \ 
-e KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://10.0.1.66:9092 -e KAFKA_LISTENERS=PLAINTEXT://0.0.0.0:9092 --volume /etc/localtime:/etc/localtime -t wurstmeister/kafka:2.1.1

check kafka status

docker exec -ti kafka /bin/bash
cd /opt/kafka_2.12-1.1.0/
bin/kafka-topics.sh --create --zookeeper zookeeper:2181 --replication-factor 1 --partitions 1 --topic zipkin
bin/kafka-topics.sh --describe --zookeeper zookeeper:2181 --topic zipkin //查看

docker zipkin web-ui install

docker pull openzipkin/zipkin:2.12.6
docker run -it -d --restart=always -e KAFKA_BOOTSTRAP_SERVERS=10.0.1.66:9092 -e STORAGE_TYPE=elasticsearch -e ES_HOSTS=http://10.0.1.66:9200 -p 9411:9411 openzipkin/zipkin:2.12.6

access zipkin web

浏览器访问zipkin地址:
http://宿主机IP:9411/zipkin

相关推荐