Health check 메세지 문구 수정
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
name: API Health Check
|
name: LLM-Gateway Health Check
|
||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
@@ -8,7 +8,7 @@ jobs:
|
|||||||
health-check:
|
health-check:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Check API Health and Notify on Failure
|
- name: Check LLM-Gateway Health and Notify on Failure
|
||||||
run: |
|
run: |
|
||||||
success=false
|
success=false
|
||||||
for i in $(seq 1 5); do
|
for i in $(seq 1 5); do
|
||||||
@@ -16,11 +16,11 @@ jobs:
|
|||||||
content=$(curl -s http://172.16.10.176:8888/health/API)
|
content=$(curl -s http://172.16.10.176:8888/health/API)
|
||||||
|
|
||||||
if [ "$response" -eq 200 ] && echo "$content" | grep -q "ok"; then
|
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
|
success=true
|
||||||
break
|
break
|
||||||
else
|
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
|
if [ $i -lt 5 ]; then
|
||||||
sleep 10 # Wait for 10 seconds before retrying
|
sleep 10 # Wait for 10 seconds before retrying
|
||||||
fi
|
fi
|
||||||
@@ -28,7 +28,7 @@ jobs:
|
|||||||
done
|
done
|
||||||
|
|
||||||
if [ "$success" = "false" ]; then
|
if [ "$success" = "false" ]; then
|
||||||
echo "API health check failed after 5 attempts. Sending notification to Mattermost."
|
echo "LLM-Gateway 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 }}
|
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
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
name: API Health Check
|
name: OCR-Gateway Health Check
|
||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "* * * * *"
|
- cron: "* * * * *"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
health-check:
|
OCR health-check:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Check API Health and Notify on Failure
|
- name: Check OCR-Gateway Health and Notify on Failure
|
||||||
run: |
|
run: |
|
||||||
success=false
|
success=false
|
||||||
for i in $(seq 1 5); do
|
for i in $(seq 1 5); do
|
||||||
@@ -16,11 +16,11 @@ jobs:
|
|||||||
content=$(curl -s http://172.16.10.176:8890/health/API)
|
content=$(curl -s http://172.16.10.176:8890/health/API)
|
||||||
|
|
||||||
if [ "$response" -eq 200 ] && echo "$content" | grep -q "ok"; then
|
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
|
success=true
|
||||||
break
|
break
|
||||||
else
|
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
|
if [ $i -lt 5 ]; then
|
||||||
sleep 10 # Wait for 10 seconds before retrying
|
sleep 10 # Wait for 10 seconds before retrying
|
||||||
fi
|
fi
|
||||||
@@ -28,7 +28,7 @@ jobs:
|
|||||||
done
|
done
|
||||||
|
|
||||||
if [ "$success" = "false" ]; then
|
if [ "$success" = "false" ]; then
|
||||||
echo "API health check failed after 5 attempts. Sending notification to Mattermost."
|
echo "OCR-Gateway 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 }}
|
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
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user