Unable to connect to Command Metric Stream for Hystrix Dashboard with Spring Cloud

For those who are using spring boot 2, the hystrix.stream endpoint has been moved to /actuator/hystrix.stream.

For me this url worked:

http://localhost:8082/actuator/hystrix.stream

And yes, have this actuator endpoint enabled via following property:

management.endpoints.web.exposure.include=hystrix.stream

Of course you must have the actutator dependency included in your project.


I was able to solve this issue for the spring-boot-starter-parent version 2.0.7.RELEASE and spring-cloud-dependencies version Finchley.SR2 by adding below two properties in the application.properties.

management.endpoints.web.exposure.include=*
management.endpoints.web.base-path=/

enter image description here


Hystrix dashboard itself can't be used for monitoring several instances at once. The thing that you need is turbine+dashboard. In a couple of words turbine is an aggregator for several hystrix metrics streams.

Configuration of instance:

management:
  endpoints:
    web:
      exposure:
        include: hystrix.stream, info, health

spring:
  application:
    name: WRITING
eureka:
  client:
    serviceUrl:
      defaultZone: http://localhost:8761/eureka

The important thing here is to expose hystix.stream actuator. This endpoint will be used by the turbine to read metrics. Also, do not forget to add actuators starter.

   <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-actuator</artifactId>
   </dependency>

If you did everything correctly http://localhost:8080/actuator/hystrix.stream endpoint should become available.

Turbine config will look like:

server:
      port: 8888

spring:
  application:
    name: TURBINE

eureka:
  client:
    registerWithEureka: true
    fetchRegistry: true
    serviceUrl:
      defaultZone: http://localhost:8761/eureka/

turbine:
  appConfig: WRITING,READING
  clusterNameExpression: new String('default')

In appConfig, you should specify service names for monitoring.

After starting turbine localhost:8888/turbine.stream will be available.

You can pass this URL to the dashboard and monitor all data aggregated for hystrix commands of discovered instances.

Github project example.

p.s. Dependencies that you have used are deprecated. Please check maven repo