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

16
scripts/check-oom.sh Executable file
View File

@@ -0,0 +1,16 @@
#!/bin/bash
# Check for OOM killer events
SEND_NTFY="/usr/local/bin/send-ntfy.sh"
STATE_FILE="/var/run/oom-check.state"
OOM_COUNT=$(dmesg 2>/dev/null | grep -c "killed process" || echo 0)
LAST_COUNT=0
[ -f "$STATE_FILE" ] && LAST_COUNT=$(cat "$STATE_FILE" 2>/dev/null || echo 0)
if [ "$OOM_COUNT" -gt "$LAST_COUNT" ]; then
NEW_KILLS=$((OOM_COUNT - LAST_COUNT))
$SEND_NTFY critical "OOM Killer Active" "🔴 CRITICAL: OOM killed $NEW_KILLS process(es)!" "skull,error"
fi
echo $OOM_COUNT > "$STATE_FILE"
logger -t oom-monitor "OOM: $OOM_COUNT kills"