From ec5ea0b266483b4abe88cb15cfa2b2a9a649e781 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 17 Mar 2026 10:27:52 +0700 Subject: [PATCH] =?UTF-8?q?fix:=20WordPress=20Health-Check=20pr=C3=BCft=20?= =?UTF-8?q?wp-cron.php=20direkt=20statt=20Redirect=20=C3=BCber=20Cloudflar?= =?UTF-8?q?e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- homelab-ai-bot/core/wordpress_client.py | 6 +++--- homelab-ai-bot/monitor.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/homelab-ai-bot/core/wordpress_client.py b/homelab-ai-bot/core/wordpress_client.py index c7f57a65..d29240c4 100644 --- a/homelab-ai-bot/core/wordpress_client.py +++ b/homelab-ai-bot/core/wordpress_client.py @@ -63,9 +63,9 @@ def check_connectivity() -> bool: try: if not WP_URL or not WP_PASSWORD: return False - result = _request("/posts?per_page=1") - return result is not None - except: + resp = requests.get(f"{WP_URL}/wp-cron.php", timeout=8, allow_redirects=False) + return resp.status_code < 400 + except Exception: return False diff --git a/homelab-ai-bot/monitor.py b/homelab-ai-bot/monitor.py index 3585aac8..3947de27 100644 --- a/homelab-ai-bot/monitor.py +++ b/homelab-ai-bot/monitor.py @@ -41,7 +41,7 @@ CRITICAL_CONTAINERS = [101, 109, 111, 112, 113, 115] HTTP_HEALTH_CHECKS = [ # LAN-IPs direkt prüfen — kein Cloudflare-Umweg, keine Tailscale-Routing-Probleme - {"name": "WordPress (CT 101)", "url": "http://10.10.10.101"}, + {"name": "WordPress (CT 101)", "url": "http://10.10.10.101/wp-cron.php"}, {"name": "Matomo (CT 113)", "url": "http://10.10.10.113"}, {"name": "Grafana (CT 110)", "url": "http://10.10.10.110:3000"}, ]