Spring Cloud:Hystrix 监控面板【Finchley 版】Unable to connect to Command Metric Stream

本文介绍两种在Spring Boot 2.0.0版本中配置Hystrix监控流的方法。第一种是在bootstrap.properties文件中设置暴露Hystrix.stream端点;第二种是通过自定义配置类实现。这些方法使开发人员能够有效监控服务熔断状态。


(1)方法一:version 2.0.0.
management.endpoints.web.exposure.include=hystrix.stream" adding in bootstrap.properties;
and the url was change to "http://host:port/actuator/hystrix.stream", it is ok.

also,"management.endpoints.web.base-path=/ " can make "http://host:port/hystrix.stream" work.

(2)方法二:version 2.0.0.

@configuration
public class HystrixServletDefinitions {

@Bean(name = "hystrixRegistrationBean")
public ServletRegistrationBean servletRegistrationBean() {
    ServletRegistrationBean registration = new ServletRegistrationBean(
            new HystrixMetricsStreamServlet(), "/hystrix.stream");
    registration.setName("hystrixServlet");
    registration.setLoadOnStartup(1);
    return registration;
}

}

解决链接:https://github.com/Netflix/Hystrix/issues/1566

解决链接:https://blog.youkuaiyun.com/qq_22772259/article/details/79812026

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值