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 REST API #28

Open
weiss opened this issue Jul 21, 2022 · 4 comments
Open

Add REST API #28

weiss opened this issue Jul 21, 2022 · 4 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@weiss
Copy link
Member

weiss commented Jul 21, 2022

Include a mod_rest module to expose the eturnalctl commands via HTTP.

@weiss weiss added the enhancement New feature or request label Jul 21, 2022
@weiss weiss added this to the 2.0.0 milestone Jul 21, 2022
@weiss weiss self-assigned this Jul 21, 2022
@matiaslopezd
Copy link

matiaslopezd commented Aug 4, 2022

Would be cool to add an endpoint for monitoring! Maybe return a number of active connections? Also, can setting whitelisted IPs for access to the Rest API would be nice!

@weiss
Copy link
Member Author

weiss commented Aug 4, 2022

Would be cool to add an endpoint for monitoring! Maybe return a number of active connections?

Have you seen mod_stats_prometheus and the metrics it returns?

@matiaslopezd
Copy link

matiaslopezd commented Aug 5, 2022

Nice! 👏🏻 In terms of security is better to put a proxy server like Nginx in front of Prometheus port? The idea is to restrict which IPs can access that endpoint. The Internet is too dangerous 🥲

@weiss
Copy link
Member Author

weiss commented Aug 5, 2022

In terms of security is better to put a proxy server like Nginx in front of Prometheus port? The idea is to restrict which IPs can access that endpoint.

Yes, I'd recommend using some reverse proxy like Nginx. For just restricting access based on IP addresses, some nftables/whatever rule would do the trick as well of course, but I guess it's generally not a bad idea to put a proper, battle-tested and full-featured web server in front of such API endpoints. (Plus in practice I often end up wanting to make different endpoints available on the same system via https://example.com/foo and https://example.com/bar, which requires a proxy anyway.)

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

No branches or pull requests

2 participants