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

Support for HTTP Headers when performing metrics scraping #2346

Closed
ihr opened this Issue Jan 17, 2017 · 6 comments

Comments

Projects
None yet
4 participants
@ihr
Copy link

ihr commented Jan 17, 2017

Hi guys,

I am facing a scenario in which I need to scrap the metrics from microserices deployed on a PaaS (Cloud Foundry). In order to get the metrics from individual instances of a microservice, I need to send a header X-CF-APP-INSTANCE: APP_GUID:APP_INDEXwhere APP_GUID change at runtime APP_INDEX. Here is a link to the docs. I haven't found anything that could help me in the current version of Prometheus. Would you consider this feature important and would you accept a pull request? Or am I missing something, is this already possible somehow?

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Jan 17, 2017

A small proxy server would be the best way to handle this.

Offering headers to users would likely see them used in cases where other solutions would be more appropriate, and make debugging a lot more difficult.

@ihr

This comment has been minimized.

Copy link
Author

ihr commented Jan 17, 2017

Hi Brian,

I see your point. Do you have in mind any proxy in particular? Thanks!

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Jan 17, 2017

Probably easiest to write something quickly yourself, though something like HAProxy is probably configurable to do this by taking it from a url parameter and making it into a header.

@fabxc

This comment has been minimized.

Copy link
Member

fabxc commented Jan 17, 2017

This has been requested several times in the past and was rejected. So closing here.

Please see #1724 for past discussion.

@fabxc fabxc closed this Jan 17, 2017

eaglerainbow added a commit to promregator/promregator that referenced this issue Mar 4, 2018

eaglerainbow added a commit to promregator/promregator that referenced this issue Mar 4, 2018

@eaglerainbow

This comment has been minimized.

Copy link

eaglerainbow commented Mar 4, 2018

@ihr You might find https://github.com/promregator/promregator interesting (still in experimental stage, though).

@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.