danihodovic / celery-exporter

A Prometheus exporter for Celery metrics
MIT License
431 stars 94 forks source link

Add optional HTTP auth, tests. #297

Open btimby opened 9 months ago

btimby commented 9 months ago

I needed HTTP basic auth for my metrics. This PR adds two optional CLI args: --http-username and --http-password.

danihodovic commented 9 months ago

What's the use case here? Are you connecting to the exporter over the public internet? Is it possible to place Nginx in front?

btimby commented 9 months ago

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 https://github.com/danihodovic/celery-exporter/pull/297#issuecomment-1974872141, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFDMVQ6GEPBQJET3QYL4QTYWIK6BAVCNFSM6AAAAABECBXNUOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNZUHA3TEMJUGE . You are receiving this because you authored the thread.Message ID: @.***>

danihodovic commented 8 months ago

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: