diff --git a/apps/api/src/api/v1/sentry_webhook.py b/apps/api/src/api/v1/sentry_webhook.py index cf12df45..4a3fdd00 100644 --- a/apps/api/src/api/v1/sentry_webhook.py +++ b/apps/api/src/api/v1/sentry_webhook.py @@ -76,6 +76,12 @@ class ErrorAnalysisResult(BaseModel): analyzed_by: str # ollama, claude +@router.get("/health") +async def sentry_webhook_health() -> dict: + """Wave A.6 Smoke Test: Sentry Webhook 可達性探測""" + return {"status": "ok", "webhook": "sentry"} + + @router.post("/error") async def handle_sentry_error( request: Request, diff --git a/scripts/alert_chain_smoke_test.py b/scripts/alert_chain_smoke_test.py index 730c3479..0ac02c46 100644 --- a/scripts/alert_chain_smoke_test.py +++ b/scripts/alert_chain_smoke_test.py @@ -44,7 +44,7 @@ except ImportError: DEFAULT_API_URL = "http://192.168.0.125:32334" SIGNOZ_URL = "http://192.168.0.188:3301" ALERTMANAGER_URL = "http://192.168.0.188:9093" -PROMETHEUS_URL = "http://192.168.0.188:9090" +PROMETHEUS_URL = "http://192.168.0.110:9090" # 告警鏈路最大允許靜默時間 (2 小時) MAX_ALERT_CHAIN_SILENCE_SECONDS = 2 * 60 * 60 @@ -172,7 +172,7 @@ def check_webhook_health(api_url: str) -> list[CheckResult]: """Check 3: 所有 Webhook Health Endpoint""" results = [] webhooks = [ - ("Alertmanager Webhook", f"{api_url}/api/v1/webhooks/alertmanager/health"), + ("Alertmanager Webhook", f"{api_url}/api/v1/webhooks/health"), ("SignOz Webhook", f"{api_url}/api/v1/webhooks/signoz/health"), ("Sentry Webhook", f"{api_url}/api/v1/webhooks/sentry/health"), ]