terminus
terminus copied to clipboard
Option to configure top-level successful response's value
When terminus
reports a successful response, it'd reply with a JSON consisting of the top-level status: "ok"
, accompanied by any additional health check info, when available.
According to https://github.com/godaddy/terminus/blob/04191ccbf3a00d2bfb563fe5a1bfef2766da231d/lib/terminus.js#L6-L8 and https://github.com/godaddy/terminus/blob/04191ccbf3a00d2bfb563fe5a1bfef2766da231d/lib/terminus.js#L24-L29, the top-level status
's value is hardcoded to ok
and isn't configurable.
Since Kubernetes documentation states the liveness of a container is an HTTP response with an HTTP code >= 200
and < 400
, the hardcoded ok
makes no difference to the health check process.
Yet other monitoring systems, such as Netfilx's Eureka Discovery server, expect a successful response with top-level's status
value to be up
(https://github.com/Netflix/eureka/blob/c111d08aee22178d1b300565baa4651e2924fdbf/eureka-client/src/main/java/com/netflix/appinfo/InstanceInfo.java#L318).
Hence I propose allowing an option to configure the top-level status
's value, enabling seamless integration with a monitoring system of choice, be it Kubernetes or Eureka Discovery server, or another.
Hello, is there any progress?
The new functionality has landed in the repo, @dromix. Hope it'll be available soon in the next version.
@rxmarbles, thank you so much for advancing merging the fix! Is there any date for the next version's release?