码迷,mamicode.com
首页 > 其他好文 > 详细

006服务监控看板Hystrix Dashboard

时间:2017-08-04 00:28:22      阅读:252      评论:0      收藏:0      [点我收藏+]

标签:manage   style   bsp   监控   res   imp   oca   enc   ble   

1、POM配置

  和普通Spring Boot工程相比,仅仅添加了Hystrix Dashboard和Spring Boot Starter Actuator依赖

<dependencies>
  <!--添加Turbine依赖-->   <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>Dalston.SR2</version>       <type>pom</type>       <scope>import</scope>       </dependency>   </dependencies> </dependencyManagement>

02、使能Eureka Server

@SpringBootApplication
@EnableHystrixDashboard//使能HystrixDashboard
public class Application {
    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);
    }
}

03、src/main/resources工程配置文件application.yml内容如下

spring:
  application:
    name: hystrix-dashboard
server:
  port: 4010
04、使用方法
  a)浏览器访问http://localhost:4010/hystrix.dashboard
  b)Hystrix Dashboard下输入http://localhost:4001/turbine.stream,点击Monitor Stream即可看到监控面板

006服务监控看板Hystrix Dashboard

标签:manage   style   bsp   监控   res   imp   oca   enc   ble   

原文地址:http://www.cnblogs.com/geniushuangxiao/p/7282675.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!