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

Add function to pass libmicrohttpd options when starting Prometheus listener #68

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sysvinit
Copy link

This commit adds a new function, promhttp_start_daemon_with_options(), which exposes the variadic options interface of MHD_start_daemon() to applications using prometheus-client-c. This would allow applications to e.g. bind to a specific IP address instead of the wildcard address, which is the libmicrohttpd default.

This is the same as promhttp_start_daemon(), except that it exposes
MHD_start_daemon()'s variadic options, to allow applications to pass flags
directly into libmicrohttpd. The use case for this functionality is to allow
the metrics listener to be bound to a specific socket address (instead of
binding to a given port on the wildcard address) using MHD_OPTION_SOCK_ADDR,
etc.
@sysvinit sysvinit requested a review from a team as a code owner March 16, 2022 13:08
@ggarber
Copy link

ggarber commented Aug 30, 2022

I think this is a great addition. I also need it!

@wferi
Copy link

wferi commented Apr 3, 2023

#79 enables a different approach: calling libmicrohttpd directly.

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 this pull request may close these issues.

3 participants