ovh / beamium

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

Fix scraper name sent instead of headers' #67

Closed babolivier closed 6 years ago

babolivier commented 6 years ago

Fix a misused variable causing beamium to send headers with the scraper's name as the headers' keys.

Example configuration:

scrapers:
  scraper:
    url: http://127.0.0.1:9100/metrics
    format: prometheus
    period: 6000
    headers:
      Authorization: Basic XXXXX

[...]

Request sent without this patch:

GET /metrics HTTP/1.1
Host: 127.0.0.1:9100
scraper: Basic XXXXX

Request sent with this patch:

GET /metrics HTTP/1.1
Host: 127.0.0.1:9100
Authorization: Basic XXXXX
d33d33 commented 6 years ago

🐙 Nice one 😄

Thanks!