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

Handle requests to / #3

Merged
merged 2 commits into from
Jun 27, 2017
Merged

Handle requests to / #3

merged 2 commits into from
Jun 27, 2017

Conversation

mrwacky42
Copy link
Contributor

This lets us do health checks against the exporter without having to
collect all the metrics.

For now, just print the version.

This lets us do health checks against the exporter without having to
collect all the metrics.

For now, just print the version.
@moznion
Copy link
Owner

moznion commented Jun 15, 2017

@mrwacky42
Thank you for your patch. It looks nice.
I have a question about this; in Prometheus, is path of the route (i.e. /) default to be used health checking?

@mrwacky42
Copy link
Contributor Author

@moznion - I'm not sure if there is a standard. at $WORK, we use Consul for Prometheus service discovery. For other exporters, we just GET / to see if it is working for the Consul servic health check.
The best I can find is https://prometheus.io/docs/instrumenting/writing_exporters/#landing-page
I've added another commit to make it slightly more useful.

@moznion
Copy link
Owner

moznion commented Jun 17, 2017

@mrwacky42
Thank you!

In my opinion, I think it is not explicit that the / represents a health check. For example, how about using /health instead?

@mrwacky42
Copy link
Contributor Author

Sure. This patch doesn't really directly have anything to do with healthchecks other than allowing me to make a query to a different route than /metrics.

HandleFunc("/",..) already serves any request besides /metrics, including /health or /mrwacky42..

@moznion moznion merged commit 4d6abba into moznion:master Jun 27, 2017
@moznion
Copy link
Owner

moznion commented Jun 27, 2017

Thank you! Merged this feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants