Closed Hildebrand-Ritense closed 7 months ago
Hi @Hildebrand-Ritense,
thanks for opening this issue. Unfortunately this is not a bug but intended behavior as Spring Boot Admin does not poll for endpoints, when the state of an instance is either unknown or offline. This results in "missing" endpoint links in the detail view of an instance. The 'UNKNOWN' state is set, when a new instance is registered at Spring Boot Admin Server or a unregistration of the service/instance is in progress.
You wrote that "When the application is reporting 'HEALTHY' again", what assumes, that your service is switching between UNKNOWN and HEALTHY state, right? Have you checked, why this might happen (e.g. service crashes and restarts)?
Regards, SteKoe
Hi @SteKoe,
Thank you for your prompt response. Good to know this not a bug.
At our applications we deliberately use the 'UNKNOWN' health state in case part of the application is in a suboptimal condition. We have a custom health indicator that reports 'UNKNOWN' for this part of the application. Per the actuator docs: "Status indicating that the component or subsystem is in an unknown state". This is the status that most closely resembles the actual state.
We know the application is not down, nor out of service, but we want to indicate part of the application requires attention.
Missing the links in the UI doesn't really fit this situation. What's your advise here?
Hi @Hildebrand-Ritense,
I suggest to use "RESTRICTED" as state. This state indicates that the service has a problem, but it is neither down nor completely working as expected.
Hi @SteKoe,
I've been able to run some tests with the one health indicator returning the custom state RESTRICTED instead. The aggregate health status still seems to become 'UNKNOWN' however, so I'm not sure this is a solution. I guess this requires a custom StatusAggregator then?
-- edit: ignore the above. I just found our app already has a custom StatusAggregator. Let me look at that first...
@Hildebrand-Ritense, If I'm not missing something (with respect to the pull request attached), there's nothing which keeps us from closing this issue, right? Cheers, Uli
That's right, with your advice we changed our application code (see PR above) and all is now working well. Thank you!
Spring Boot Admin Server information
Version: 3.2.1
Spring Boot version: 3.0.2
Configured Security: Security filter filtering on IP
Webflux or Servlet application: I suppose Servlet.
Client information
Spring Boot versions: 2.5.2
Used discovery mechanism: self-registration
Webflux or Servlet application: I suppose Servlet.
Description
When the health state of an application is 'UNKNOWN', there are no links shown in the UI to the other endpoints (e.g. logging, log levels, etc.). When the application is reporting 'HEALTHY' again, the links are shown again in the menu.