spring cloud hystrix dashboard 没有/actuator/hystrix.stream路径解决
首先我用的是spring boot Greenwich.SR2
在测试hystrix-dashboard监控服务时,发现访问localhost:9001/actuator/hystrix.stream一直失败
去网上搜了一下,发现启动类要添加一个servlet
@Bean
public ServletRegistrationBean getServlet(){
HystrixMetricsStreamServlet streamServlet = new HystrixMetricsStreamServlet();
ServletRegistrationBean registrationBean = new ServletRegistrationBean(streamServlet);
registrationBean.setLoadOnStartup();
registrationBean.addUrlMappings("/actuator/hystrix.stream");
registrationBean.setName("HystrixMetricsStreamServlet");
return registrationBean;
}
要引入的依赖有以下
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-server</artifactId>
<version>2.1.2.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
<version>2.1.2.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-hystrix</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-archaius</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-hystrix-dashboard</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
spring cloud hystrix dashboard 没有/actuator/hystrix.stream路径解决的更多相关文章
- spring cloud(Greenwich.M2) hystrix dashboard 报/actuator/hystrix.stream 404 Not Found的问题
consumer端不引用spring-boot-starter-actuator的情况 Consumer端会报Unable to connect to Command Metric Stream.新建 ...
- Spring Boot,Spring Cloud,Eureka,Actuator,Spring Boot Admin,Stream,Hystrix
Spring Boot,Spring Cloud,Eureka,Actuator,Spring Boot Admin,Stream,Hystrix 一.Spring Cloud 之 Eureka. 1 ...
- Spring Cloud(五):Hystrix 监控面板【Finchley 版】
Spring Cloud(五):Hystrix 监控面板[Finchley 版] 发表于 2018-04-16 | 更新于 2018-05-10 | 在上一篇 Hystrix 的介绍中,我们提到 ...
- Spring Cloud(六):Hystrix 监控数据聚合 Turbine【Finchley 版】
Spring Cloud(六):Hystrix 监控数据聚合 Turbine[Finchley 版] 发表于 2018-04-17 | 更新于 2018-05-07 | 上一篇我们介绍了使用 H ...
- Spring Cloud(五):熔断监控Hystrix Dashboard和Turbine
Hystrix-dashboard是一款针对Hystrix进行实时监控的工具,通过Hystrix Dashboard我们可以在直观地看到各Hystrix Command的请求响应时间, 请求成功率等数 ...
- 玩转Spring Cloud之熔断降级(Hystrix)与监控
本文内容导航目录: 前言:解释熔断降级一.搭建服务消费者项目,并集成 Hystrix环境 1.1.在POM XML中添加Hystrix依赖(spring-cloud-starter-netflix-h ...
- Spring Cloud(5):Hystrix的使用
熔断:类似生活中的保险丝,电流过大就会熔断 降级:类似生活中的旅行,行李箱只有那么大,所以要抛弃一些非必需的物品 熔断降级应用: 某宝双十一商品下单,用户量巨大,于是考虑抛弃相关商品推荐等模块,确保该 ...
- spring cloud 系列第5篇 —— hystrix+turbine 服务的熔断与监控 (F版本)
源码Gitub地址:https://github.com/heibaiying/spring-samples-for-all 一.hystrix 简介 1.1 熔断器 在分布式系统中,由于服务之间相互 ...
- spring cloud深入学习(五)-----熔断器Hystrix
雪崩效应 在微服务架构中通常会有多个服务层调用,基础服务的故障可能会导致级联故障,进而造成整个系统不可用的情况,这种现象被称为服务雪崩效应.服务雪崩效应是一种因“服务提供者”的不可用导致“服务消费者” ...
随机推荐
- Tensorflow分布式部署和开发
关于tensorflow的分布式训练和部署, 官方有个英文的文档介绍,但是写的比较简单, 给的例子也比较简单,刚接触分布式深度学习的可能不太容易理解.在网上看到一些资料,总感觉说的不够通俗易懂,不如自 ...
- PHP中生成随机字符串,数字+大小写字母随机组合
简单的生成随机字符串: /* * 生成随机字符串 * * $length 字符串长度 */ function random_str($length) { // 密码字符集,可任意添加你需要的字符 $c ...
- IT兄弟连 HTML5教程 HTML5和JavaScript的关系
JavaScript可是实现HTML5重要语言.长久以来,JavaScript一直都是在HTML中实现动态效果的不二之选,而JavaScript在一些程序员眼里都是编程语言中的二等公民.早先,它经常是 ...
- Linux目录结构-下部
第1章 /etc目录 1.1 /etc/inittab 1.1.1 查看当前系统的运行级别 [root@nfsnobody ~]# runlevel N 3##查看系统当前运行级别 后面的数字表示当前 ...
- [LeetCode#184]Department Highest Salary
The Employee table holds all employees. Every employee has an Id, a salary, and there is also a colu ...
- JS setInterval 循环定时器的使用 以及动态倒计时展示
例: var setTime = setInterval(function () { ff(); //每秒调用的方法函数 }, 1000); //1000毫秒为1秒 //可使用 clearInterv ...
- Idea导出jar包运行报错:找不到主清单属性解决方法
解决方法 1.打开项目结构 2.创建一个Artifact 3.设置 我这里使用的maven,所以有resources文件夹 4.创建lib文件夹 右键output diretory,选择创建文件夹,名 ...
- 表达式树练习实践:C#判断语句
目录 表达式树练习实践:C#判断语句 if if...else switch ?? 和 ?: 表达式树练习实践:C#判断语句 判断语句 C# 提供了以下类型的判断语句: 语句 描述 if 一个 if ...
- go-变量
变量使用注意事项 变量三种声明方式 var i int //使用默认值 var num = 10.2 //类型推导 num := "tom" //左侧不能同名 //多变量声明 nu ...
- Java日期时间API系列7-----Jdk8中java.time包中的新的日期时间API类的特点
1.不变性 新的日期/时间API中,所有的类都是不可变的,这对多线程环境有好处. 比如:LocalDateTime 2.关注点分离 新的API将人可读的日期时间和机器时间(unix timestamp ...