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

Scraping metrics that are behind a Basic Auth login #697

Closed
kmandeville opened this Issue May 14, 2015 · 4 comments

Comments

Projects
None yet
2 participants
@kmandeville
Copy link

kmandeville commented May 14, 2015

I'm looking to monitor a Spring Boot app I have in production. Since it's in production, I didn't want people stumbling across the /metrics endpoints and others that come from actuator so I put them behind a username and password. I tried putting the username and password in the url in the config file which works in browsers:

username:password@http://blah.com/metrics

But that fails in Prometheus saying that "username" is not a valid protocol. So obviously it's not supported. Is there some way to configure the username and password for the metrics that I want prometheus to scrape?

@fabxc

This comment has been minimized.

Copy link
Member

fabxc commented May 14, 2015

It's because the URL scheme has to move to the beginning.
http://username:password@blah.com/metrics

With the next version, basic auth can be configured in what now is the job configuration.

@kmandeville

This comment has been minimized.

Copy link
Author

kmandeville commented May 14, 2015

Oh, duh. Let me try that, thanks.

On 5/14/15, Fabian Reinartz notifications@github.com wrote:

It's because the URL scheme has to move to the beginning.
http://username:password@blah.com/metrics

With the next version, basic auth can be configured in what now is the job
configuration.


Reply to this email directly or view it on GitHub:
#697 (comment)

@fabxc

This comment has been minimized.

Copy link
Member

fabxc commented May 14, 2015

I assume the issue is resolved with that.
If not, you can still comment.

@fabxc fabxc closed this May 14, 2015

simonpasquier pushed a commit to simonpasquier/prometheus that referenced this issue Oct 12, 2017

@lock

This comment has been minimized.

Copy link

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