2.7 KiB
2.7 KiB
Homelab Monitoring & Alerting Setup
Overview
| Service | Host | Port | Purpose |
|---|---|---|---|
| Ntfy | Homelab VM | 8081 | Push notifications |
| Grafana | Homelab VM | 3300 | Dashboards & alerting |
| Prometheus | Homelab VM | 9090 | Metrics collection |
| Uptime Kuma | rpi5 | 3001 | Uptime monitoring |
Ntfy Setup
Access
- Web UI:
http://192.168.0.210:8081 - Subscribe to topics:
http://192.168.0.210:8081/<topic>
Recommended Topics
alerts- Critical system alertshomelab- General notificationsupdates- Container update notifications
Mobile App Setup
- Install Ntfy app (Android/iOS)
- Add server:
http://192.168.0.210:8081(or your public URL) - Subscribe to topics:
alerts,homelab
Test Notification
curl -d "Test notification from homelab" http://192.168.0.210:8081/alerts
Grafana Alerting
Access
- URL:
http://192.168.0.210:3300
Configure Ntfy Contact Point
- Go to: Alerting → Contact Points → Add
- Name:
Ntfy - Type:
Webhook - URL:
http://NTFY:80/alerts(internal) orhttp://192.168.0.210:8081/alerts - HTTP Method:
POST
Configure Email Contact Point (SMTP)
- Edit
grafana.inior use environment variables:
[smtp]
enabled = true
host = smtp.gmail.com:587
user = your-email@gmail.com
password = "REDACTED_PASSWORD"
from_address = your-email@gmail.com
Sample Alert Rules
- CPU > 80% for 5 minutes
- Memory > 90% for 5 minutes
- Disk > 85%
- Container down
Uptime Kuma Notifications
Access
- URL:
http://<rpi5-ip>:3001
Add Ntfy Notification
- Settings → Notifications → Setup Notification
- Type:
Ntfy - Server URL:
http://192.168.0.210:8081 - Topic:
alerts - Priority:
high(for critical) ordefault
Add Email Notification (SMTP)
- Settings → Notifications → Setup Notification
- Type:
SMTP - Host:
smtp.gmail.com - Port:
587 - Security:
STARTTLS - Username: your email
- Password: app password
- From: your email
- To: recipient email
Recommended Monitors
- All Portainer endpoints (HTTP)
- Key services: Gitea, Plex, Grafana, etc.
- External services you depend on
Watchtower Notifications
Watchtower can notify on container updates. Add to compose:
environment:
- WATCHTOWER_NOTIFICATIONS=shoutrrr
- WATCHTOWER_NOTIFICATION_URL=ntfy://192.168.0.210:8081/updates
Quick Test Commands
# Test Ntfy
curl -d "🔔 Test alert" http://192.168.0.210:8081/alerts
# Test with priority
curl -H "Priority: high" -H "Title: Critical Alert" \
-d "Something needs attention!" http://192.168.0.210:8081/alerts
# Test with tags/emoji
curl -H "Tags: warning,server" -d "Server alert" http://192.168.0.210:8081/homelab