diff --git a/root/monitoring/docker-compose.yml b/root/monitoring/docker-compose.yml deleted file mode 100644 index 7ab70d1108..0000000000 --- a/root/monitoring/docker-compose.yml +++ /dev/null @@ -1,15 +0,0 @@ -version: "3.8" - -services: - uptime-kuma: - image: louislam/uptime-kuma:latest - container_name: uptime-kuma - restart: unless-stopped - volumes: - - /root/monitoring/uptime-kuma:/app/data - ports: - - "127.0.0.1:3001:3001" # nur lokal, reverse proxy via nginx empfohlen - extra_hosts: - - "proxmox.cutemeli.com:10.10.0.1" - - "share.cutemeli.com:10.10.0.1" - - "monitor.cutemeli.com:10.10.0.1" diff --git a/root/monitoring/host-health.sh b/root/monitoring/host-health.sh deleted file mode 100755 index 3c2b299d9b..0000000000 --- a/root/monitoring/host-health.sh +++ /dev/null @@ -1,93 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -# ==== KONFIG ==== -PUSH_URL="http://127.0.0.1:3001/api/push/O2EhJUkH4n" -LOG_FILE="/var/log/host-health.log" - -CURL="/usr/bin/curl" -SYSTEMCTL="/bin/systemctl" -DATESTAMP="$(date -Is)" - -# Warn- und Kritisch-Schwellen -CPU_WARN=5.0 # Load > 5 Warnung -CPU_CRIT=10.0 # Load > 10 kritisch -RAM_WARN=85 # >85% RAM Warnung -RAM_CRIT=95 # >95% RAM kritisch -DISK_WARN=80 # >80% Disk Warnung -DISK_CRIT=95 # >95% Disk kritisch - -# ==== MESSWERTE ==== -CPU_LOAD="$(awk '{print $1}' /proc/loadavg)" -RAM_PCT="$(free | awk '/Mem:/ {printf "%.0f", ($3/$2)*100}')" -DISK_PCT="$(df -P / | awk 'NR==2 {gsub("%","",$5); print $5}')" - -# Ping zur Default-Gateway oder extern (hier Google DNS) -PING_MS="$(ping -c1 -W1 8.8.8.8 | awk -F'time=' '/time=/{print $2}' | cut -d' ' -f1 || echo "NaN")" - -# Dienste-Status -svc_ok () { $SYSTEMCTL is-active --quiet "$1" && echo OK || echo FAIL; } -NGINX_STATUS="$(svc_ok nginx)" -DOCKER_STATUS="$(svc_ok docker)" -WG_STATUS="$(svc_ok wg-quick@wg0)" -PVEVM_STATUS="$(svc_ok proxmox-vm)" - -# ==== STATUS LOGIK ==== -STATUS="up" -MSG="" - -# CPU Check -if (( $(echo "$CPU_LOAD > $CPU_CRIT" | bc -l) )); then - STATUS="down"; MSG+="CPU:CRIT(${CPU_LOAD}) " -elif (( $(echo "$CPU_LOAD > $CPU_WARN" | bc -l) )); then - MSG+="CPU:WARN(${CPU_LOAD}) " -else - MSG+="CPU:${CPU_LOAD} " -fi - -# RAM Check -if [ "$RAM_PCT" -ge "$RAM_CRIT" ]; then - STATUS="down"; MSG+="RAM:CRIT(${RAM_PCT}%) " -elif [ "$RAM_PCT" -ge "$RAM_WARN" ]; then - MSG+="RAM:WARN(${RAM_PCT}%) " -else - MSG+="RAM:${RAM_PCT}% " -fi - -# Disk Check -if [ "$DISK_PCT" -ge "$DISK_CRIT" ]; then - STATUS="down"; MSG+="DISK:CRIT(${DISK_PCT}%) " -elif [ "$DISK_PCT" -ge "$DISK_WARN" ]; then - MSG+="DISK:WARN(${DISK_PCT}%) " -else - MSG+="DISK:${DISK_PCT}% " -fi - -# Dienste Check -for svc in NGINX:$NGINX_STATUS DOCKER:$DOCKER_STATUS WG:$WG_STATUS PVEVM:$PVEVM_STATUS; do - name="${svc%%:*}"; val="${svc##*:}" - if [ "$val" != "OK" ]; then - STATUS="down"; MSG+="$name:FAIL " - else - MSG+="$name:OK " - fi -done - -# Ping (nur Info) -MSG+="PING:${PING_MS}ms" - -# ==== PUSH ==== -HTTP_CODE="$($CURL -sS -o /tmp/kuma_push.out -w "%{http_code}" \ - --get \ - --data-urlencode "status=${STATUS}" \ - --data-urlencode "msg=${MSG}" \ - --data-urlencode "ping=${PING_MS}" \ - "${PUSH_URL}")" || true - -# Logging -echo "${DATESTAMP} status=${STATUS} msg='${MSG}' http=${HTTP_CODE}" >> "$LOG_FILE" - -if [[ "$HTTP_CODE" != "200" ]]; then - echo "${DATESTAMP} ERROR: Kuma Push HTTP ${HTTP_CODE}" >> "$LOG_FILE" - exit 1 -fi diff --git a/root/monitoring/uptime-kuma/error.log b/root/monitoring/uptime-kuma/error.log deleted file mode 100644 index f354807548..0000000000 --- a/root/monitoring/uptime-kuma/error.log +++ /dev/null @@ -1,4 +0,0 @@ -[2025-10-02 16:37:39] [Error: insert into `heartbeat` (`down_count`, `duration`, `important`, `monitor_id`, `msg`, `status`, `time`) values (0, 0, true, 7, 'queryA ETIMEOUT 217.154.245.77', 0, '2025-10-02 14:37:16.510') - SQLITE_CONSTRAINT: FOREIGN KEY constraint failed] { - errno: 19, - code: 'SQLITE_CONSTRAINT' -} diff --git a/root/monitoring/uptime-kuma/kuma.db b/root/monitoring/uptime-kuma/kuma.db deleted file mode 100755 index 3abd2f46b9..0000000000 Binary files a/root/monitoring/uptime-kuma/kuma.db and /dev/null differ