zipkin的安装与搭建
zipkin是分布式链路调用监控系统,聚合各业务系统调用延迟数据,达到链路调用监控跟踪。
下载与部署
- wget -O zipkin.jar 'https://search.maven.org/remote_content?g=io.zipkin.java&a=zipkin-server&v=LATEST&c=exec'
jar中yaml文件配置
- zipkin:
- self-tracing:
- # Set to true to enable self-tracing.
- enabled: ${SELF_TRACING_ENABLED:false}
- # percentage to self-traces to retain
- sample-rate: ${SELF_TRACING_SAMPLE_RATE:1.0}
- # Timeout in seconds to flush self-tracing data to storage.
- message-timeout: ${SELF_TRACING_FLUSH_INTERVAL:1}
- collector:
- # percentage to traces to retain
- sample-rate: ${COLLECTOR_SAMPLE_RATE:1.0}
- http:
- # Set to false to disable creation of spans via HTTP collector API
- enabled: ${HTTP_COLLECTOR_ENABLED:true}
- kafka:
- # ZooKeeper host string, comma-separated host:port value.
- zookeeper: ${KAFKA_ZOOKEEPER:}
- # Name of topic to poll for spans
- topic: ${KAFKA_TOPIC:zipkin}
- # Consumer group this process is consuming on behalf of.
- group-id: ${KAFKA_GROUP_ID:zipkin}
- # Count of consumer threads consuming the topic
- streams: ${KAFKA_STREAMS:1}
- # Maximum size of a message containing spans in bytes
- max-message-size: ${KAFKA_MAX_MESSAGE_SIZE:1048576}
- rabbitmq:
- # RabbitMQ server address list (comma-separated list of host:port)
- addresses: ${RABBIT_ADDRESSES:}
- concurrency: ${RABBIT_CONCURRENCY:1}
- # TCP connection timeout in milliseconds
- connection-timeout: ${RABBIT_CONNECTION_TIMEOUT:60000}
- password: ${RABBIT_PASSWORD:guest}
- queue: ${RABBIT_QUEUE:zipkin}
- username: ${RABBIT_USER:guest}
- virtual-host: ${RABBIT_VIRTUAL_HOST:/}
- useSsl: ${RABBIT_USE_SSL:false}
- uri: ${RABBIT_URI:}
- query:
- enabled: ${QUERY_ENABLED:true}
- # 1 day in millis
- lookback: ${QUERY_LOOKBACK:86400000}
- # The Cache-Control max-age (seconds) for /api/v1/services and /api/v1/spans
- names-max-age: 300
- # CORS allowed-origins.
- allowed-origins: "*"
- storage:
- strict-trace-id: ${STRICT_TRACE_ID:true}
- search-enabled: ${SEARCH_ENABLED:true}
- type: ${STORAGE_TYPE:mem}
- mem:
- # Maximum number of spans to keep in memory. When exceeded, oldest traces (and their spans) will be purged.
- # A safe estimate is 1K of memory per span (each span with 2 annotations + 1 binary annotation), plus
- # 100 MB for a safety buffer. You'll need to verify in your own environment.
- # Experimentally, it works with: max-spans of 500000 with JRE argument -Xmx600m.
- max-spans: 500000
- cassandra:
- # Comma separated list of host addresses part of Cassandra cluster. Ports default to 9042 but you can also specify a custom port with 'host:port'.
- contact-points: ${CASSANDRA_CONTACT_POINTS:localhost}
- # Name of the datacenter that will be considered "local" for latency load balancing. When unset, load-balancing is round-robin.
- local-dc: ${CASSANDRA_LOCAL_DC:}
- # Will throw an exception on startup if authentication fails.
- username: ${CASSANDRA_USERNAME:}
- password: ${CASSANDRA_PASSWORD:}
- keyspace: ${CASSANDRA_KEYSPACE:zipkin}
- # Max pooled connections per datacenter-local host.
- max-connections: ${CASSANDRA_MAX_CONNECTIONS:8}
- # Ensuring that schema exists, if enabled tries to execute script /zipkin-cassandra-core/resources/cassandra-schema-cql3.txt.
- ensure-schema: ${CASSANDRA_ENSURE_SCHEMA:true}
- # 7 days in seconds
- span-ttl: ${CASSANDRA_SPAN_TTL:604800}
- # 3 days in seconds
- index-ttl: ${CASSANDRA_INDEX_TTL:259200}
- # the maximum trace index metadata entries to cache
- index-cache-max: ${CASSANDRA_INDEX_CACHE_MAX:100000}
- # how long to cache index metadata about a trace. 1 minute in seconds
- index-cache-ttl: ${CASSANDRA_INDEX_CACHE_TTL:60}
- # how many more index rows to fetch than the user-supplied query limit
- index-fetch-multiplier: ${CASSANDRA_INDEX_FETCH_MULTIPLIER:3}
- # Using ssl for connection, rely on Keystore
- use-ssl: ${CASSANDRA_USE_SSL:false}
- cassandra3:
- # Comma separated list of host addresses part of Cassandra cluster. Ports default to 9042 but you can also specify a custom port with 'host:port'.
- contact-points: ${CASSANDRA_CONTACT_POINTS:localhost}
- # Name of the datacenter that will be considered "local" for latency load balancing. When unset, load-balancing is round-robin.
- local-dc: ${CASSANDRA_LOCAL_DC:}
- # Will throw an exception on startup if authentication fails.
- username: ${CASSANDRA_USERNAME:}
- password: ${CASSANDRA_PASSWORD:}
- keyspace: ${CASSANDRA_KEYSPACE:zipkin2}
- # Max pooled connections per datacenter-local host.
- max-connections: ${CASSANDRA_MAX_CONNECTIONS:8}
- # Ensuring that schema exists, if enabled tries to execute script /zipkin2-schema.cql
- ensure-schema: ${CASSANDRA_ENSURE_SCHEMA:true}
- # how many more index rows to fetch than the user-supplied query limit
- index-fetch-multiplier: ${CASSANDRA_INDEX_FETCH_MULTIPLIER:3}
- # Using ssl for connection, rely on Keystore
- use-ssl: ${CASSANDRA_USE_SSL:false}
- elasticsearch:
- # host is left unset intentionally, to defer the decision
- hosts: ${ES_HOSTS:}
- pipeline: ${ES_PIPELINE:}
- max-requests: ${ES_MAX_REQUESTS:64}
- timeout: ${ES_TIMEOUT:10000}
- aws:
- domain: ${ES_AWS_DOMAIN:}
- region: ${ES_AWS_REGION:}
- index: ${ES_INDEX:zipkin}
- date-separator: ${ES_DATE_SEPARATOR:-}
- index-shards: ${ES_INDEX_SHARDS:5}
- index-replicas: ${ES_INDEX_REPLICAS:1}
- username: ${ES_USERNAME:}
- password: ${ES_PASSWORD:}
- http-logging: ${ES_HTTP_LOGGING:}
- legacy-reads-enabled: ${ES_LEGACY_READS_ENABLED:true}
- mysql:
- host: ${MYSQL_HOST:localhost}
- port: ${MYSQL_TCP_PORT:3306}
- username: ${MYSQL_USER:}
- password: ${MYSQL_PASS:}
- db: ${MYSQL_DB:zipkin}
- max-active: ${MYSQL_MAX_CONNECTIONS:10}
- use-ssl: ${MYSQL_USE_SSL:false}
- ui:
- enabled: ${QUERY_ENABLED:true}
- ## Values below here are mapped to ZipkinUiProperties, served as /config.json
- # Default limit for Find Traces
- query-limit: 10
- # The value here becomes a label in the top-right corner
- environment:
- # Default duration to look back when finding traces.
- # Affects the "Start time" element in the UI. 1 hour in millis
- default-lookback: 3600000
- # When false, disables the "find a trace" screen
- search-enabled: ${SEARCH_ENABLED:true}
- # Which sites this Zipkin UI covers. Regex syntax. (e.g. http:\/\/example.com\/.*)
- # Multiple sites can be specified, e.g.
- # - .*example1.com
- # - .*example2.com
- # Default is "match all websites"
- instrumented: .*
- # URL placed into the <base> tag in the HTML
- base-path: /zipkin/
- server:
- port: ${QUERY_PORT:9411}
- use-forward-headers: true
- compression:
- enabled: true
- # compresses any response over min-response-size (default is 2KiB)
- # Includes dynamic json content and large static assets from zipkin-ui
- mime-types: application/json,application/javascript,text/css,image/svg
- spring:
- mvc:
- favicon:
- # zipkin has its own favicon
- enabled: false
- autoconfigure:
- exclude:
- # otherwise we might initialize even when not needed (ex when storage type is cassandra)
- - org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration
- info:
- zipkin:
- version: "2.7.1"
- logging:
- pattern:
- level: "%clr(%5p) %clr([%X{traceId}/%X{spanId}]){yellow}"
- level:
- # Silence Invalid method name: '__can__finagle__trace__v3__'
- com.facebook.swift.service.ThriftServiceProcessor: 'OFF'
- # # investigate /api/v1/dependencies or /api/v2/dependencies
- # zipkin2.internal.DependencyLinker: 'DEBUG'
- # # log cassandra queries (DEBUG is without values)
- # com.datastax.driver.core.QueryLogger: 'TRACE'
- # # log cassandra trace propagation
- # com.datastax.driver.core.Message: 'TRACE'
- # # log reason behind http collector dropped messages
- # zipkin.server.ZipkinHttpCollector: 'DEBUG'
- # zipkin.collector.kafka.KafkaCollector: 'DEBUG'
- # zipkin.collector.kafka10.KafkaCollector: 'DEBUG'
- # zipkin.collector.rabbitmq.RabbitMQCollector: 'DEBUG'
- # zipkin.collector.scribe.ScribeCollector: 'DEBUG'
- management:
- security:
- # do not lock-down metrics by default
- # https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-1.5-Release-Notes#actuator-security
- enabled: false
启动传入并参数
- java -Dzipkin.collector.kafka.overrides.auto.offset.reset=largest -DSTORAGE_TYPE=elasticsearch -DES_HOSTS=http://10.1.1.2:9200,http://10.1.1.3:9200,http://10.1.1.4:9200,http://10.1.1.5:9200 -jar /usr/local/zipkin/zipkin.jar -DKAFKA_TOPIC=log4go -DKAFKA_ZOOKEEPER=10.2.1.2:2181,10.2.1.3:2181,10.2.1.4:2181/kafka --logging.level.zipkin=DEBUG
web界面
Sun Feb 24 08:31:33 CST 2019
原文地址:https://linuxeye.com/468.html
zipkin的安装与搭建的更多相关文章
- docker+kafka+zookeeper+zipkin的安装
1. 启动zookeeper容器 docker search zookeeper docker pull wurstmeister/zookeeper docker run -d --name zoo ...
- APPIUM安装与搭建Q&A
APPIUM安装与搭建Q&A Q1:在线安装TESTNG插件时,出现安装失败,提示:Cannot complete the install because one or more requir ...
- Cloudera Manager安装_搭建CDH集群
2017年2月22日, 星期三 Cloudera Manager安装_搭建CDH集群 cpu 内存16G 内存12G 内存8G 默认单核单线 CDH1_node9 Server || Agent ...
- node.js 下载安装及gitbook环境安装、搭建
最近需要gitbook看文档,于是各种百度,各种安装,很多都是无法正常安装完成的,比较纠结啊 最后,终于发现一个好用的,现分享一下地址(也是给自己做个记录): 1.node.js下载地址: http: ...
- XMPP(一)-openfire服务端的安装和搭建
XMPP全称:可扩展通讯和表示协议 简介:可扩展通讯和表示协议 (XMPP) 可用于服务类实时通讯.表示和需求响应服务中的XML数据元流式传输.XMPP以Jabber协议为基础,而Jabber是即时通 ...
- SVN服务端和客户端的安装与搭建
版权声明:本文为博主原创文章,转载请注明原文出处. https://blog.csdn.net/zzfenglin/article/details/50931462 SVN简介 SVN全名Subver ...
- linux下安装EJBCA 搭建私有CA服务器
linux下安装EJBCA 搭建私有CA服务器 EJBCA是一个全功能的JAVA的CA系统软件,我们可以用此搭建私有CA服务器: 一:首先我的测试环境: 1. linux mint18.3 62位: ...
- lnmp的环境的安装和搭建
上次中,记录了lamp的环境的搭建和安装,这一次说一下lnmp环境的安装和搭建,下面是详细的安装步骤: 一. 先是Mysql的安装步骤,其实和上次的一样: ): 编译安装MySQL +-------- ...
- zookeeper和dubbo安装与搭建
Zookeeper+Dubbo安装与搭建 (原创:黑小子-余) 本文有借鉴:https://www.cnblogs.com/UncleYong/p/10737119.html (一)zookeeper ...
随机推荐
- 和jz姐姐的vp记录
即使如此,jz姐姐也漂亮的取得了胜利 有些懒得写直接口胡,所以代码也不一定有 暂时停更了 2015-2016 Petrozavodsk Winter Training Camp, Makoto rng ...
- 四种CSS样式的引入方式
准备 1.首先准备一个html文件:test.html,不建议使用记事本创建文件,建议使用Notepad++来创建并编辑文件,注意编码格式为:以UTF-8无BOM格式编码,否则会出现中文乱码,内容如下 ...
- fxjwind Calcite分析 - Volcano模型
参考,https://matt33.com/2019/03/17/apache-calcite-planner/ Volcano模型使用,分为下面几个步骤, //1. 初始化 VolcanoPlann ...
- [转]小D课堂 - 零基础入门SpringBoot2.X到实战_汇总
原文地址:https://www.cnblogs.com/wangjunwei/p/11392825.html 第1节零基础快速入门SpringBoot2.0 小D课堂 - 零基础入门SpringBo ...
- vue---数据列表过滤筛选
使用vue进行数据过滤筛选是比较常用的功能,常见的使用场景就是搜索框数据筛选过滤了.简单示例: <template> <div> <input type="te ...
- 爬虫urllib2 的异常错误处理URLError和HTTPError
urllib2 的异常错误处理 在我们用urlopen或opener.open方法发出一个请求时,如果urlopen或opener.open不能处理这个response,就产生错误. 这里主要说的是U ...
- Cache管理机制(System.Web.Caching)
一,System .Web.Caching与缓存工作机制简介 System.Web.Caching是用来管理缓存的命名空间,其父级空间是System.Web,由此可见,缓存通常用于Web网站的开发,包 ...
- 【转载】 【TensorFlow】static_rnn 和dynamic_rnn的区别
原文地址: https://blog.csdn.net/qq_20135597/article/details/88980975 ----------------------------------- ...
- Laravel 使用自己的类库三种方式
虽然Composer使得我们可以重用很多现有的类库(例如packagist.org中的),但是我们仍然可能用到一些不兼容composer的包或者类库.另外在某一项目中,我们也可能会创建某一类库,而且可 ...
- 深入理解Flink ---- 系统内部消息传递的exactly once语义
At Most once,At Least once和Exactly once 在分布式系统中,组成系统的各个计算机是独立的.这些计算机有可能fail. 一个sender发送一条message到rec ...