added watchdog excluded list
This commit is contained in:
+14
-9
@@ -163,10 +163,10 @@ ARRAY_START_SCRIPTS=(
|
||||
"Transcodes/ramdisk_setup.sh" # creates ramdisk + symlink before Emby starts
|
||||
"unRAID_Essentials/docker_syslog_filter.sh" # suppress veth noise before logs fill
|
||||
"unRAID_Essentials/php_fpm_max_children.sh" # WebGUI performance tuning
|
||||
#"Docker_Essentials/docker_network_connect.sh" # connect containers to extra networks
|
||||
"Docker_Essentials/docker_network_connect.sh" # connect containers to extra networks
|
||||
"unRAID_Essentials/system_watchdog.sh" # system health monitor — continuous loop
|
||||
"Docker_Essentials/docker_watchdog.sh" # container health monitor — continuous loop
|
||||
#"Failover/failover.sh" # mutual failover — continuous loop
|
||||
"Failover/failover.sh" # mutual failover — continuous loop
|
||||
)
|
||||
|
||||
# ━━━ Daily Sync Maintenance ━━━
|
||||
@@ -254,9 +254,9 @@ MEDIA_MANAGEMENT_JOBS=(
|
||||
"Media/media_shares_permissions.sh" # apply permissions — runs first
|
||||
"Media/media_cleaner.sh anime" # remove junk from anime shares
|
||||
"Media/media_cleaner.sh media" # remove junk from media shares
|
||||
#"Media/lidarr_cleanup.sh" # remove orphaned music files
|
||||
#"Media/sonarr_cleanup.sh" # remove orphaned TV files
|
||||
#"Media/radarr_cleanup.sh" # remove orphaned movie files
|
||||
"Media/lidarr_cleanup.sh" # remove orphaned music files
|
||||
"Media/sonarr_cleanup.sh" # remove orphaned TV files
|
||||
"Media/radarr_cleanup.sh" # remove orphaned movie files
|
||||
)
|
||||
|
||||
# ==============================================================================================
|
||||
@@ -718,7 +718,12 @@ HOST2_WATCHDOG_REQUIRED_CONTAINERS=(
|
||||
# Containers to skip in Tier 2 scan entirely
|
||||
# Useful for containers that legitimately exit/restart frequently
|
||||
WATCHDOG_SCAN_IGNORE=(
|
||||
# "container-name"
|
||||
"DashGate"
|
||||
"PIA-WG-Config-Generator"
|
||||
"Aperture"
|
||||
"Aperture-Kids"
|
||||
"pgvector-18-Apeture-Kids"
|
||||
"Pgvector18-Aperture"
|
||||
)
|
||||
|
||||
# Individual Tier 2 check toggles — disable specific checks without disabling Tier 2
|
||||
@@ -944,7 +949,7 @@ LIDARR_PROTECTED_PATTERNS=(
|
||||
# NEVER deleted — cover art, metadata, lyrics
|
||||
# Lidarr generates these but doesn't include them in trackFile API
|
||||
# Without this protection cleanup would delete all your artwork
|
||||
LIDARR_MAX_DELETE_GB=5 # require --i-know-what-im-doing if deletion exceeds this
|
||||
LIDARR_MAX_DELETE_GB=1 # require --i-know-what-im-doing if deletion exceeds this
|
||||
LIDARR_MIN_TRACKED_PCT=80 # abort if tracked count drops below this % of last run
|
||||
# protects against API returning partial data on a bad day
|
||||
LIDARR_TRACKED_COUNT_FILE="$DATA_DIR/lidarr_tracked.count"
|
||||
@@ -975,7 +980,7 @@ declare -A HOST2_SONARR_PATH_MAP=(
|
||||
)
|
||||
|
||||
SONARR_ORPHAN_AGE=7 # days — files must be older than this before eligible for deletion
|
||||
SONARR_MAX_DELETE_GB=10 # require --i-know-what-im-doing if deletion exceeds this
|
||||
SONARR_MAX_DELETE_GB=1 # require --i-know-what-im-doing if deletion exceeds this
|
||||
SONARR_EXTENSIONS=("mkv" "mp4" "avi" "m4v" "ts" "wmv" "mov")
|
||||
SONARR_PROTECTED_PATTERNS=(
|
||||
# Subtitles
|
||||
@@ -1020,7 +1025,7 @@ declare -A HOST2_RADARR_PATH_MAP=(
|
||||
)
|
||||
|
||||
RADARR_ORPHAN_AGE=7 # days — files must be older than this before eligible for deletion
|
||||
RADARR_MAX_DELETE_GB=15 # require --i-know-what-im-doing if deletion exceeds this
|
||||
RADARR_MAX_DELETE_GB=1 # require --i-know-what-im-doing if deletion exceeds this
|
||||
RADARR_EXTENSIONS=("mkv" "mp4" "avi" "m4v" "wmv" "mov")
|
||||
RADARR_PROTECTED_PATTERNS=(
|
||||
# Subtitles
|
||||
|
||||
@@ -147,6 +147,8 @@ fi
|
||||
# Reboot log
|
||||
if [[ -f "$SYS_WATCHDOG_REBOOT_LOG" ]]; then
|
||||
TOTAL_REBOOTS=$(grep -c "." "$SYS_WATCHDOG_REBOOT_LOG" 2>/dev/null || echo 0)
|
||||
TOTAL_REBOOTS="${TOTAL_REBOOTS//[^0-9]/}"
|
||||
TOTAL_REBOOTS="${TOTAL_REBOOTS:-0}"
|
||||
WEEK_EPOCH=$(date -d "7 days ago" +%s)
|
||||
WEEK_REBOOTS=$(awk -v cutoff="$WEEK_EPOCH" '$1 >= cutoff' \
|
||||
"$SYS_WATCHDOG_REBOOT_LOG" 2>/dev/null | wc -l)
|
||||
@@ -207,6 +209,8 @@ echo " ${LOAD_ICON} Load avg: $LOAD (threshold: ${LOAD_THRESH} = ${SYS_WATCH
|
||||
ZOMBIE_COUNT=$(ps aux | awk '{print $8}' | grep -c "^Z$" 2>/dev/null || echo 0)
|
||||
ZOMBIE_COUNT="${ZOMBIE_COUNT//[^0-9]/}"
|
||||
ZOMBIE_COUNT="${ZOMBIE_COUNT:-0}"
|
||||
ZOMBIE_COUNT="${ZOMBIE_COUNT//[^0-9]/}"
|
||||
ZOMBIE_COUNT="${ZOMBIE_COUNT:-0}"
|
||||
[[ "$ZOMBIE_COUNT" -ge "${SYS_WATCHDOG_ZOMBIE_LIMIT:-50}" ]] && \
|
||||
ZOMBIE_ICON="⚠️ " || ZOMBIE_ICON="✅"
|
||||
echo " ${ZOMBIE_ICON} Zombies: $ZOMBIE_COUNT (threshold: ${SYS_WATCHDOG_ZOMBIE_LIMIT})"
|
||||
@@ -288,15 +292,24 @@ if command -v docker >/dev/null 2>&1; then
|
||||
RUNNING=$(docker ps -q 2>/dev/null | wc -l)
|
||||
TOTAL=$(docker ps -aq 2>/dev/null | wc -l)
|
||||
UNHEALTHY=$(docker ps --filter health=unhealthy -q 2>/dev/null | wc -l)
|
||||
STOPPED=$(docker ps -af "status=exited" --format "{{.Names}}" 2>/dev/null)
|
||||
STOPPED_COUNT=$(echo "$STOPPED" | grep -c . 2>/dev/null || echo 0)
|
||||
|
||||
# Filter intentionally stopped containers from the stopped list
|
||||
STOPPED_FILTERED=()
|
||||
while IFS= read -r name; do
|
||||
[[ -z "$name" ]] && continue
|
||||
SKIP=false
|
||||
for ignore in "${WATCHDOG_SCAN_IGNORE[@]:-}"; do
|
||||
[[ "$name" == "$ignore" ]] && SKIP=true && break
|
||||
done
|
||||
[[ "$SKIP" == false ]] && STOPPED_FILTERED+=("$name")
|
||||
done < <(docker ps -af "status=exited" --format "{{.Names}}" 2>/dev/null)
|
||||
STOPPED_COUNT="${#STOPPED_FILTERED[@]}"
|
||||
|
||||
echo " Running: $RUNNING / $TOTAL total"
|
||||
[[ "$UNHEALTHY" -gt 0 ]] && echo " ⚠️ Unhealthy: $UNHEALTHY"
|
||||
if [[ "$STOPPED_COUNT" -gt 0 ]]; then
|
||||
echo " ⚠️ Stopped containers:"
|
||||
echo "$STOPPED" | head -10 | while IFS= read -r name; do
|
||||
[[ -z "$name" ]] && continue
|
||||
echo " ⚠️ Stopped containers (unexpected):"
|
||||
for name in "${STOPPED_FILTERED[@]}"; do
|
||||
echo " → $name"
|
||||
done
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user