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

Add /-/healthy and /-/ready endpoints #2831

Closed
discordianfish opened this issue Jun 10, 2017 · 11 comments
Closed

Add /-/healthy and /-/ready endpoints #2831

discordianfish opened this issue Jun 10, 2017 · 11 comments

Comments

@discordianfish
Copy link
Member

@discordianfish discordianfish commented Jun 10, 2017

Prometheus should provide an health endpoint which returns 200 if prometheus is ready to response to queries (recovery is done etc).

The officially recommendation on high availability is to run two instances behind a load balance. In such scenario we need a health endpoint to avoid hitting a prometheus server that got restarted and isn't ready to serve traffic.

@beorn7
Copy link
Member

@beorn7 beorn7 commented Jun 12, 2017

From the discussion in prometheus/pushgateway#105 , I'd say what you want here is a /-/ready endpoint. The other suggested endpoint is /-/healthy, which returns 200 for as long as Prometheus doesn't want to get restarted.

In other words:

Prometheus should bind to /-/healthy immediately after startup and keep responding 200 for as long as it doesn't wish to get killed.

Prometheus should start responding 200 to /-/ready once it is ready to accept queries.

@beorn7 beorn7 changed the title Add /-/health endpoint Add /-/healthy and /-/ready endpoints Jun 12, 2017
@discordianfish
Copy link
Member Author

@discordianfish discordianfish commented Jun 12, 2017

Ah nice, yes that totally makes sense 👍

@yonkeltron
Copy link

@yonkeltron yonkeltron commented Jul 5, 2017

Just wanted to throw in my two cents for this one as it would be awesome to have this for Kubernetes to use as well.

@beorn7
Copy link
Member

@beorn7 beorn7 commented Jul 23, 2017

@gouthamve I just saw you pinged me on IRC about this. I think all my thoughts around this have already been dumped into my last comment above. Please let me know what you are missing, and I'll try to go into more details where needed.

@ghost
Copy link

@ghost ghost commented Jul 26, 2017

Hi, I have been working on this on my local. I have arrived at a simple working solution. I think I could send a PR before end of week. If nobody else is working on this I would like to claim the issue.

@gouthamve
Copy link
Member

@gouthamve gouthamve commented Jul 26, 2017

Sure @emluque, looking forward to the PR! Incase you get stuck somewhere, feel free to hit us up on IRC or comment here.

EDIT: Hmm, I am not able to assign you to this issue, sorry. Just comment below if you stop working on this.

@gouthamve gouthamve assigned gouthamve and unassigned gouthamve Jul 26, 2017
grobie added a commit that referenced this issue Aug 7, 2017
Add `/-/healthy` and `/-/ready` endpoints #2831
@SimenB
Copy link

@SimenB SimenB commented Aug 15, 2017

#2997 is merged, should this be closed?

@grobie
Copy link
Member

@grobie grobie commented Aug 15, 2017

Resolved with #2997.

@grobie grobie closed this Aug 15, 2017
@julianvmodesto
Copy link

@julianvmodesto julianvmodesto commented Oct 5, 2017

Is it possible to backport this to 1.7.x? Related to prometheus-operator/prometheus-operator#658

@beorn7
Copy link
Member

@beorn7 beorn7 commented Oct 5, 2017

This is part of the 1.x line of Prometheus. It will in fact be released tomorrow (if nothing goes wrong). It will be 1.8.0, however, as this is a new feature and not a bug fix.

@lock
Copy link

@lock lock bot commented Mar 23, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
8 participants