You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I see there is the /sys/health endpoint in the API, but presumably that is only accessible by an authenticated user authorized for the /sys path.
I was wondering if there is any thought to adding a simple, publicly accessible health check endpoint--like /health that returns 200 if the server is up.
My target use case would be for an EC2 ELB to health check if vault is up, so that we could be notified if there is an issue with the instance.
We are only looking at non-HA right now, but even for HA, having a sense of how many instances are in service externally would probably be helpful for others.
On google cloud network balancing, the health check is done by method HEAD and expecting a return code of OK 200. It would be nice if Vault API could have an endpoint to support it when the server is up and ready for client call, rather than return 200 only after unsealed.
@jefferai I think we have different views on "server is ready".
Did a client call server api /sys/unseal to unseal? So question is how a load balancer test a server is ready for "init" and "unseal" api calls?
Also even a server is unsealed and "ready", google balancer still need a HEAD endpoint to check server's health. Of cause, gcloud may or may not have customizable health checking methods in the future.
@xuwang A load balancer can certainly understand whether the server is ready for init and unseal calls; it's the particular case of the Google balancer that is the issue here. Requiring HEAD and 200 is a pretty onerous design (not that AWS is much better; for instance, it doesn't consider 204 to be an OK response).
Agreed.
On Mar 2, 2016 2:24 PM, "Jeff Mitchell" [email protected] wrote:
@xuwanghttps://github.com/xuwang A load balancer can certainly
understand whether the server is ready for init and unseal calls; it's the
particular case of the Google balancer that is the issue here. Requiring
HEAD and 200 is a pretty onerous design (not that AWS is much better; for
instance, it doesn't consider 204 to be an OK response).
—
Reply to this email directly or view it on GitHub #209 (comment).
For those finding this, the full health check endpoint is /v1/sys/health and is typically on port 8200.
@jefferai how would a load balancer tell if a server is ready for init and unseal calls? Having it check init seems like it would have unintended consequences and unseal would fail without providing an unseal key. This question is academic at this point since in an HA situation you would not want the load balancer to send traffic to any node but the primary.
Reacted by Steve Kehlet, Juan Manuel, Guillaume Carre, Tim Sandholm, jsmcnair and Jesse Adams
Activity
mitchellh commentedon May 15, 2015
/sys/healthis an unauthenticated endpoint, youcan hit it with anything. We'll update the docs to say such.xuwang commentedon Mar 2, 2016
On google cloud network balancing, the health check is done by method HEAD and expecting a return code of OK 200. It would be nice if Vault API could have an endpoint to support it when the server is up and ready for client call, rather than return 200 only after unsealed.
Thanks.
jefferai commentedon Mar 2, 2016
@xuwang The server isn't ready for a client call when it's not unsealed!
xuwang commentedon Mar 2, 2016
@jefferai I think we have different views on "server is ready".
Did a client call server api /sys/unseal to unseal? So question is how a load balancer test a server is ready for "init" and "unseal" api calls?
xuwang commentedon Mar 2, 2016
Also even a server is unsealed and "ready", google balancer still need a HEAD endpoint to check server's health. Of cause, gcloud may or may not have customizable health checking methods in the future.
jefferai commentedon Mar 2, 2016
@xuwang A load balancer can certainly understand whether the server is ready for init and unseal calls; it's the particular case of the Google balancer that is the issue here. Requiring HEAD and 200 is a pretty onerous design (not that AWS is much better; for instance, it doesn't consider 204 to be an OK response).
xuwang commentedon Mar 2, 2016
Agreed.
On Mar 2, 2016 2:24 PM, "Jeff Mitchell" [email protected] wrote:
ddgenome commentedon May 19, 2016
For those finding this, the full health check endpoint is
/v1/sys/healthand is typically on port 8200.@jefferai how would a load balancer tell if a server is ready for init and unseal calls? Having it check init seems like it would have unintended consequences and unseal would fail without providing an unseal key. This question is academic at this point since in an HA situation you would not want the load balancer to send traffic to any node but the primary.
jefferai commentedon May 19, 2016
The latest released version of Vault allows to to specify the desired status codes for the different states; see https://www.vaultproject.io/docs/http/sys-health.html