Моя настройка — облако весенней загрузки с использованием библиотеки netflix. Мне удалось заставить Turbine агрегировать показатели Hystrix из одного сервиса. Однако, когда я добавляю дополнительные службы, я их не вижу.
Это моя установка (также загружена на github по адресу: Project On 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
Служба приложений Эврика:
@SpringBootApplication
@EnableEurekaServer
public class EurekaApplication {
Hystrix dashboard service:
@SpringBootApplication
@EnableHystrixDashboard
@Controller
public class HystrixDashboardApplication {
приложение.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}
bootstrap.yaml
spring:
application:
name: hystrixdashboard
и, наконец, Турбина-сервис:
EnableAutoConfiguration
@EnableTurbine
@EnableEurekaClient
@EnableHystrixDashboard
public class TurbineApplication {
приложение.yaml:
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 metrics (служба интеграции полетов, служба купонов) Спасибо.
?cluster=FLIGHT-INTEGRATION-SERVICE
или?cluster=COUPON-SERVICE
к URL-адресу турбины, который вы указали на панели управления hystrix? - person spencergibb   schedule 03.06.2015