Application health monitoring #23119
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Application health monitoring | |
on: | |
schedule: | |
- cron: "*/30 * * * *" | |
jobs: | |
monitor-health: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check Backend | |
run: curl -sSf http://128.214.253.51/api/poi || exit 1 | |
- name: Check Frontend | |
run: curl -sSf http://128.214.253.51:3000/ || exit 1 | |
- name: Send Discord Alert | |
if: failure() | |
env: | |
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }} | |
run: | | |
curl -X POST -H "Content-Type: application/json" -d '{ | |
"content": "❗️ **Health Check Failed!**\n\nThe backend or frontend of the application is down." | |
}' $DISCORD_WEBHOOK_URL |