Skip to content

Expose metrics from NGINX and Bind to Prometheus #39

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

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

The0mikkel
Copy link

This update is the docker-compose update for the NGINX and Bind export to Prometheus.

Please see #38 for further information about this update as this solves #38

In short, we have added two exporters, to export status from Bind and NGINX, such that Prometheus can scrape the data.
This update also includes network segregation, such that the exporters only have access to the services they need, and no more.
And we have updated the README.md, to include a short description of how to use the metrics.

The0mikkel and others added 6 commits October 28, 2023 17:16
Exposing zone statistic for Bind9 in web interface.
https://kb.isc.org/docs/monitoring-recommendations-for-bind-9

Co-authored-by: William Bergmann Børresen <ninkaninus@users.noreply.github.com>
Co-authored-by: William Bergmann Børresen <ninkaninus@users.noreply.github.com>
Co-authored-by: William Bergmann Børresen <ninkaninus@users.noreply.github.com>
Co-authored-by: William Bergmann Børresen <ninkaninus@users.noreply.github.com>
This also adds labels for the ease of filtering in Prometheus/Grafana

Co-authored-by: William Bergmann Børresen <ninkaninus@users.noreply.github.com>
Co-authored-by: William Bergmann Børresen <ninkaninus@users.noreply.github.com>
Copy link

stale bot commented Mar 13, 2024

This issue has been automatically marked as inactive because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the inactive label Mar 13, 2024
@The0mikkel
Copy link
Author

The0mikkel commented Apr 8, 2024

This is still awating review.
Since original creation, it has been tested and used at multiple LAN parties.

When looking at the issue, there seems to be an interest in getting these features. If not all, then some.

@stale stale bot removed the inactive label Apr 8, 2024
Copy link

stale bot commented Jan 21, 2025

This issue has been automatically marked as inactive because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the inactive label Jan 21, 2025
@The0mikkel
Copy link
Author

This is still awating review.

@stale stale bot removed the inactive label Jan 25, 2025
@Lepidopterist
Copy link
Member

I think this is a nice addition, but I'm torn as to whether it should be included by default.

My gut feeling would be to include the env var in the .env file, but provide a "docker-compose.yml.prometheus" that can be used if you want to run with the Prometheus backend. We can update the Readme.md to include instructions to run with the Prometheus backend. Thoughts @lancachenet/core ?

@The0mikkel
Copy link
Author

The0mikkel commented Feb 23, 2025

Having an alternative docker compose file, would definitely allow for flexibility, while preserving ease of use for current users.
It could easily be used with docker compose -f prometheus.docker-compose.yml up -d, utalizing the -f flag.

The update does not really need the .env update (or it is so small, it won't impact the "simple" version). Making a seperate for that would probably be overkill.

Looking at the docker-compose.yml file now, I can see that multiple elements have changed in the Docker compose ecosystem since it was written.
A strong example of this, is the removal of version being required (and now throwing a warning in up-to-date systems. I'm no fan of this...).
But let that be an element for another update.

@The0mikkel
Copy link
Author

The0mikkel commented Mar 9, 2025

I have updated the PR with the metrics exports being split into a seperate file called docker-compose.metrics.yml, and added a lot more documentation on the use of the exports, as well as added grafana dashboards for them.

Just to note, the lancachenet/lancache-dns#140 PR needs to be merged, before the metrics docker compose file will work correctly.

Copy link
Member

@Lepidopterist Lepidopterist left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also LGTM, based on the lancache-dns changes being merged.

@Lepidopterist Lepidopterist requested a review from VibroAxe March 9, 2025 21:45
@Lepidopterist
Copy link
Member

FYI, we have an event next week so we will likely test it off there before fully committing the PR.

@The0mikkel
Copy link
Author

If anything seems unclear, when setting up the system, then you are more than welcome to reach out, so that we can get that fixed and documented.
Quite a good thing to test it, before committing.

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.

2 participants