006服务监控看板Hystrix Dashboard
Posted TBBS
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了006服务监控看板Hystrix Dashboard相关的知识,希望对你有一定的参考价值。
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的主要内容,如果未能解决你的问题,请参考以下文章