Spring boot 如何在涡轮机中添加其他Hystrix指标聚合

Spring boot 如何在涡轮机中添加其他Hystrix指标聚合,spring-boot,spring-cloud,netflix,hystrix,turbine,Spring Boot,Spring Cloud,Netflix,Hystrix,Turbine,我的设置是使用netflix库的spring boot cloud 我设法让Turbine从一个服务聚合Hystrix指标。但是,当我添加更多服务时,我看不到它们 这是我的设置(也将其上传到github,网址为: 服务1: FlightIntegrationService: @SpringBootApplication @EnableCircuitBreaker @EnableDiscoveryClient @ComponentScan("com.bootnetflix") public cl

我的设置是使用netflix库的spring boot cloud 我设法让Turbine从一个服务聚合Hystrix指标。但是,当我添加更多服务时,我看不到它们

这是我的设置(也将其上传到github,网址为:

服务1:

FlightIntegrationService:

@SpringBootApplication
@EnableCircuitBreaker
@EnableDiscoveryClient
@ComponentScan("com.bootnetflix")
public class FlightIntegrationApplication {
..
}

application.yaml

server:
  port: 0

eureka:
  instance:
    leaseRenewalIntervalInSeconds: 10
    metadataMap:
      instanceId: ${vcap.application.instance_id:${spring.application.name}:${spring.application.instance_id:${random.value}}}
  client:
    registryFetchIntervalSeconds: 5

bootstrap.yaml

spring:
  application:
    name: flight-integration-service
服务2:

优惠券服务:

@SpringBootApplication
@EnableCircuitBreaker
@EnableDiscoveryClient
@ComponentScan("com.bootnetflix")
public class CouponServiceApp {
..
}

application yaml:

server:
  port: 0

eureka:
  instance:
    leaseRenewalIntervalInSeconds: 10
    metadataMap:
      instanceId: ${vcap.application.instance_id:${spring.application.name}:${spring.application.instance_id:${random.value}}}
  client:
    registryFetchIntervalSeconds: 5
Eureka应用程序服务:

@SpringBootApplication
@EnableEurekaServer
public class EurekaApplication  {



Hystrix dashboard service:

    @SpringBootApplication
    @EnableHystrixDashboard
    @Controller
    public class HystrixDashboardApplication  {
application.yaml:

info:
  component: Hystrix Dashboard

endpoints:
  restart:
    enabled: true
  shutdown:
    enabled: true

server:
  port: 7979

logging:
  level:
    ROOT: INFO
    org.springframework.web: DEBUG

eureka:
  client:
    region: default


    preferSameZone: false

    us-east-1:
      availabilityZones: default

  instance:
    virtualHostName: ${spring.application.name}
info:
  component: Turbine

PREFIX:

endpoints:
  restart:
    enabled: true
  shutdown:
    enabled: true

server:
  port: 8989

management:
  port: 8990



eureka:
  instance:
    leaseRenewalIntervalInSeconds: 10
  client:
      serviceUrl:
        defaultZone: http://localhost:8761/eureka/



#turbine:
 # aggregator:
  #  clusterConfig: FLIGHT-INTEGRATION-SERVICE,COUPON-SERVICE
  #appConfig: flight-integration-service,coupon-service


#turbine:
#  clusterNameExpression: 'default'
 # appConfig: flight-integration-service,coupon-service

turbine:
  appConfig: coupon-service,flight-integration-service
  clusterNameExpression: new String('default')




#As you can see I tried diff configurations.
bootstrap.yaml

spring:
  application:
    name: hystrixdashboard
最后是涡轮机服务:

  EnableAutoConfiguration
    @EnableTurbine
    @EnableEurekaClient
    @EnableHystrixDashboard
    public class TurbineApplication {
application.yaml:

info:
  component: Hystrix Dashboard

endpoints:
  restart:
    enabled: true
  shutdown:
    enabled: true

server:
  port: 7979

logging:
  level:
    ROOT: INFO
    org.springframework.web: DEBUG

eureka:
  client:
    region: default


    preferSameZone: false

    us-east-1:
      availabilityZones: default

  instance:
    virtualHostName: ${spring.application.name}
info:
  component: Turbine

PREFIX:

endpoints:
  restart:
    enabled: true
  shutdown:
    enabled: true

server:
  port: 8989

management:
  port: 8990



eureka:
  instance:
    leaseRenewalIntervalInSeconds: 10
  client:
      serviceUrl:
        defaultZone: http://localhost:8761/eureka/



#turbine:
 # aggregator:
  #  clusterConfig: FLIGHT-INTEGRATION-SERVICE,COUPON-SERVICE
  #appConfig: flight-integration-service,coupon-service


#turbine:
#  clusterNameExpression: 'default'
 # appConfig: flight-integration-service,coupon-service

turbine:
  appConfig: coupon-service,flight-integration-service
  clusterNameExpression: new String('default')




#As you can see I tried diff configurations.
我做错了什么?为什么我不能实际汇总这两项服务hystrix指标(航班集成服务、优惠券服务)
谢谢。

由@Spencergib Suggestion解决。我向每个客户端添加了spring boot starter amqp的依赖项,并创建了rabbitMQ代理。Turbine正在通过amqp聚合所有消息,我能够看到在我的Hystrix仪表板服务器上聚合的所有Hystrix命令。

您尝试过用Turbine.aggrega取消对该部分的注释吗tor,然后将
?cluster=FLIGHT-INTEGRATION-SERVICE
?cluster=COUPON-SERVICE
添加到您放在hystrix仪表板中的turbine url?但如果我添加LIGHT-INTEGRATION-SERVICE或?cluster=COUPON-SERVICE,我将一次聚合一个服务。我希望看到turbine上的所有服务都在一起。turbine不是这样的默认构建。spring cloud netflix turbine amqp聚合所有服务。您能给我一个示例或链接,让turbine将所有hystrix commmands指标聚合到hystrixdashboard中吗?使用spring cloud netflix turbine amqp。下面是一些介绍文档,您能分享一下您的工作代码吗在github的ple…我也遇到了同样的问题。。。