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

Adopt .well-known/metrics/${APPLICATION} as defacto endpoint for metrics #2523

Closed
andrewhowdencom opened this Issue Mar 24, 2017 · 3 comments

Comments

Projects
None yet
2 participants
@andrewhowdencom
Copy link

andrewhowdencom commented Mar 24, 2017

What did you do?

Used Prometheus for a while. Noticed that were multiple services are exposed on the same interface, it's not clear how to separate them (virtual hosts? different URLs? and so on)

What did you expect to see?

Nothing much. This is an idea.

What did you see instead? Under which circumstances?

I'm picking this for my own standard, where I control such endpoints. So, this is just up-streaming a suggestion.

Dropped environment specific notes, as they're not relevant. Honestly, this is just a "oh I have a crazy idea".

Many applications appear to be picking their own ad-hoc places to put metrics (quite often at /metrics where possible, or under /admin/metrics etc). IANA have a standard at which they expose "well-known" artifacts such as the Lets Encrypt nonce/hash/things, keybase use it for verification etc. Ref: http://www.iana.org/assignments/well-known-uris/well-known-uris.xhtml

Instead, I suggest that

  1. Prometheus registers the .well-known/metrics endpoint to be an endpoint at which applications are expected to be exposed in the Prometheus format
  2. Prometheus establish a pattern of .well-known/metrics/${APPLICATION}, so that if multiple applications are exposed (node exporter, MySQL and Apache for an example use case) they can be collected at the same address.

This would require minimal changes to the Prometheus codebase, rather just changes to the examples / documentation.

Perhaps this is not an issue that other people have run into, but it's one I have.

Thanks for your time / building such an awesome thing!

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Mar 24, 2017

Noticed that were multiple services are exposed on the same interface, it's not clear how to separate them (virtual hosts? different URLs? and so on)

Different ports usually.

Prometheus establish a pattern of .well-known/metrics/${APPLICATION}, so that if multiple applications are exposed (node exporter, MySQL and Apache for an example use case) they can be collected at the same address.

That would be a new service discovery mechanism, which we don't wish to establish. What happens if there's multiple mysql or apache exporters per machine for example?

@andrewhowdencom

This comment has been minimized.

Copy link
Author

andrewhowdencom commented Mar 24, 2017

Seems reasonable. I'll close this issue; Cheers!

@lock

This comment has been minimized.

Copy link

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.
You can’t perform that action at this time.