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

Local health endpoint #2488

Closed
joshuaspence opened this issue Nov 9, 2016 · 5 comments
Closed

Local health endpoint #2488

joshuaspence opened this issue Nov 9, 2016 · 5 comments
Labels
theme/health-checks Health Check functionality type/enhancement Proposed improvement or new feature
Milestone

Comments

@joshuaspence
Copy link

I want to use Consul to provide healthchecks for Amazon ELBs. Basically, I wanted to set the ELB healthcheck to query an instance's health by hitting some Consul HTTP endpoint. The /v1/agent endpoint seems close to what I want, but there doesn't seem to be a /v1/agent/service/<service_id>/health endpoint. Does such an endpoint exist (maybe I am looking in the wrong place)?

@slackpad
Copy link
Contributor

slackpad commented Nov 9, 2016

Hi @joshuaspence we don't currently have an agent-level endpoint to pull the health of an agent. There's https://www.consul.io/docs/agent/http/health.html#health_node but that'll end up going up to the Consul servers, and the HTTP status code doesn't indicate the state of the health checks. This looks like a possible dup of #1468.

@slackpad slackpad added type/enhancement Proposed improvement or new feature post-0.9 labels May 3, 2017
@slackpad slackpad added the theme/health-checks Health Check functionality label May 25, 2017
@brumschlag
Copy link

+1
How can I use consul with an ELB? I want to have the elb take out the instance if I put it in maintenance mode.

@joshuaspence
Copy link
Author

Would the upstream be interested in a pull request for this functionality?

@kamaradclimber
Copy link
Contributor

kamaradclimber commented Oct 6, 2017

We would definitely be interested by having /v1/agent/service/<service id>/health return 200, 429 or 500.

That would allow to configure complex checks on consul side and expose a very simple interface for our loadbalancer (which would delegate healthchecks to consul).

kamaradclimber added a commit to criteo-forks/consul that referenced this issue Dec 5, 2017
This endpoint aggregate all checks related to <service id> on the agent
and return an appropriate http code + the string describing the worst
check.

This allows to cleanly expose service status to other component, hiding
complexity of multiple checks.
This is especially useful to use consul to feed a loadbalancer which
would deleguate healthchecking to consul agent.

Exposing this endpoint on the agent is necessary to avoid a hit on
consul servers and avoid decreasing resiliency (this endpoint will work
even if there is no consul leader in the cluster).

Fix hashicorp#2488, relates to hashicorp#802

Change-Id: Ib340c62bbbba46fd4256ed31474d8ffb1762d4df
Signed-off-by: Grégoire Seux <g.seux@criteo.com>
@slackpad slackpad added this to the Unplanned milestone Jan 5, 2018
@slackpad slackpad removed the post-0.9 label Jan 5, 2018
fboismenu pushed a commit to criteo-forks/consul that referenced this issue Jan 23, 2018
This endpoint aggregate all checks related to <service id> on the agent
and return an appropriate http code + the string describing the worst
check.

This allows to cleanly expose service status to other component, hiding
complexity of multiple checks.
This is especially useful to use consul to feed a loadbalancer which
would deleguate healthchecking to consul agent.

Exposing this endpoint on the agent is necessary to avoid a hit on
consul servers and avoid decreasing resiliency (this endpoint will work
even if there is no consul leader in the cluster).

Fix hashicorp#2488, relates to hashicorp#802

Change-Id: Ib340c62bbbba46fd4256ed31474d8ffb1762d4df
Signed-off-by: Grégoire Seux <g.seux@criteo.com>
kamaradclimber added a commit to criteo-forks/consul that referenced this issue Jan 23, 2018
This endpoint aggregate all checks related to <service id> on the agent
and return an appropriate http code + the string describing the worst
check.

This allows to cleanly expose service status to other component, hiding
complexity of multiple checks.
This is especially useful to use consul to feed a loadbalancer which
would deleguate healthchecking to consul agent.

Exposing this endpoint on the agent is necessary to avoid a hit on
consul servers and avoid decreasing resiliency (this endpoint will work
even if there is no consul leader in the cluster).

Fix hashicorp#2488, relates to hashicorp#802

Change-Id: Ib340c62bbbba46fd4256ed31474d8ffb1762d4df
Signed-off-by: Grégoire Seux <g.seux@criteo.com>
fboismenu pushed a commit to criteo-forks/consul that referenced this issue Feb 15, 2018
This endpoint aggregate all checks related to <service id> on the agent
and return an appropriate http code + the string describing the worst
check.

This allows to cleanly expose service status to other component, hiding
complexity of multiple checks.
This is especially useful to use consul to feed a loadbalancer which
would deleguate healthchecking to consul agent.

Exposing this endpoint on the agent is necessary to avoid a hit on
consul servers and avoid decreasing resiliency (this endpoint will work
even if there is no consul leader in the cluster).

Fix hashicorp#2488, relates to hashicorp#802

Change-Id: Ib340c62bbbba46fd4256ed31474d8ffb1762d4df
Signed-off-by: Grégoire Seux <g.seux@criteo.com>
@kadaan
Copy link

kadaan commented Feb 19, 2018

@joshuaspence
I wanted the same functionality, so I developed a sidecar that can be used to accomplish this: Consulate. The first version is done and I'm testing it in my dev environment this week. Would love any feedback!

ShimmerGlass pushed a commit to criteo-forks/consul that referenced this issue Nov 9, 2018
This endpoint aggregate all checks related to <service id> on the agent
and return an appropriate http code + the string describing the worst
check.

This allows to cleanly expose service status to other component, hiding
complexity of multiple checks.
This is especially useful to use consul to feed a loadbalancer which
would deleguate healthchecking to consul agent.

Exposing this endpoint on the agent is necessary to avoid a hit on
consul servers and avoid decreasing resiliency (this endpoint will work
even if there is no consul leader in the cluster).

Fix hashicorp#2488, relates to hashicorp#802

Change-Id: Ib340c62bbbba46fd4256ed31474d8ffb1762d4df
Signed-off-by: Grégoire Seux <g.seux@criteo.com>
ShimmerGlass pushed a commit to criteo-forks/consul that referenced this issue Nov 9, 2018
This endpoint aggregate all checks related to <service id> on the agent
and return an appropriate http code + the string describing the worst
check.

This allows to cleanly expose service status to other component, hiding
complexity of multiple checks.
This is especially useful to use consul to feed a loadbalancer which
would deleguate healthchecking to consul agent.

Exposing this endpoint on the agent is necessary to avoid a hit on
consul servers and avoid decreasing resiliency (this endpoint will work
even if there is no consul leader in the cluster).

Fix hashicorp#2488, relates to hashicorp#802

Change-Id: Ib340c62bbbba46fd4256ed31474d8ffb1762d4df
Signed-off-by: Grégoire Seux <g.seux@criteo.com>
ShimmerGlass pushed a commit to criteo-forks/consul that referenced this issue Dec 3, 2018
This endpoint aggregate all checks related to <service id> on the agent
and return an appropriate http code + the string describing the worst
check.

This allows to cleanly expose service status to other component, hiding
complexity of multiple checks.
This is especially useful to use consul to feed a loadbalancer which
would deleguate healthchecking to consul agent.

Exposing this endpoint on the agent is necessary to avoid a hit on
consul servers and avoid decreasing resiliency (this endpoint will work
even if there is no consul leader in the cluster).

Fix hashicorp#2488, relates to hashicorp#802

Change-Id: Ib340c62bbbba46fd4256ed31474d8ffb1762d4df
Signed-off-by: Grégoire Seux <g.seux@criteo.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme/health-checks Health Check functionality type/enhancement Proposed improvement or new feature
Projects
None yet
Development

No branches or pull requests

5 participants