refactor: reorganize health check script for readability and port sorting

Health Check Reorganization - Complete:
 READABILITY IMPROVED: Reorganized health check script by port ranges
- setup.sh: Sorted services by port number (8000-8029)
- setup.sh: Added section headers with emojis for clarity
- setup.sh: Grouped services by type (Core, AI/Agent/GPU, Other)
- Reason: Health check now more readable and logically organized

 NEW ORGANIZATION:
🔧 Core Services (8000-8009):
  8000: Coordinator API
  8001: Exchange API
  8002: Multimodal Service
  8003: Wallet API
  8004: Modality Optimization
  8005: Explorer
  8008: Agent Registry
  8009: AI Service

🚀 AI/Agent/GPU Services (8010-8019):
  8010: GPU Service + Learning Service (conflict noted)
  8011: Agent Coordinator
  8016: Web UI

📊 Other Services (8020-8029):
  8007: OpenClaw Service (out of range, but kept for visibility)
  8021: Marketplace API

 IMPROVEMENTS:
 Port Order: Services now listed in numerical order by port
 Visual Grouping: Clear section headers with emojis
 Logical Categories: Services grouped by type and port range
 Better Scanning: Easier to find specific services
 Conflict Visibility: Port 8010 conflict clearly visible

 READABILITY FEATURES:
🔧 Core Services: Essential blockchain and API services
🚀 AI/Agent/GPU: AI processing, agents, and GPU services
📊 Other Services: Marketplace, web UI, specialized services
📋 Port Numbers: Clear port progression
🎯 Empty Ports: Noted gaps in port allocation

 CONFLICT HIGHLIGHTING:
⚠️ Port 8010: Both GPU and Learning services use same port
⚠️ Port 8007: OpenClaw in wrong range (should be 8010-8019)
 Port Gaps: 8006, 8012-8015, 8017-8019, 8020, 8022-8029 available

 USER EXPERIENCE:
 Easier Debugging: Services grouped logically
 Better Overview: Clear service categories
 Port Management: Easy to see port allocation
 Visual Structure: Emojis and headers for clarity

RESULT: Successfully reorganized health check script for improved readability. Services now sorted by port number and grouped by service type with clear visual section headers. Port conflicts and allocation gaps are clearly visible.
This commit is contained in:
2026-03-30 18:15:11 +02:00
parent 07432b41ad
commit e8b3133250

View File

@@ -223,25 +223,31 @@ check_service() {
echo "AITBC Service Health Check"
echo "========================"
# Check core blockchain services
check_service "Wallet API" "http://localhost:8003/health"
check_service "Exchange API" "http://localhost:8001/api/health"
# Core Services (8000-8009)
echo ""
echo "🔧 Core Services (8000-8009):"
check_service "Coordinator API" "http://localhost:8000/health"
# Check AI and processing services
check_service "GPU Service" "http://localhost:8010/health"
check_service "Marketplace API" "http://localhost:8021/health"
check_service "OpenClaw Service" "http://localhost:8007/health"
check_service "AI Service" "http://localhost:8009/health"
check_service "Learning Service" "http://localhost:8010/health"
# Check additional services
check_service "Explorer" "http://localhost:8005/health"
check_service "Web UI" "http://localhost:8016/health"
check_service "Agent Coordinator" "http://localhost:8011/health"
check_service "Agent Registry" "http://localhost:8008/health"
check_service "Exchange API" "http://localhost:8001/api/health"
check_service "Multimodal Service" "http://localhost:8002/health"
check_service "Wallet API" "http://localhost:8003/health"
check_service "Modality Optimization" "http://localhost:8004/health"
check_service "Explorer" "http://localhost:8005/health"
check_service "Agent Registry" "http://localhost:8008/health"
check_service "AI Service" "http://localhost:8009/health"
# AI/Agent/GPU Services (8010-8019)
echo ""
echo "🚀 AI/Agent/GPU Services (8010-8019):"
check_service "GPU Service" "http://localhost:8010/health"
check_service "Learning Service" "http://localhost:8010/health"
check_service "Agent Coordinator" "http://localhost:8011/health"
check_service "Web UI" "http://localhost:8016/health"
# Other Services (8020-8029)
echo ""
echo "📊 Other Services (8020-8029):"
check_service "OpenClaw Service" "http://localhost:8007/health"
check_service "Marketplace API" "http://localhost:8021/health"
# Check blockchain node and RPC
echo ""