Spring Cloud学习--容错机制(Hystrix之Turbine集群监控)
来源:互联网 发布:笔记本电脑咋下载软件 编辑:程序博客网 时间:2024/06/05 07:25
使用Turbine聚合监控数据
除了使用/hystrix.stream端点监控单个微服务实例,可以使用Turbine将所有相关的/hystrix.stream聚合到一个组合的/turbine.stream中。
本文依据Hystrix,可见http://blog.csdn.net/u012482647/article/details/78148447 Spring Cloud学习–容错机制(Hystrix之服务降级)
1.创建一个spring boot项目,添加spring-cloud-starter-turbine依赖。
<dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-turbine</artifactId></dependency><dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator</artifactId></dependency>
2.在启动类上添加注解@EnableTurbine
@EnableTurbine@EnableDiscoveryClient@SpringBootApplicationpublic class SpringCloudTurbineApplication { public static void main(String[] args) { SpringApplication.run(SpringCloudTurbineApplication.class, args); }}
3.配置文件:
spring.applicaton.name=turbine-serviceserver.port=2002management.port=8990eureka.client.serviceUrl.defaultZone=http://localhost:8888/eureka/##turbine.app-config指定了要收集监控信息的服务名turbine.app-config=string-service##turbine.cluster-name-expression 指定集群名称turbine.cluster-name-expression="default"##使同一主机上的多个服务实例可以通过主机名和端口号的组合来进行区分turbine.combine-host-port=true
启动hystrix Dashboard项目,在url一栏中输入:http://localhost:2002/turbine.stream 出现如图界面
二、带你出坑
我在启动Turbine服务时,出现以下错误,导致出现不了如上界面。
com.netflix.turbine.monitor.instance.InstanceMonitor$MisconfiguredHostException: [{"timestamp":1506864554002,"status":404,"error":"Not Found","message":"No message available","path":"/string-service/hystrix.stream"}] at com.netflix.turbine.monitor.instance.InstanceMonitor.init(InstanceMonitor.java:318) ~[turbine-core-1.0.0.jar:na] at com.netflix.turbine.monitor.instance.InstanceMonitor.access$100(InstanceMonitor.java:103) ~[turbine-core-1.0.0.jar:na] at com.netflix.turbine.monitor.instance.InstanceMonitor$2.call(InstanceMonitor.java:235) [turbine-core-1.0.0.jar:na] at com.netflix.turbine.monitor.instance.InstanceMonitor$2.call(InstanceMonitor.java:229) [turbine-core-1.0.0.jar:na] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_131] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_131] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_131] at java.lang.Thread.run(Thread.java:748) [na:1.8.0_131]
这个问题,待解决后补充。
阅读全文
1 0
- Spring Cloud学习--容错机制(Hystrix之Turbine集群监控)
- Spring Cloud学习--容错机制(Hystrix DashBoard之数据监控)
- Spring Cloud中Hystrix仪表盘与Turbine集群监控
- Spring Cloud学习--容错机制(Hystrix之服务降级)
- Cloud中Hystrix仪表盘与Turbine集群监控
- Spring Cloud——断路器监控Hystrix Dashboard&Turbine
- Spring cloud系列十二 监控Hystrix界面:Hystrix dashboard 和 Turbine
- 05.Spring Cloud学习笔记之服务容错保护组件Hystrix
- hystrix 集群监控 turbine 及aop 开发hystrix
- Spring Cloud 之服务监控 turbine(六)
- springCloud学习02之断路器Hystrix-turbine监控-ribbo/feign对Hystrix的支持
- Spring Cloud Hystrix(服务容错保护)
- spring cloud--服务容错保护Hystrix
- 【Spring Cloud】Hystrix 防御机制
- Spring Cloud学习笔记4——服务容错保护Hystrix
- 微服务框架Spring Cloud: 在微服务系统中使用Hystrix, Hystrix Dashboard与Turbine
- spring cloud之Turbine(九)
- Spring Cloud入门教程(四):微服务容错保护(Hystrix)
- 1045. 快速排序(25)
- quartz 2.3.0 学习笔记
- 字符串反转
- php中字符串过滤strip_tags()函数实例详解
- Condition 控制线程通信
- Spring Cloud学习--容错机制(Hystrix之Turbine集群监控)
- 多线程:基本概念
- 随便写写
- ubuntu16.04 安装Sublime Text 3
- Solr搜索引擎(2)Solrj
- org.apache.spark.sql.AnalysisException: Try to map struct<>to Tuple1 异常
- <![CDATA[ ]]>和转义字符的使用
- malloc, calloc, realloc 使用及区别
- 快速排序算法C语言实现