Hystrix监控问题

Hystrix监控问题:
web

pom.xml:spring

 
  <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>
浏览器

在q启动类上加上注解:app

@SpringBootApplication
@EnableHystrixDashboard
spring-boot

 

启动后:访问 http://127.0.0.1:8030/hystrix.stream 没问题google

监控某个服务时:一致出现loadingspa

解决:1.手动访问监控的APIxml

 2.更换浏览器(google)io

3.application.properties在配置中加入:management.endpoints.web.exposure.include="*"class

二:使用Turbine监控

须要添加依赖:
  <dependency>
   <groupId>org.springframework.cloud</groupId>
   <artifactId>spring-cloud-starter-turbine</artifactId>
  </dependency>
  <dependency>
   <groupId>org.springframework.cloud</groupId>
   <artifactId>spring-cloud-netflix-turbine</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>

 在启动类上加上注解:

@SpringBootApplication@EnableHystrixDashboard@EnableTurbine

相关文章
相关标签/搜索