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

support http header in input prometheus_scrape for bearer token #7759

Closed
helmut72 opened this issue Jul 26, 2023 · 11 comments · Fixed by #7785
Closed

support http header in input prometheus_scrape for bearer token #7759

helmut72 opened this issue Jul 26, 2023 · 11 comments · Fixed by #7785

Comments

@helmut72
Copy link

Is your feature request related to a problem? Please describe.

For example Watchtower provides metrics through an enabled API. This API is ideally secured with a token:
https://containrrr.dev/watchtower/metrics/

Describe the solution you'd like

Support http headers in input prometheus_scrape for bearer tokens like it's possible for output prometheus_remote_write

@patrick-stephens
Copy link
Contributor

patrick-stephens commented Jul 27, 2023

I think there were some general HTTP header improvements in the works, I'm sure I saw an issue or PR somewhere...

It was discussed in a community meeting, @braydonk was it with you?

@helmut72
Copy link
Author

Would be great.

@patrick-stephens
Copy link
Contributor

This is now covered via #7785

@patrick-stephens patrick-stephens linked a pull request Aug 4, 2023 that will close this issue
@braydonk
Copy link
Contributor

braydonk commented Aug 4, 2023

This wasn't me discussing it in the community meeting, but taking a look at the PR it looks good to me!

@helmut72
Copy link
Author

helmut72 commented Aug 4, 2023

This was fast, thank you!

@patrick-stephens
Copy link
Contributor

Until a release is out, you can grab the test images/packages from the nightly builds to verify.

@helmut72
Copy link
Author

helmut72 commented Aug 7, 2023

Where can I find nightly docker images?

Nothing here:
https://hub.docker.com/r/fluent/fluent-bit/

There is no overview at cr.fluentbit.io/fluent/fluent-bit about the name of the nightly builds. I found cr.fluentbit.io here:
https://docs.fluentbit.io/manual/installation/docker

Also found something there:
https://github.com/fluent/fluent-bit/tree/master/dockerfiles:
But ghcr.io/fluent/fluent-bit/master ("images built on each push to master") is v1.9.4 ...

Thanks

@patrick-stephens
Copy link
Contributor

https://github.com/fluent/fluent-bit/tree/master/.github/workflows#unstablenightly-builds

Images are available in ghcr.io and packages can be downloaded from the build jobs themselves: https://github.com/fluent/fluent-bit/actions/workflows/cron-unstable-build.yaml

@helmut72
Copy link
Author

helmut72 commented Aug 7, 2023

Thank you. I have tested with Watchtower and Gitea and it works 🎉

@patrick-stephens
Copy link
Contributor

Great, might be worth adding an example to the docs just to show it explicitly if you have time.

@helmut72
Copy link
Author

helmut72 commented Aug 8, 2023

Here is an example, but it's not much different to current prometheus_scrape example:

[INPUT]
    name         prometheus_scrape
    tag          gitea
    host         172.17.1.1
    port         3000
    bearer_token verysecret

[OUTPUT]
    name  stdout
    match gitea

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants