sensu / sensu-prometheus-collector

Collect Prometheus metrics with Sensu!
MIT License
28 stars 18 forks source link

-exporter-user and -exporter-url flags don't appear to work #23

Open asachs01 opened 3 years ago

asachs01 commented 3 years ago

Howdy folks! I've been experimenting using the collector against and endpoint that has basic auth, and the flags -exporter-user and -exporter-url don't appear to work. In this particular case, I'm attempting to scrape a Graylog prom endpoint with the check command that looks like this:

# ./sensu-prometheus-collector -exporter-url http://logs.sachshaus.net/api/plugins/org.graylog.plugins.metrics.prometheus/metrics -exporter-user $EXPORTER_USER -exporter-password $EXPORTER_PASSWORD

2020/10/11 01:46:15 exporter returned non OK HTTP response status: 401 Unauthorized

I've tried with the env vars set from the command line, inside of /etc/default/sensu-agent and in just plaintext and I cannot get this to work as expected. Am I missing something?