-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrun_admin.sh
More file actions
executable file
·66 lines (55 loc) · 2.77 KB
/
run_admin.sh
File metadata and controls
executable file
·66 lines (55 loc) · 2.77 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
65
66
#!/bin/bash
# PCQ Messenger - Admin Monitoring Setup
# This script starts the complete monitoring stack (Prometheus + Grafana)
set -e
echo "╔════════════════════════════════════════════════════════════╗"
echo "║ PCQ Messenger - Admin Monitoring System ║"
echo "╚════════════════════════════════════════════════════════════╝"
echo ""
# Check if Docker is installed
if ! command -v docker &> /dev/null; then
echo "❌ Docker is not installed. Please install Docker first."
exit 1
fi
if ! command -v docker-compose &> /dev/null && ! docker compose version &> /dev/null; then
echo "❌ Docker Compose is not installed. Please install Docker Compose first."
exit 1
fi
# Navigate to monitoring directory
cd "$(dirname "$0")/monitoring"
echo "🚀 Starting monitoring stack..."
echo ""
# Start Docker Compose
if docker compose version &> /dev/null; then
docker compose up -d
else
docker-compose up -d
fi
echo ""
echo "✅ Monitoring stack started successfully!"
echo ""
echo "╔════════════════════════════════════════════════════════════╗"
echo "║ Access Information ║"
echo "╠════════════════════════════════════════════════════════════╣"
echo "║ Grafana Dashboard: http://localhost:3000 ║"
echo "║ Username: admin ║"
echo "║ Password: admin ║"
echo "║ ║"
echo "║ Prometheus: http://localhost:9090 ║"
echo "╚════════════════════════════════════════════════════════════╝"
echo ""
echo "📊 The dashboard will automatically load with encryption comparison metrics."
echo "🔄 Metrics refresh every 5 seconds."
echo ""
echo "To stop the monitoring stack, run:"
echo " cd monitoring && docker-compose down"
echo ""
# Wait a moment for services to start
sleep 3
# Try to open Grafana in browser
if command -v xdg-open &> /dev/null; then
xdg-open http://localhost:3000 2>/dev/null &
elif command -v open &> /dev/null; then
open http://localhost:3000 2>/dev/null &
fi
echo "✨ Admin monitoring system is ready!"