8

My setup is spring boot cloud using netflix library I managed to have Turbine aggregating Hystrix metrics from one service. However when I add more services I cant see them.

This is my setup (also uploaded this into github at: Project On Github

Service 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

service 2:

Coupon service:

@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 app service:

@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

and finally Turbine-service:

  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.

What am i doing wrong? why I cant actually aggregate both services hystrix metrics(flight-integration service,coupon-service) Thank you.

Bertrand Renuart
  • 1,608
  • 17
  • 24
rayman
  • 20,786
  • 45
  • 148
  • 246
  • Have you tried uncommenting the section with turbine.aggregator, then add `?cluster=FLIGHT-INTEGRATION-SERVICE` or `?cluster=COUPON-SERVICE` to the turbine url you put in the hystrix dashboard? – spencergibb Jun 03 '15 at 00:03
  • But if I add LIGHT-INTEGRATION-SERVICE or ?cluster=COUPON-SERVICE than I will aggregate one service at a time. I would like to see all services together on turbine. – rayman Jun 03 '15 at 06:06
  • That's is not how turbine is built by default. spring-cloud-netflix-turbine-amqp aggregates all services. https://github.com/spring-cloud/spring-cloud-netflix/tree/master/spring-cloud-netflix-turbine-amqp – spencergibb Jun 04 '15 at 16:33
  • Could you show me an example or a link how I should implement this in a way of having turbine aggregating all hystrix commmands metrics into hystrixdashboard ? – rayman Jun 04 '15 at 16:56
  • 1
    https://github.com/spring-cloud-samples/customers-stores/blob/master/pom.xml#L60 uses spring-cloud-netflix-turbine-amqp. And here are some intro docs http://projects.spring.io/spring-cloud/docs/1.0.1/spring-cloud.html#_turbine_amqp – spencergibb Jun 04 '15 at 20:53

1 Answers1

3

solved by @spencergibb suggestation. I added to each of the client the dependency of spring-boot-starter-amqp and created rabbitMQ broker. Turbine is aggregating all messages via amqp and I was able to see all Hystrix commands aggregated on my hystrix dashboard server

rayman
  • 20,786
  • 45
  • 148
  • 246
  • Can you please share your working code sample in github ... I am also experiencing the same issue... – PKumar Sep 15 '16 at 04:27