Skip to content

Commit 16f9c91

Browse files
committed
Issue #3: Add Starlink monitoring configuration.
1 parent e8794b4 commit 16f9c91

File tree

5 files changed

+39
-0
lines changed

5 files changed

+39
-0
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ So that's what this is.
1313
- **Internet Monitoring**: Installs an [`internet-monitoring` Docker config](https://github.com/geerlingguy/internet-monitoring), which exposes a Grafana dashboard with historical uptime, ping stats, and speedtest results over time.
1414
- **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!
1515
- **Shelly Plug Monitoring**: Installs a [`shelly-plug-prometheus` exporter](https://github.com/geerlingguy/shelly-plug-prometheus) 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`.)
16+
- **Starlink Monitoring**: Installs a [`starlink` prometheus exporter](https://github.com/danopstech/starlink_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`.)
1617

1718
**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!
1819

example.config.yml

+2
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@ shelly_plug_enable: false
66
shelly_plug_hostname: my-shelly-plug-host-or-ip
77
shelly_plug_http_username: username
88
shelly_plug_http_password: password
9+
10+
starlink_enable: false

main.yml

+4
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,7 @@
2424
- name: Set up Shelly Plug Monitoring.
2525
ansible.builtin.import_tasks: tasks/shelly-plug.yml
2626
when: shelly_plug_enable
27+
28+
- name: Set up Starlink Monitoring.
29+
ansible.builtin.import_tasks: tasks/starlink.yml
30+
when: starlink_enable

tasks/starlink.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
- name: Ensure Starlink directory exists.
3+
file:
4+
path: ~/starlink-exporter
5+
state: directory
6+
mode: 0755
7+
8+
- name: Copy Starlink docker-compose template to Pi.
9+
ansible.builtin.template:
10+
src: templates/starlink-docker-compose.yml.j2
11+
dest: ~/starlink-exporter/docker-compose.yml
12+
mode: '0640'
13+
become: false
14+
15+
# TODO: The first time this playbook is run, the `pi` user may not be added
16+
# to the `docker` group, so this task may fail.
17+
- name: Ensure Starlink Prometheus exporter is running.
18+
community.docker.docker_compose:
19+
project_src: ~/starlink-exporter/
20+
build: false
21+
become: false
+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# {{ ansible_managed }}
2+
---
3+
version: "3"
4+
5+
services:
6+
starlink-exporter:
7+
container_name: starlink-exporter
8+
image: danopstech/starlink_exporter
9+
ports:
10+
- "9817:9817"
11+
restart: unless-stopped

0 commit comments

Comments
 (0)