Pre-requisites
- K8S cluster with Rancher monitoring installed (K8S v1.23.16)
- Longhorn installed (v1.3.3)
kubectl create -f service-monitor.yaml
After this you should see this Prometheus target:
- longhorn-system/longhorn-prometheus-servicemonitor
- Log in to Grafana (username/password is in the rancher-monitoring-grafana secret).
- From the Grafana menu choose Dashboards, then Import.
- Paste the dashboard ID and load it. Specify to use the Prometheus datasource.
The dashboard can be found here and it's ID copied from that page.
Once done, you should see a dashboard named something like Longhorn v1.1.0.
kubectl create -f alerts.yaml
This is based on this. Only the namespace was changed.