You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Launcelot <dr...@standard.com> on 2017/01/27 00:40:30 UTC
Health Check - Camel Spring Boot
Wondering what the UP status on the /health end point in a camel spring boot
application indicates,
Ran the example in camel\examples\camel-example-spring-boot , looked at the
health check end point and it showed
{"status":"UP","camel":{"status":"UP","version":"2.18.1","contextStatus":"Started"},"diskSpace":{"status":"UP","total":179729068032,"free":7542001664,"threshold":10485760}}
connected using jconsole and stopped route1, the health check showed
everything was OK.
stopped route 2 as well and this tiime saw 2017-01-26 16:31:34.631 INFO
7580 --- [ - ShutdownTask] o.a.camel.impl.DefaultShutdownStrategy : Route:
route2 shutdown complete, was consuming from: timer://status which would
indicate that camel did obey the stop method invocation and still the health
check shows ok . Granted that I am artificially stopping a route but would
the health check indicate OK in real life if a route stopped for some
reason? Am I thinking of this the wrong way?
Thanks
drajagop
--
View this message in context: http://camel.465427.n5.nabble.com/Health-Check-Camel-Spring-Boot-tp5793094.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Health Check - Camel Spring Boot
Posted by Pontus Ullgren <ul...@gmail.com>.
The current implementation of CamelHealthIndicator[1] only verifies that
the CamelContext is started not the state of the routes.
I guess a improvement could be to allow for a property that lists a number
of routes by routeId and add logic to also check the state of the routes to
decide the status.
Something like
camel.health.validate.routes=route1,route2
Validating all routes in the context by default is not an option since
there might be routes that are intentionally stopped and as far as I can
remember there is no way to
see the reason that the route was stopped.
However since it is very easy to create your own HealthIndicator an option
would be to just do that and add the validation of the routes you know has
to be started.
Best regards
Pontus Ullgren
[1]:
https://github.com/apache/camel/blob/master/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/health/CamelHealthIndicator.java
[2]:
http://docs.spring.io/spring-boot/docs/current/reference/html/production-ready-endpoints.html#production-ready-health
On Fri, 27 Jan 2017 at 01:40 Launcelot <dr...@standard.com> wrote:
> Wondering what the UP status on the /health end point in a camel spring
> boot
> application indicates,
> Ran the example in camel\examples\camel-example-spring-boot , looked at the
> health check end point and it showed
>
> {"status":"UP","camel":{"status":"UP","version":"2.18.1","contextStatus":"Started"},"diskSpace":{"status":"UP","total":179729068032,"free":7542001664,"threshold":10485760}}
> connected using jconsole and stopped route1, the health check showed
> everything was OK.
> stopped route 2 as well and this tiime saw 2017-01-26 16:31:34.631 INFO
> 7580 --- [ - ShutdownTask] o.a.camel.impl.DefaultShutdownStrategy :
> Route:
> route2 shutdown complete, was consuming from: timer://status which would
> indicate that camel did obey the stop method invocation and still the
> health
> check shows ok . Granted that I am artificially stopping a route but would
> the health check indicate OK in real life if a route stopped for some
> reason? Am I thinking of this the wrong way?
> Thanks
> drajagop
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Health-Check-Camel-Spring-Boot-tp5793094.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>