Eureka客户端-Hystrix的集群监控页面(Turbine)

1、pom.xml

    
        1.8
        Finchley.SR1
    
    
        
            
                org.springframework.cloud
                spring-cloud-dependencies
                ${spring-cloud.version}
                pom
                import
            
        
    

    
        
            org.springframework.boot
            spring-boot-starter
        

        
            org.springframework.boot
            spring-boot-starter-test
            test
        
        
            org.springframework.cloud
            spring-cloud-starter-netflix-turbine
        
    

2、application.yml

spring:
  application:
    name: eureka-client-hystrix-turbine
server:
  port: 8606
eureka:
  instance:
    prefer-ip-address: true
  client:
    service-url:
      defaultZone: http://localhost:8761/eureka/
turbine:
#  aggregator:
#    clusterConfig: EUREKA-CLIENT-CONSUMER-FEIGN-HYSTRIX
#  appConfig: eureka-client-consumer-feign-hystrix

  aggregator:
    clusterConfig: default
  appConfig: eureka-client-consumer-feign-hystrix,eureka-client-consumer-ribbon-hystrix
  cluster-name-expression: "'default'"
#这两种分别是针对同一种用户的集群和多种用户的集群

3、启动类

@EnableTurbine
@SpringBootApplication
public class EurekaClientHystrixTurbineApplication {

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

}

4、针对于application.yml中注释掉的那种模式dashboard的页面

Eureka客户端-Hystrix的集群监控页面(Turbine)_第1张图片

Eureka客户端-Hystrix的集群监控页面(Turbine)_第2张图片

5、针对于application.yml中没有注释的那种模式dashboard的页面

Eureka客户端-Hystrix的集群监控页面(Turbine)_第3张图片

Eureka客户端-Hystrix的集群监控页面(Turbine)_第4张图片

你可能感兴趣的:(SpringCloud)