From 8175186f6750de3eb45e3bdee260586755a241ec Mon Sep 17 00:00:00 2001 From: kyy Date: Mon, 13 Oct 2025 10:36:10 +0900 Subject: [PATCH] =?UTF-8?q?Health=20check=20=EB=A9=94=EC=84=B8=EC=A7=80=20?= =?UTF-8?q?=EB=AC=B8=EA=B5=AC=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/api_health_check.yml | 12 ++++++------ .gitea/workflows/ocr_health_check.yml | 14 +++++++------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.gitea/workflows/api_health_check.yml b/.gitea/workflows/api_health_check.yml index 0bb2ec5..624c4e3 100644 --- a/.gitea/workflows/api_health_check.yml +++ b/.gitea/workflows/api_health_check.yml @@ -1,4 +1,4 @@ -name: API Health Check +name: LLM-Gateway Health Check on: schedule: @@ -8,7 +8,7 @@ jobs: health-check: runs-on: ubuntu-latest steps: - - name: Check API Health and Notify on Failure + - name: Check LLM-Gateway Health and Notify on Failure run: | success=false for i in $(seq 1 5); do @@ -16,11 +16,11 @@ jobs: content=$(curl -s http://172.16.10.176:8888/health/API) if [ "$response" -eq 200 ] && echo "$content" | grep -q "ok"; then - echo "API is healthy (Attempt $i)." + echo "LLM-Gateway is healthy (Attempt $i)." success=true break else - echo "API health check failed (Attempt $i). HTTP Status: $response, Content: $content" + echo "LLM-Gateway health check failed (Attempt $i). HTTP Status: $response, Content: $content" if [ $i -lt 5 ]; then sleep 10 # Wait for 10 seconds before retrying fi @@ -28,7 +28,7 @@ jobs: done if [ "$success" = "false" ]; then - echo "API health check failed after 5 attempts. Sending notification to Mattermost." - curl -i -X POST -H 'Content-Type: application/json' -d '{"text": "## 🚨 API μƒνƒœ 확인 μ‹€νŒ¨\n**μ—”λ“œν¬μΈνŠΈ:** `http://172.16.10.176:8888/health/API`\n\nAPIκ°€ 5번의 μ‹œλ„μ— μ‘λ‹΅ν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€. 확인이 ν•„μš”ν•©λ‹ˆλ‹€."}' ${{ secrets.MATTERMOST_WEBHOOK }} + echo "LLM-Gateway health check failed after 5 attempts. Sending notification to Mattermost." + curl -i -X POST -H 'Content-Type: application/json' -d '{"text": "## 🚨 LLM-Gateway μƒνƒœ 확인 μ‹€νŒ¨\n**μ—”λ“œν¬μΈνŠΈ:** `http://172.16.10.176:8888/health/API`\n\nAPIκ°€ 5번의 μ‹œλ„μ— μ‘λ‹΅ν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€. 확인이 ν•„μš”ν•©λ‹ˆλ‹€."}' ${{ secrets.MATTERMOST_WEBHOOK }} exit 1 fi diff --git a/.gitea/workflows/ocr_health_check.yml b/.gitea/workflows/ocr_health_check.yml index 522df5c..1cfce83 100644 --- a/.gitea/workflows/ocr_health_check.yml +++ b/.gitea/workflows/ocr_health_check.yml @@ -1,14 +1,14 @@ -name: API Health Check +name: OCR-Gateway Health Check on: schedule: - cron: "* * * * *" jobs: - health-check: + OCR health-check: runs-on: ubuntu-latest steps: - - name: Check API Health and Notify on Failure + - name: Check OCR-Gateway Health and Notify on Failure run: | success=false for i in $(seq 1 5); do @@ -16,11 +16,11 @@ jobs: content=$(curl -s http://172.16.10.176:8890/health/API) if [ "$response" -eq 200 ] && echo "$content" | grep -q "ok"; then - echo "API is healthy (Attempt $i)." + echo "OCR-Gateway is healthy (Attempt $i)." success=true break else - echo "API health check failed (Attempt $i). HTTP Status: $response, Content: $content" + echo "OCR-Gateway health check failed (Attempt $i). HTTP Status: $response, Content: $content" if [ $i -lt 5 ]; then sleep 10 # Wait for 10 seconds before retrying fi @@ -28,7 +28,7 @@ jobs: done if [ "$success" = "false" ]; then - echo "API health check failed after 5 attempts. Sending notification to Mattermost." - curl -i -X POST -H 'Content-Type: application/json' -d '{"text": "## 🚨 API μƒνƒœ 확인 μ‹€νŒ¨\n**μ—”λ“œν¬μΈνŠΈ:** `http://172.16.10.176:8890/health/API`\n\nAPIκ°€ 5번의 μ‹œλ„μ— μ‘λ‹΅ν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€. 확인이 ν•„μš”ν•©λ‹ˆλ‹€."}' ${{ secrets.MATTERMOST_WEBHOOK }} + echo "OCR-Gateway health check failed after 5 attempts. Sending notification to Mattermost." + curl -i -X POST -H 'Content-Type: application/json' -d '{"text": "## 🚨 OCR-Gateway μƒνƒœ 확인 μ‹€νŒ¨\n**μ—”λ“œν¬μΈνŠΈ:** `http://172.16.10.176:8890/health/API`\n\nAPIκ°€ 5번의 μ‹œλ„μ— μ‘λ‹΅ν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€. 확인이 ν•„μš”ν•©λ‹ˆλ‹€."}' ${{ secrets.MATTERMOST_WEBHOOK }} exit 1 fi