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

相關文章
相關標籤/搜索