spring-cloud-consul icon indicating copy to clipboard operation
spring-cloud-consul copied to clipboard

TTL Checks only report Pass, and ignore real health status from the application

Open jdeex opened this issue 5 years ago • 9 comments

Describe the bug TTL seems to only reports pass, even when there are health indicators failing. Even when the Health Endpoint <aaplication/actuator/health reports DOWN (and HTTP+Interval would show that way in Consul), the TTL check reports OK instead.

Having a look at the code it could be because of this

TTL should check the application status and report that using Consul TTL endpoints

Sample Implement a test health indicator that will cause the status to be down: public class TestHealthIndicator implements HealthIndicator { @Override public Health health() { return Health .down() .withDetail("test", "App is failing") .build(); } }

Enable TTL in the spring configuration: spring: cloud: consul: discovery: heartbeat: enabled: true ttl-value: 30 ttl-unit: m

Review /actuator/health Down status and status reported in Consul

jdeex avatar Sep 21 '20 16:09 jdeex

I picked this one up. I have a working solution - adding tests then will submit proposal.

onobc avatar Dec 24 '20 15:12 onobc

Hi @bono007 this is also useful for my use case. Is this commit going to be merged?

aromanos avatar Mar 16 '21 10:03 aromanos

@spencergibb I know you and team are busy doing "all the things" :) When you can, could you please give this one a review? Thank you.

onobc avatar Mar 16 '21 12:03 onobc

@spencergibb I bit the bullet and did the nasty rebase/merge - should be good now.

onobc avatar Apr 09 '21 15:04 onobc

Hey, how is it going? thought It was merged already. In what release is this expected to be available?

jdeex avatar Apr 30 '21 18:04 jdeex

@spencergibb did you have the time to review @bono007 commit?

jdeex avatar May 10 '21 11:05 jdeex

@jdeex it is scheduled for later this year.

spencergibb avatar Jun 03 '21 16:06 spencergibb

@spencergibb I saw this one missed the 2021.0.0 release, what's the target for this issue?

jdeex avatar Dec 16 '21 13:12 jdeex

Any update on this one??

jdeex avatar Feb 08 '22 14:02 jdeex