#!/usr/bin/env bash # # Homelab monitoring, Part 4: Alerts to your phone # https://www.zadran.net/guides/homelab-monitoring-4-alerts-to-your-phone # Generated from the guide, last updated 2026-10-13. # # NO WARRANTY. This script is provided as is. You are responsible for # understanding what it does before running it, and for the consequences. # Take a backup first. See https://www.zadran.net/disclaimer # # Destructive steps are left commented out on purpose -- uncomment them # only once you have understood what they do. # # Where the guide writes a file with <<'EOF' and your values are in it, # this script uses < /opt/monitoring/grafana/provisioning/alerting/alerting.yaml <&1 | grep -iE 'level=error.*(alert|provision)' || echo "no errors" # !! DESTRUCTIVE -- review, then uncomment to run: # systemctl stop prometheus-node-exporter systemctl start prometheus-node-exporter