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 an
internet-monitoring
Docker config, which exposes a Grafana dashboard with historical 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!
- Shelly Plug Monitoring: Installs a
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 theshelly_plug_*
vars inconfig.yml
.) - Starlink Monitoring: Installs a
starlink
prometheus exporter and a Grafana dashboard, which tracks and displays Starlink statistics. (This is disabled by default. Enable and configure using thestarlink_enable
var inconfig.yml
.)
IMPORTANT NOTE: If you use this playbook, 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!
- Install Ansible (either full version or ansible-base).
- Install requirements:
ansible-galaxy collection install -r requirements.yml
- Make copies of the following files and customize them to your liking:
-
example.inventory.ini
toinventory.ini
(replace IP address with your Pi's IP). -example.config.yml
toconfig.yml
- Run the playbook:
ansible-playbook main.yml
MIT
This project was created in 2021 by Jeff Geerling.