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

Proposal: more flexible token configure in scrape_config #4491

Closed
zjwzte opened this Issue Aug 13, 2018 · 4 comments

Comments

Projects
None yet
2 participants
@zjwzte
Copy link
Contributor

zjwzte commented Aug 13, 2018

Proposal

**Use case. **
in our exist system, we'd like to provide restful api for prometheus to scripe metrics;
however,in our system we use self-define http head "Access-Token" to take token info, to use prometheus
we have to resolve http head "Authorization" used in prometheus scripe http request;

Can more flexible token configure in scrape_config be provided to specify use which http head key to take
token info;

thanks

  • Prometheus configuration file:
insert configuration here
@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Aug 13, 2018

Thanks for your suggestion. We purposefully avoid supporting non-standard auth mechanisms, as that would be challenging to maintain and be a rabbit hole feature wise. In addition allowing arbitrary headers to be passed would make debugging for users quite a bit more difficult, as it wouldn't be possible to look at a /metrics in a browser.

If you have a system that doesn't support basic auth, bearer tokens or ssl mutual auth I would suggest using proxy_url to have a proxy that can alter the request as needed.

@zjwzte

This comment has been minimized.

Copy link
Contributor Author

zjwzte commented Aug 13, 2018

Thanks for your reply;
maybe proxy_url is a better way;

thanks

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Aug 13, 2018

Something else to consider is if you really need to tie into your existing rest setup. Metrics is more an admin/debug endpoint, so you may wish to handle it however you usually handle those.

@zjwzte zjwzte closed this Aug 22, 2018

@lock

This comment has been minimized.

Copy link

lock bot commented Mar 22, 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 22, 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.