ovh / beamium

Prometheus to Warp10 metrics forwarder
Other
84 stars 21 forks source link

Fetch metrics on scraper protected by Basic auth #52

Closed babolivier closed 6 years ago

babolivier commented 6 years ago

One of my data sources protects its endpoints with Basic auth, rendering beamium unable to fetch metrics from it (using version 1.7.0-jessie from the deb repository). It would be very helpful if Basic auth could be supported in beamium.

ziirish commented 6 years ago

That's funny, I was just looking into this feature as well.

I'm working on a patch that will hopefully enable the use of custom headers while scrapping the sources.

Example:

scrapers:
  scraper1:
    url: http://127.0.0.1:9100/metrics
    format: sensision
    period: 10000
    headers:
      Authorization: Basic XXXXX==
babolivier commented 6 years ago

Wow, that would be awesome 👍

ziirish commented 6 years ago

PR #54 ready ;)

d33d33 commented 6 years ago

PR #54 merged !

Thanks for your work @ziirish <3