hystrix dashboard doesnt load metrix

Viewed 245

Experts,

In my spring boot 2.5.5 project with spring cloud version2020.0.4 and have configured Hystrix dashboard with the following dependency

 <dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-starter-netflix-hystrix-dashboard</artifactId>
    <version>2.2.9.RELEASE</version>
</dependency>

I have configured the fallbacks in the api gateway something like this

filters:
            - name: CircuitBreaker
              args:
                name: My-SERVICE
                fallbackuri: forward:/myServiceFallBack

API gateway is running on port: 9191

So far it's good. When I access the API's via API Gateway I can see the CircuirtBreaker kicking in and the request getting forwarded to the 'fallback URI' when needed.

Now when I access

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

I can see pings listed there as well

I call the end-user API endpoints via the API Gateway.

However, when I try to see the Hystrix Dashboard it's just loading. I don't see any issues in the browser console or network tab.

Any idea what is gone wrong here.

enter image description here

1 Answers

As I can see the problem is that you are missing a dependency. Hystrix dashboard will provide Hystrix stream and that would be available via Actuator endpoint, therefore Actuator dependency is also needed. Please add the following dependency and try.

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

Add the following line to the application properties in-order to allow all the Actuator endpoints.

# Allow all Actuator endpoints
management.endpoints.web.exposure.include=*

(Allowing all endpoints for testing purpose only and control access to each endpoint individually as required in production)

Related