Part of the reason I want to have the monitoring stack installed, is to install the Internet Pi by Jeff Geerling. Internet Pi was managed via Docker Compose and deployed using Ansible. For me, I want it on my kubernetes cluster.
Internet Pi comes with quite a lot of stuffs:
- nginx-proxy: as ingress, which I don’t need (I have metallb)
- pi-hole: I already have it
- shelly plug monitoring: tracks shelly plug power usage. No need for me
- air gradient monitoring: nope
- starlink monitoring: nope
- prometheus: already installed by kube-prometheus
- grafana: already installed by kube-prometheus, but I need Jeff’s dashboard
- node exporter: already installed by kube-prometheus
- blackbox exporter: for the metrics of probing target endpoints, already installed by kube-prometheus, but need to setup probe
- speedtest exporter: for speed test metrics
Import Grafana Dashboard
Jeff has already provided the rendered dashboard at here, I just need to import it in the values
section of the example.jsonnet
used in previous blog.
|
|
Note that I also added a plugin that required in the dashboard. Then build and apply the change.
Create Probe Custom Resource for Blackbox Exporter
Prometheus Operator uses Probe
custom resource to configure Prometheus with Blackbox Exporter. My use case is simple:
|
|
Install Speedtest Exporter
Firstly, deploy a deployment and service for it.
|
|
Then deploy a ServiceMonitor custom resource for Prometheus service discovery so it knows to scrape this service.
|
|
That’s it. Once all of these steps are done, both blackbox probe and speedtest exporter should be seen in Prometheus /targets
(e.g. https://<local-ip>:9090/targets
). And later the metrics should show up in the Internet Connection
dashboard!