Muatik
Muatik

Reputation: 4171

spring-boot actuator healthcheck events

Is it possible to listen an event emitted when there is a change in one of the health check indicators? So that I can have an ApplicationListener on this type of events?

Upvotes: 5

Views: 1405

Answers (1)

b0gusb
b0gusb

Reputation: 4701

I had a similar need and I investigated a little bit.

The health information is retrieved on a pull-based manner when the actuator endpoint gets called. The health indicators don't get updated when the underlying status changes, so a listener would be more or less useless.

Nevertheless, one could still implement a custom health indicator that listen to events and propagates them to other listeners.

Upvotes: 3

Related Questions