Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document disabling of config client health indicator. #435

Closed
jpuigsegur opened this issue Jun 29, 2016 · 13 comments
Closed

Document disabling of config client health indicator. #435

jpuigsegur opened this issue Jun 29, 2016 · 13 comments

Comments

@jpuigsegur
Copy link

As I understand, the property defined in http://cloud.spring.io/spring-cloud-config/spring-cloud-config.html#_health_indicator should deactivate the config server validation in the spring boot /health endpoint. However we have not been able to deactivate this check using this property. Could it be a bug or we didn't get the point in the above documentation?

@spencergibb
Copy link
Member

That's for the config server itself, not config clients. You want health.config.enabled=false.

@spencergibb spencergibb changed the title How to disable config server health check Document disabling of config client health indicator. Jun 29, 2016
@jpuigsegur
Copy link
Author

Ok. Thanks.
This one is not documented in http://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html.

Would it be health.config.enabled=false or management.health.config.enabled=false?

@spencergibb
Copy link
Member

It's exactly what I told you it is and it wouldn't be documented in spring-boot since it's not part of spring boot.

@jpuigsegur
Copy link
Author

Ok. Thanks!!

@markthegrea
Copy link

Sorry, but can someone explain this a bit more? I am having the same problem. Is the server in my app? How can it not be part of spring boot?

Can I put something in my properties file to shut this off?

@jpuigsegur
Copy link
Author

It means that in order to stop the health check in Spring Boot to check config server you need to include the following configuration: health.config.enabled=false

@markthegrea
Copy link

markthegrea commented Jun 29, 2018

Thanks for the reply but that does not work. I am using Spring boot 1.5.9.RELEASE. I have put it in my application.properties file but it is still rebooting.

Does all this run inside my spring boot app? It seems above that it is running elsewhere? I am in Azure and maybe it is pinging my app?

##This shuts the Tomcat server off.
spring.main.web-environment=false
health.config.enabled=false
management.security.enabled=true
##should we store sessions?
spring.session.store-type=none

@marcingrzejszczak
Copy link
Contributor

Is it still a problem with Finchley.RELEASE?

@markthegrea
Copy link

I can't figure it out. There are about 4 posts on the web about it and none of it works.

@ryanjbaxter
Copy link
Contributor

@markthegrea are you using Spring Cloud Config?

@markthegrea
Copy link

markthegrea commented Jul 23, 2018

I have a standalone app. I am doing this in the Azure Cloud.

What I don't understand is the above quote: "It's exactly what I told you it is and it wouldn't be documented in spring-boot since it's not part of spring boot."

How can this not be part of spring boot? Does Spring Boot somehow monitor itself?

@ryanjbaxter
Copy link
Contributor

health.config.enabled=false is not part of Spring Boot, it a property from Spring Cloud
http://cloud.spring.io/spring-cloud-static/Edgware.SR4/single/spring-cloud.html#_health_indicator_3

@spencergibb spencergibb added this to To do in 2020.0.0-M4 via automation Sep 8, 2020
@spencergibb spencergibb added this to To do in Hoxton.SR9 via automation Sep 8, 2020
@spencergibb spencergibb added this to the 2.2.6.RELEASE milestone Sep 8, 2020
spencergibb added a commit that referenced this issue Sep 8, 2020
The property is now defined by `@ConditionalOnEnabledHealthIndicator`

Fixes gh-435
2020.0.0-M4 automation moved this from To do to Done Sep 8, 2020
Hoxton.SR9 automation moved this from To do to Done Sep 8, 2020
@maxxyme
Copy link

maxxyme commented Sep 28, 2020

Despite setting health.config.enabled=false in my application.properties, org.springframework.cloud.health.RefreshScopeHealthIndicator was still getting called...

Alas, I finally discovered in spring-cloud-context-2.1.3.RELEASE.jar the existence of these 2 files:

spring-configuration-metadata.json

{
  "name": "management.health.refresh.enabled",
  "type": "java.lang.Boolean",
  "description": "Enable the health endpoint for the refresh scope.",
  "defaultValue": true
},

additional-spring-configuration-metadata.json

	{
		"name": "management.health.refresh.enabled",
		"type": "java.lang.Boolean",
		"description": "Enable the health endpoint for the refresh scope.",
		"defaultValue": true
	}

So basically the prop name we can see everywhere is erroneous, it's actually management.health.refresh.enabled NOT health.config.enabled.

e.g. official doc @ https://cloud.spring.io/spring-cloud-config/reference/html/#_health_indicator_2

Also found an answer from 2017 telling the correct properties: https://stackoverflow.com/a/46775306
So probably this has been "fixed" by the time, or done as requested in #552

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
2020.0.0-M4
  
Done
Hoxton.SR9
  
Done
Development

No branches or pull requests

6 participants