geerlingguy / internet-pi
- суббота, 26 июня 2021 г. в 00:28:57
Raspberry Pi config for all things Internet.
A Raspberry Pi Configuration for Internet connectivity
I have had a couple Pis doing random Internet-related duties for years. It's finally time to formalize their configs and make all the DNS/ad-blocking/monitoring stuff encapsulated into one Ansible project.
So that's what this is.
Internet Monitoring: Installs Prometheus and Grafana, along with a few Docker containers to monitor your Internet connection with Speedtest.net speedtests and HTTP tests so you can see uptime, ping stats, and speedtest results over time.
Pi-hole: Installs the Pi-hole Docker configuration so you can use Pi-hole for network-wide ad-blocking and local DNS. Make sure to update your network router config to direct all DNS queries through your Raspberry Pi if you want to use Pi-hole effectively!
Other features:
shelly-plug-prometheus exporter and a Grafana dashboard, which tracks and displays power usage on a Shelly Plug running on the local network. (This is disabled by default. Enable and configure using the shelly_plug_* vars in config.yml.)starlink prometheus exporter and a Grafana dashboard, which tracks and displays Starlink statistics. (This is disabled by default. Enable and configure using the starlink_enable var in config.yml.)IMPORTANT NOTE: If you use the included Internet monitoring, it will download a decently-large amount of data through your Internet connection on a daily basis. Don't use it, or tune the internet-monitoring setup to not run the speedtests as often, if you have a metered connection!
sudo apt-get install -y python3-pippip3 install ansibleansible-galaxy collection install -r requirements.ymlexample.inventory.ini to inventory.ini (replace IP address with your Pi's IP, or comment that line and uncomment the connection=local line if you're running it on the Pi you're setting up).
- example.config.yml to config.ymlansible-playbook main.ymlVisit the Pi's IP address (e.g. http://192.168.1.10/) and use the pihole_password you configured in your config.yml file.
Visit the Pi's IP address with port 3030 (e.g. http://192.168.1.10:3030/), and log in with username admin and the password monitoring_grafana_admin_password you configured in your config.yml.
Note: The
monitoring_grafana_admin_passwordis only used the first time Grafana starts up; if you need to change it later, do it via Grafana's admin UI.
A guide for backing up your configurations and monitoring data, and for keeping everything up to date is being worked on in Issue #7: Create upgrade / update guide.
MIT
This project was created in 2021 by Jeff Geerling.