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

Discovery plugin #68

Open
SuperQ opened this issue Apr 12, 2022 · 4 comments
Open

Discovery plugin #68

SuperQ opened this issue Apr 12, 2022 · 4 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@SuperQ
Copy link

SuperQ commented Apr 12, 2022

Prometheus now supports built-time plugins.

It would be cool to convert the main package to a discovery plugin so that it could be built-in to Prometheus.

@maxbrunet
Copy link
Owner

Hey @SuperQ, thank you for letting me know, this sounds interesting.
Although I wonder how many users are building Prometheus from source or are willing to.

My opinion on Go plugins is not fully formed, but it does not seem straight forward to use for anything out-of-tree: https://www.reddit.com/r/golang/comments/b6h8qq/is_anyone_actually_using_go_plugins/ (could be outdated)
Otherwise file_sd has been a good option so far, I think the sidecar pattern is convenient and flexible for most.

I am open to consider a PR that would add this option.

@SuperQ
Copy link
Author

SuperQ commented Apr 13, 2022

Yes, we explored using actual Go plugins a couple times over the years and determined that they were unusable. This is why we went with the compile-time psudo-plugin thing. The compile-time option also means it would be easy to adopt the code in upstream Prometheus if it was popular enough.

Another way to do the sidecar is the new http_sd_configs option. Rather than having to directly attach the SD as a sidecar, you can run it as a separate service that exposes the targets as json over HTTP.

@maxbrunet maxbrunet added enhancement New feature or request help wanted Extra attention is needed labels Jul 1, 2022
@anarcher
Copy link

anarcher commented Feb 7, 2023

Support for http_sd_configs would be great! :-)

@maxbrunet
Copy link
Owner

maxbrunet commented Feb 7, 2023

Thank you for your interest @anarcher, I have created a separate issue for that: #318, PR welcome :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants