diff --git a/health-agent/deploy/prod.env b/health-agent/deploy/prod.env index 4073bf7..1d6240f 100644 --- a/health-agent/deploy/prod.env +++ b/health-agent/deploy/prod.env @@ -1,2 +1,2 @@ -SOURCE_IMAGE_DIGEST=registry.tarla.io/iklimco/health-agent@sha256:196bb9b1cbb7acd7cd8671f7a3e9e3f0078a0c74658c66c9c22881fa66d75242 +SOURCE_IMAGE_DIGEST=registry.tarla.io/iklimco/health-agent@sha256:651733aa901c5a8736495c4c9535599629fb8e0c40b472028020569733865813 PROD_IMAGE_TAG=0.1.0 \ No newline at end of file diff --git a/health-agent/scripts/setup_uptime_kuma.py b/health-agent/scripts/setup_uptime_kuma.py index 8a9294e..d34830c 100644 --- a/health-agent/scripts/setup_uptime_kuma.py +++ b/health-agent/scripts/setup_uptime_kuma.py @@ -261,8 +261,11 @@ def setup_uptime_kuma(dry_run=False, only=None): "hostname": hostname, "port": 53, "accepted_statuscodes": ["200-299"], + "dns_resolve_server": "1.1.1.1", "dns_resolve_type": dns_resolve_type, "interval": interval, + "url": "https://", + "conditions": [], } if parent_group_id is not None: kwargs["parent"] = parent_group_id @@ -280,8 +283,11 @@ def setup_uptime_kuma(dry_run=False, only=None): "hostname": hostname, "port": 53, "accepted_statuscodes": ["200-299"], + "dns_resolve_server": "1.1.1.1", "dns_resolve_type": dns_resolve_type, "interval": interval, + "url": "https://", + "conditions": [], } if parent_group_id is not None: kwargs["parent"] = parent_group_id diff --git a/health-agent/src/health_agent/checks/http.py b/health-agent/src/health_agent/checks/http.py index 5191392..257d721 100644 --- a/health-agent/src/health_agent/checks/http.py +++ b/health-agent/src/health_agent/checks/http.py @@ -140,11 +140,14 @@ def check_vault(): max_ping = max(max_ping, ms) if resp is not None: - data = resp.json() - if not data.get("sealed"): - unsealed_count += 1 - else: - errors.append(f"{node} SEALED") + try: + data = resp.json() + if not data.get("sealed"): + unsealed_count += 1 + else: + errors.append(f"{node} SEALED") + except Exception as e: + errors.append(f"{node} invalid response: {resp.status_code}") else: errors.append(f"{node} unreachable: {err}")