Co-authored-by: xiuting.xu <xiutingxt.xu@gmail.com> Reviewed-on: #28 Reviewed-by: yuyr <yuyr@zgclab.edu.cn> Reviewed-by: huhy <husteryezi@163.com> Reviewed-by: sundapeng <sundp@mail.zgclab.edu.cn>
17 lines
393 B
Bash
17 lines
393 B
Bash
#!/bin/bash
|
|
set -euo pipefail
|
|
|
|
URL="http://127.0.0.1:8080"
|
|
|
|
echo "[INFO] Starting Argus web health check loop for $URL..."
|
|
|
|
while true; do
|
|
if curl -s --max-time 5 "$URL" > /dev/null; then
|
|
echo "[OK] $(date '+%Y-%m-%d %H:%M:%S') Argus web is healthy"
|
|
else
|
|
echo "[ERROR] $(date '+%Y-%m-%d %H:%M:%S') Argus web health check failed"
|
|
exit 1
|
|
fi
|
|
sleep 10
|
|
done
|