1 依赖

<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.4.RELEASE</version>
</parent>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.8</java.version>
</properties>

<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-eureka</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-ribbon</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-hystrix</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-hystrix-dashboard</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
</dependencies>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>Camden.SR7</version>
<type>pom</type>
<scope>import</scope>
</dependency>

</dependencies>
</dependencyManagement>
</project>

2. 启动类

@SpringBootApplication
@EnableEurekaClient
@EnableHystrixDashboard
@EnableHystrix
@EnableCircuitBreaker
public class HystrixBoardApplication {

@Bean
@LoadBalanced
RestTemplate restTmeplate() {
return new RestTemplate();
}

public static void main(String[] args) {
SpringApplication.run(HystrixBoardApplication.class, args);
}

@Bean
public ServletRegistrationBean getServlet(){
HystrixMetricsStreamServlet streamServlet = new HystrixMetricsStreamServlet();
ServletRegistrationBean registrationBean = new ServletRegistrationBean(streamServlet);
registrationBean.setLoadOnStartup(1);
registrationBean.addUrlMappings("/actuator/hystrix.stream");
registrationBean.setName("HystrixMetricsStreamServlet");
return registrationBean;
}
}

3. 配置

server:
port: 8001
spring:
application:
name: hystrix-dashboard
eureka:
client:
serviceUrl:
defaultZone: http://admin:admin@ym-eureka-server1:8761/eureka/,http://admin:admin@ym-eureka-server2:8762/eureka/,http://admin:admin@ym-eureka-server3:8763/eureka/
instance:
preferIpAddress: true
hystrix:
command:
default:
execution:
isolation:
thread:
timeoutInMilliseconds: 4000
config:
stream:
maxConcurrentConnections: 50

spring cloud DashBoard的更多相关文章

  1. Spring Cloud项目之断路器集群监控Hystrix Dashboard

    微服务(Microservices Architecture)是一种架构风格,一个大型复杂软件应用由一个或多个微服务组成.系统中的各个微服务可被独立部署,各个微服务之间是松耦合的.每个微服务仅关注于完 ...

  2. Spring Cloud 2-Hystrix DashBoard仪表盘(五)

    Spring Cloud  Hystrix DashBoard  1.监控系统配置 pom.xml application.yml Application.java 2.被监控服务配置 pom.xml ...

  3. Spring Cloud 入门教程(八): 断路器指标数据监控Hystrix Dashboard 和 Turbine

    1. Hystrix Dashboard (断路器:hystrix 仪表盘)  Hystrix一个很重要的功能是,可以通过HystrixCommand收集相关数据指标. Hystrix Dashboa ...

  4. spring cloud Hystrix监控面板Hystrix Dashboard和Turbine

    我们提到断路器是根据一段时间窗内的请求情况来判断并操作断路器的打开和关闭状态的.而这些请求情况的指标信息都是HystrixCommand和HystrixObservableCommand实例在执行过程 ...

  5. Spring Boot + Spring Cloud 构建微服务系统(五):熔断监控面板(Hystrix Dashboard)

    Hystrix Dashboard Hystrix-dashboard是一款针对Hystrix进行实时监控的工具,通过Hystrix Dashboard我们可以在直观地看到各Hystrix Comma ...

  6. 【spring cloud】spring cloud2.X spring boot2.0.4调用feign配置Hystrix Dashboard 和 集成Turbine 【解决:Hystrix仪表盘Unable to connect to Command Metric Stream】【解决:Hystrix仪表盘Loading...】

    环境: <java.version>1.8</java.version><spring-boot.version>2.0.4.RELEASE</spring- ...

  7. spring cloud图形化dashboard是如何实现指标的收集展示的

    spring cloud图形化dashboard是如何实现指标的收集展示的 1.dashboard图形化界面入口 http://localhost:10000/hystrix.stream 说明:端口 ...

  8. 微服务架构之spring cloud hystrix&hystrix dashboard

    在前面介绍spring cloud feign中我们已经使用过hystrix,只是没有介绍,spring cloud hystrix在spring cloud中起到保护微服务的作用,不会让发生的异常无 ...

  9. Hystrix + Hystrix Dashboard搭建(Spring Cloud 2.X)

    本机IP为  192.168.1.102 一.搭建Hystrix Dashboard 1.   新建 Maven 项目  hystrix-dashboard 2. pom.xml <projec ...

随机推荐

  1. VSCODE includePath 中使用系统中的变量

    使用 ${env.ENVNAME}  这样只需要在 系统中加一个系统变量就可以. https://github.com/Microsoft/vscode-cpptools/issues/697

  2. Python中的类(classes)

    Python的类机制使用尽可能少的新语法和语义将类引入语言.python的类提供了面向对象程序设计语言所有的 标准特性:类继承机制允许有多个基类,一个派生类可以覆盖基类中的任何方法,一个方法可以使用相 ...

  3. SQL Server存储过程 对数组参数的循环处理

    方法一 分割 例:通过SQL Server存储过程传送数组参数删除多条记录 eg. ID 值为'1,2,3' 以下存储过程就是删除表中id号为1,2,3的记录: CREATE PROCEDURE De ...

  4. 解决EF一对一或多对一的删除

    people 类中有 zhengshu类 且是一对一,现在要删除people类中的zhengshu 网上看了N多办法,什么更新外键什么滴. 其实方法简单极了 using (KJExamEntity c ...

  5. 小峰mybatis(3)mybatis分页和缓存

    一.mybatis分页-逻辑分页和物理分页: 逻辑分页: mybatis内置的分页是逻辑分页:数据库里有100条数据,要每页显示10条,mybatis先把100条数据取出来,放到内存里,从内存里取10 ...

  6. 小峰servlet/jsp(5)jsp自定义标签

    一.自定义标签helloworld: 二.自定义有属性的标签: HelloWorldTag.java:继承TagSupport: package com.java1234.tag; import ja ...

  7. my sql 只展示 前10条数据的写法

    select * from 表 where 条件 limit 10 这里想看多少条 limit 后面的数字就是多少

  8. loadrunner怎么解决录制完成后脚本为空

    第一步: 第二步: 设置完后就Ok了

  9. 廖雪峰Java1-2程序基础-5浮点数运算

    1.浮点数运算的特点 很多浮点数无法精确表示 计算有误差 整型可以自动提升到浮点型 如0.1用二进制表示会是一个无限循环的小数.计算机不可能在有限内存中表示一个无限小数.因此浮点数不能精确表示.也造成 ...

  10. 最强数据集50个最佳机器学习公共数据,可以帮你验证idea!

    1.  寻找数据集の奥义 根据CMU的说法,寻找一个好用的数据集需要注意一下几点: 数据集不混乱,否则要花费大量时间来清理数据. 数据集不应包含太多行或列,否则会难以使用. 数据越干净越好,清理大型数 ...