Well. That’s a mouthful huh?
I needed a way to monitor my network at home, so I set up a Raspberry Pi with Raspberry OS (really, Ubuntu for ARM but whatever). I then added InfluxDB, Grafana and Telegraf.
Setting this up this far took about an hour. Influx needs to be a specific version because ARM… And it’s a bit old, but works just fine. Grafana and Telegraf was simple enough.
I’ll make a full build guide one day, but here is my telegraf config, which was surprisingly complicated to get working properly.
This is written in the TOML language, which is more than human readable, but has a few quirks.
I use mullvad.net as my primary VPN solution. The only problem is, connecting to it bypasses my firewall’s routes to the vLAN’s I’ve set up. One of those VLAN’s has my TOR node, which I monitor through GeekTool 24/7. I do this by executing a SSH command and printing the output. However that’s not possible when using the VPN because, as stated previously, the route isn’t visible, so to speak.
No biggie, I’ll merely add a static route. This is how to do that in Mac OS X:
sudo route -n add -net [network/mask] [target gateway]
Which could become:
sudo route -n add -net 10.0.0.0/24 184.108.40.206
However, this is not persistent. This will only last until the machine is rebooted. For a persistent route, use the following instead:
sudo networksetup -setadditionalroutes Ethernet [destination[mask]] [subnet] [gateway]
which would translate into:
sudo networksetup -setadditionalroutes Ethernet 10.0.0.0/24 255.255.255.0 220.127.116.11