This commit is contained in:
2026-03-16 14:02:00 +01:00
parent 8a84be4f5a
commit 0ee29bf356
7 changed files with 13 additions and 8 deletions

0
servers/linux/monitoring/bin/alert-engine.sh Normal file → Executable file
View File

5
servers/linux/monitoring/bin/check_disk.sh Normal file → Executable file
View File

@@ -20,6 +20,11 @@ CRITICAL=95
MOUNTS=("/" "/var" "/home")
for mount in "${MOUNTS[@]}"; do
# On vérifie si le point de montage existe avant de tester
if ! mountpoint -q "$mount"; then
continue
fi
used_pct="$(df -P "$mount" 2>/dev/null | awk 'NR==2 {gsub("%","",$5); print $5}')"
if [[ ! "$used_pct" =~ ^[0-9]+$ ]]; then

0
servers/linux/monitoring/bin/install-monitoring.sh Normal file → Executable file
View File

0
servers/linux/monitoring/bin/monitoring-update.sh Normal file → Executable file
View File

0
servers/linux/monitoring/bin/monitoring.sh Normal file → Executable file
View File

View File

@@ -24,9 +24,9 @@ ALERT_MAIL_BIN="/usr/sbin/sendmail"
ALERT_MAIL_SUBJECT_PREFIX="[monitoring]"
# ntfy
NTFY_SERVER="https://ntfy.a5l.fr"
NTFY_SERVER="https://ntfy.sh"
NTFY_TOPIC="TPOSOB84sBJ6HTZ7"
NTFY_TOKEN="VOTRE_TOKEN_ICI"
NTFY_TOKEN=""
# Déduplication en secondes
ALERT_DEDUP_WINDOW=3600

View File

@@ -22,12 +22,12 @@ HOSTNAME_FQDN="$(hostname -f 2>/dev/null || hostname)"
DEST="root"
NTFY_SERVER=""
NTFY_TOPIC=""
NTFY_SERVER="nfy.sh"
NTFY_TOPIC="TPOSOB84sBJ6HTZ7"
NTFY_TOKEN=""
UPDATE_ENABLED="true"
UPDATE_BASE_URL="https://git.abonnel.fr/cedricAbonnel/scripts-bash/raw/branch/main/servers/linux"
UPDATE_BASE_URL="https://git.abonnel.fr/cedricAbonnel/scripts-bash/raw/branch/main/servers/linux/monitoring"
UPDATE_MANIFEST_URL="${UPDATE_BASE_URL}/manifest.txt"
UPDATE_TIMEOUT_CONNECT=3
UPDATE_TIMEOUT_TOTAL=15