Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Spring Cloud - Config Client slows down metric /health

I am using the ConfigServer within my Spring Boot + Spring Cloud project. I used to monitor the endpoint /health, but since the ConfigClient asks the ConfigServer within every request, the invocation of the metric "/health" is quite slow.

This is due to the fact, that for every request to the ConfigServer, this one actually calls BitBucket –> so the entire request chain is quite long/slow.

Is there a way to disable the check for ConfigServer being available? I would like to monitor this one separately.

Best fri

like image 336
Fritz Avatar asked May 14 '15 08:05

Fritz


1 Answers

Not currently. How often are you checking health? You can submit an issue to have a property that disables the health check.

You could work around it by extending ConfigServerHealthIndicator and overriding doHealthCheck.

The do something like:

@Bean
public ConfigServerHealthIndicator configServerHealthIndicator(
        ConfigServicePropertySourceLocator locator) {
    return new MyEmptyConfigServerHealthIndicator(locator);
}
like image 88
spencergibb Avatar answered Sep 22 '22 15:09

spencergibb