Skip to content
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

Prometheus input plugin: Unable to Authenticate using basic_Auth #6039

Closed
bharatsindhu opened this issue Jun 24, 2019 · 6 comments · Fixed by #6062
Closed

Prometheus input plugin: Unable to Authenticate using basic_Auth #6039

bharatsindhu opened this issue Jun 24, 2019 · 6 comments · Fixed by #6062
Assignees
Labels
area/prometheus feature request Requests for new plugin and for new features to existing plugins
Milestone

Comments

@bharatsindhu
Copy link

Hi,
Unable to Authenticate to a protected endpoint using Telegraf: input plugin: Prometheus.
Maybe missing a feature here? Is there any workaround for this?

We have an enterprise support from influxDB, let me know if this is possible. I'll route my request from a different channel.

Here is how we are able to utilize an endpoint which supports prometheus formatted metrics.
I have an endpoint which is hooked into prometheus. Prometheus authenticates itself and pulls the required metrics. Below is the job from prometheus configuration.

Below is the Job that I had prometheus.

- job_name: prom
  honor_timestamps: true
  scrape_interval: 15s
  scrape_timeout: 5s
  metrics_path: /prom/metrics/prometheus
  scheme: http
  static_configs:
  - targets:
    - host.docker.internal:8080
  basic_auth:
    username: prometheus
    password: <secret>

Thanks,

@danielnelson danielnelson added area/prometheus feature request Requests for new plugin and for new features to existing plugins labels Jun 24, 2019
@danielnelson
Copy link
Contributor

Right now the plugin only has support for Bearer token authentication, but it should be quite easy to add basic auth support. I'll put it on for 1.12.

@danielnelson danielnelson added this to the 1.12.0 milestone Jun 24, 2019
@bharatsindhu
Copy link
Author

bharatsindhu commented Jun 24, 2019 via email

@danielnelson
Copy link
Contributor

Sure, here is the link to the instructions for building from source.

@danielnelson
Copy link
Contributor

@bharatsindhu Can you clarify why you closed the issue, do you still need this feature?

@bharatsindhu
Copy link
Author

I thought since it has been added to the next milestone, It can be closed.
Though, I was able to build it myself but It would be a good feature for the anyone else.
I'll reopen it.

@bharatsindhu bharatsindhu reopened this Jun 25, 2019
@danielnelson
Copy link
Contributor

👍 We only have it scheduled for now, once it has been implemented then we will close the issue and at that point building the master branch from source, or after waiting a day for the nightly builds to update, it should be possible for you test out the changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/prometheus feature request Requests for new plugin and for new features to existing plugins
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants