-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcheck_all_services.ps1
More file actions
64 lines (59 loc) · 2.92 KB
/
Copy pathcheck_all_services.ps1
File metadata and controls
64 lines (59 loc) · 2.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# FRA Atlas - Service Health Check
Write-Host ""
Write-Host "================================================================" -ForegroundColor Cyan
Write-Host "FRA ATLAS - ALL SERVICES HEALTH CHECK" -ForegroundColor Cyan
Write-Host "================================================================" -ForegroundColor Cyan
Write-Host ""
# Check AI Service
Write-Host "Checking AI Service (Port 8000)..." -ForegroundColor Yellow
try {
$ai = Invoke-WebRequest -Uri "http://localhost:8000/health" -TimeoutSec 3 -UseBasicParsing -ErrorAction Stop
Write-Host " [OK] AI Service ONLINE" -ForegroundColor Green
$aiStatus = "ONLINE"
} catch {
Write-Host " [X] AI Service OFFLINE" -ForegroundColor Red
$aiStatus = "OFFLINE"
}
# Check Blockchain Service
Write-Host "Checking Blockchain Service (Port 8001)..." -ForegroundColor Yellow
try {
$blockchain = Invoke-WebRequest -Uri "http://localhost:8001/health" -TimeoutSec 3 -UseBasicParsing -ErrorAction Stop
Write-Host " [OK] Blockchain Service ONLINE" -ForegroundColor Green
$blockchainStatus = "ONLINE"
} catch {
Write-Host " [X] Blockchain Service OFFLINE" -ForegroundColor Red
$blockchainStatus = "OFFLINE"
}
# Check Frontend
Write-Host "Checking Frontend (Port 3002)..." -ForegroundColor Yellow
try {
$frontend = Invoke-WebRequest -Uri "http://localhost:3002" -TimeoutSec 3 -UseBasicParsing -ErrorAction Stop
Write-Host " [OK] Frontend ONLINE" -ForegroundColor Green
$frontendStatus = "ONLINE"
} catch {
Write-Host " [X] Frontend OFFLINE" -ForegroundColor Red
$frontendStatus = "OFFLINE"
}
# Summary
Write-Host ""
Write-Host "================================================================" -ForegroundColor Cyan
Write-Host "SERVICE STATUS SUMMARY" -ForegroundColor Cyan
Write-Host "================================================================" -ForegroundColor Cyan
Write-Host ""
Write-Host "AI Service (8000): $aiStatus" -ForegroundColor $(if($aiStatus -eq "ONLINE"){"Green"}else{"Red"})
Write-Host "Blockchain Service (8001): $blockchainStatus" -ForegroundColor $(if($blockchainStatus -eq "ONLINE"){"Green"}else{"Red"})
Write-Host "Frontend (3002): $frontendStatus" -ForegroundColor $(if($frontendStatus -eq "ONLINE"){"Green"}else{"Red"})
Write-Host ""
if ($aiStatus -eq "ONLINE" -and $blockchainStatus -eq "ONLINE" -and $frontendStatus -eq "ONLINE") {
Write-Host "ALL SERVICES RUNNING! System ready!" -ForegroundColor Green
Write-Host ""
Write-Host "Next Steps:" -ForegroundColor Cyan
Write-Host "1. Open http://localhost:3002 in browser" -ForegroundColor White
Write-Host "2. Run: python test_blockchain_duplicate.py" -ForegroundColor White
Write-Host "3. See: BLOCKCHAIN_ANTI_FRAUD_SYSTEM.md" -ForegroundColor White
} else {
Write-Host "Some services are offline!" -ForegroundColor Yellow
}
Write-Host ""
Write-Host "================================================================" -ForegroundColor Cyan
Write-Host ""