-
Notifications
You must be signed in to change notification settings - Fork 117
Add optional HTTP auth, tests. #297
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
base: master
Are you sure you want to change the base?
Conversation
|
What's the use case here? Are you connecting to the exporter over the public internet? Is it possible to place Nginx in front? |
|
I am running the container in AWS. I am scraping using grafana.com cloud
account (which for some reason requires authentication). I can place
anything I want in front, however, that would cost me more $$ with AWS.
…On Sat, Mar 2, 2024 at 1:28 PM Dani Hodovic ***@***.***> wrote:
What's the use case here? Are you connecting to the exporter over the
public internet? Is it possible to place Nginx in front?
—
Reply to this email directly, view it on GitHub
<#297 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFDMVQ6GEPBQJET3QYL4QTYWIK6BAVCNFSM6AAAAABECBXNUOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNZUHA3TEMJUGE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
|
This is the first request I receive for baking in HTTP basic auth. I'd prefer to keep the code base small so I won't be merging this. Feel free to fork the repo with the added changes and deploy your own patched exporter. If you're using Grafana for visualizations here are two charts designed for the exporter: |
|
I've changed my mind. I think we can merge this. Can you resolve the conflicts and I will take a look? |
|
Sure thing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this PR. I'm interested in this as well !
| @click.option( | ||
| "--http-username", default=None, help="Basic auth username for /metrics endpoint." | ||
| ) | ||
| @click.option( | ||
| "--http-password", default=None, help="Basic auth password for /metrics endpoint." | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be possible to add an envvar to these ? I want to avoid passwords in commands
| @click.option( | |
| "--http-username", default=None, help="Basic auth username for /metrics endpoint." | |
| ) | |
| @click.option( | |
| "--http-password", default=None, help="Basic auth password for /metrics endpoint." | |
| ) | |
| @click.option( | |
| "--http-username", | |
| default=None, | |
| help="Basic auth username for /metrics endpoint.", | |
| envvar="CELERY_EXPORTER_HTTP_USERNAME" | |
| ) | |
| @click.option( | |
| "--http-password", | |
| default=None, | |
| help="Basic auth password for /metrics endpoint.", | |
| envvar="CELERY_EXPORTER_HTTP_PASSWORD" | |
| ) |
I needed HTTP basic auth for my metrics. This PR adds two optional CLI args:
--http-usernameand--http-password.