Моя настройка - весеннее облако загрузки с использованием библиотеки netflix. Мне удалось настроить агрегаты Hystrix с турбинами с одной службы. Однако, когда я добавляю больше услуг, я не вижу их.Как добавить в 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
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}
bootstrap.yaml
spring:
application:
name: hystrixdashboard
и, наконец, турбинный-служба:
EnableAutoConfiguration
@EnableTurbine
@EnableEurekaClient
@EnableHystrixDashboard
public class TurbineApplication {
application.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.
Что я делаю неправильно? почему я не могу на самом деле агрегировать показатели харизматизации сервисов (служба интеграции рейсов, купон-сервис) Спасибо.
Вы пробовали раскомментировать раздел с turbine.aggregator, а затем добавить '? Cluster = FLIGHT-INTEGRATION-SERVICE' или' ? cluster = COUPON-SERVICE' к URL-адресу турбины, который вы помещаете в приборную панель hystrix? – spencergibb
Но если я добавлю LIGHT-INTEGRATION-SERVICE или? Cluster = COUPON-SERVICE, я буду агрегировать одну услугу за раз. Я хотел бы видеть все услуги вместе на турбине. – rayman
Это не то, как турбина построена по умолчанию. spring-cloud-netflix-turbine-amqp объединяет все сервисы. https://github.com/spring-cloud/spring-cloud-netflix/tree/master/spring-cloud-netflix-turbine-amqp – spencergibb