geerlingguy / internet-pi

Raspberry Pi config for all things Internet.
MIT License
4.17k stars 445 forks source link

Install on top of existing Prometheus and grafana docker? #306

Open everything13 opened 2 years ago

everything13 commented 2 years ago

I already have Pi-Hole, Prometheus and grafana Dockers running on my Pi as I have a dashboard setup for monitoring the rpi. Is there any way I can set up the internet pi as a separate dashboard within my existing grafana and Prometheus dockers?

martinbrose commented 2 years ago

Yes, I had the same problem. I think you have a conflict for port 9090 (for prometheus).

I changed the internet-pi's use of 9090 to 9080. For this, I had to perform two changes:

.internet-monitoring/docker-compose.yml Change prometheus port setting from ports: - 9090:9090 to ports: - 9080:9090 This tells docker-compose to expose the containers internal port 9090 to external 9080.

./templates/prometheus.yml.j2 - targets: ['localhost:9090'] to - targets: ['localhost:9080']

You will need to do something similar for grafana too, if your existing docker container uses port 3030 already. But I think it might be only in ./internet-monitoring/docker-compose.yml Change the port 3030 to a port of your choosing:

stale[bot] commented 2 years ago

This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark issues as stale.

johntdavis84 commented 2 years ago

Does this solution result in two Prometheus/Grafana containers running side by side (one standalone, and one part of the Internet Pi)?

I actually came here looking to see if there's a way to incorporate Internet Pi into an existing Grafana/Prometheus service so I just have a single login to see all my dashboards in a single place.

stale[bot] commented 2 years ago

This issue is no longer marked for closure.

martinbrose commented 2 years ago

Pretty sure it would result in two Prometheus/Grafana containers running side by side.

If you want to add the internet monitoring to your existing Grafan/Prometheus, you would need to get creative and remove the Grafana/Prometheus tasks from the ansible internet-monitoring task (folder tasks). And then add the required configs from the folder templates, internet-monitoring/prometheus, and internet-monitoring/grafana into your existing installs. Plus, you would need to remove prometheus and grafana sections from the docker-compose.yml. And somehow you need to make sure that your existing Prometheus can reach the internet-pi docker containers. So quite a bit of complexity... but not unsolvable.

johntdavis84 commented 2 years ago

Thanks!

On further consideration, I think I’ll just let it run with its own Grafana/Prometheus. :)

On Jun 27, 2022, at 7:57 AM, martinbrose @.***> wrote:

Pretty sure it would result in two Prometheus/Grafana containers.

If you want to add the internet monitoring to your existing Grafan/Prometheus, you would need to get creative and remove the Grafana/Prometheus tasks from the ansible internet-monitoring task (folder tasks). And then add the required configs from the folder templates, internet-monitoring/prometheus, and internet-monitoring/grafana into your existing installs. Plus, you would need to remove prometheus and grafana sections from the docker-compose.yml. And somehow you need to make sure that your existing Prometheus can reach the internet-pi docker containers. So quite a bit of complexity... but not unsolvable.

— Reply to this email directly, view it on GitHub https://github.com/geerlingguy/internet-pi/issues/306#issuecomment-1167320293, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGI5CYWS74WDSHAL4SNSCW3VRGQNBANCNFSM5LSCNYPA. You are receiving this because you commented.

stale[bot] commented 1 year ago

This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark issues as stale.

stale[bot] commented 1 year ago

This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details.

github-actions[bot] commented 1 month ago

This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark issues as stale.