Initial backup: 18 monitoring scripts + timers + docs

- 18 comprehensive monitoring checks
- 5 systemd timers (5min, 15min, hourly, daily, weekly)
- Complete documentation
- NTFY secure notification system
- Fixed debianvm disk space (91% to 57%)
- Fixed CloudReve integration
- Date: 2026-01-07
This commit is contained in:
PVE Monitoring System
2026-01-07 16:30:34 +08:00
commit 3a14fd2736
34 changed files with 1067 additions and 0 deletions

20
scripts/check-updates.sh Executable file
View File

@@ -0,0 +1,20 @@
#!/bin/bash
# Check for available system updates
set -euo pipefail
SEND_NTFY="/usr/local/bin/send-ntfy.sh"
# Update package cache
apt-get update -qq >/dev/null 2>&1 || true
# Count available updates
REGULAR_UPDATES=$(apt list --upgradable 2>/dev/null | grep -c "upgradable" || echo "0")
SECURITY_UPDATES=$(apt list --upgradable 2>/dev/null | grep -ic "security" || echo "0")
if [ "$SECURITY_UPDATES" -gt 0 ]; then
$SEND_NTFY warning "Security Updates Available" "🟡 WARNING: $SECURITY_UPDATES security update(s) available on PVE\nTotal updates: $REGULAR_UPDATES" "warning,package,shield"
elif [ "$REGULAR_UPDATES" -gt 10 ]; then
$SEND_NTFY info "System Updates Available" " INFO: $REGULAR_UPDATES system update(s) available on PVE" "package,info"
fi
logger -t updates-monitor "Updates: $REGULAR_UPDATES total, $SECURITY_UPDATES security"