【问题标题】:Hystrix Turbine aggregate dataHystrix Turbine 聚合数据
【发布时间】:2017-10-24 06:54:16
【问题描述】:

我正在使用涡轮机来汇总来自 hystrix 的数据。当我尝试使用 hystrix(localhost:23002/hystrix.strean) 获取数据时,一切顺利。但是,当我尝试使用涡轮获取数据时,它什么也没显示。 这是我的配置。

server:  
    port: 23002  
spring:  
    application:  
      name: hystrix-1  
eureka:  
    client:  
    serviceUrl:  
      defaultZone: http://t2.dcfservice.com:23001/eureka/  
  instance:  
    hostname: localhost  
    metadataMap:   
      cluster : MAIN  

spring:  
  application.name: microservice-hystrix-turbine  
server:  
  port: 23111  
security.basic.enabled: false  
turbine:  
  aggregator:  
    clusterConfig: MAIN       
    appConfig: hystrix-1  
    clusterNameExpression: metadata['cluster']  

eureka:  
  client:  
    serviceUrl:  
      defaultZone: http://t2.dcfservice.com:23001/eureka/ 

我可以通过 URL:localhost:23002/hystrix.stream 获取数据 我的目标是使用 URL localhost:23111/turbine.stream?cluster=MAIN

获取数据

【问题讨论】:

    标签: spring-cloud hystrix turbine


    【解决方案1】:

    如果您发布了您的 yml 与您的服务器中使用的确切缩进,则下面的缩进是错误的。

    turbine:  
      aggregator:  
        clusterConfig: MAIN       
      appConfig: hystrix-1  
      clusterNameExpression: metadata['cluster']  
    

    appConfigclusterNameExpression 必须是 turbine 的孩子,而不是 aggregator

    【讨论】:

      猜你喜欢
      • 2015-08-15
      • 2015-12-10
      • 1970-01-01
      • 2015-04-06
      • 2015-12-25
      • 2020-08-09
      • 2018-07-07
      • 2018-08-17
      • 2015-09-28
      相关资源
      最近更新 更多