Files
kamco-train-api/scripts/health-check.sh
2026-02-02 12:29:00 +09:00

24 lines
687 B
Bash

#!/bin/bash
# Health Check Script with Authentication
BASE_URL="http://localhost:8080"
echo "================================"
echo "1. Health Check (No Auth)"
echo "================================"
curl -s "${BASE_URL}/monitor/health" | jq .
echo ""
echo "================================"
echo "2. Health Check with Details (With Auth)"
echo "================================"
curl -s -u admin:admin123 "${BASE_URL}/monitor/health" | jq .
echo ""
echo "================================"
echo "3. DiskSpace Only (With Auth)"
echo "================================"
curl -s -u admin:admin123 "${BASE_URL}/monitor/health" | jq '.components.diskSpace'
echo ""