4NK_env/scripts/lecoffre_node/test-monitoring.sh
LeCoffre Deployment 43a05a2742 clean
2025-09-25 12:19:35 +00:00

33 lines
694 B
Bash
Executable File

#!/bin/bash
# Script de test de connectivité pour le monitoring
set -e
echo "🔍 Test de connectivité du monitoring..."
# Test Grafana
echo "Test Grafana..."
if curl -s http://localhost:3000/api/health >/dev/null 2>&1; then
echo "✅ Grafana: OK"
else
echo "❌ Grafana: Non accessible"
fi
# Test Loki
echo "Test Loki..."
if curl -s http://localhost:3100/ready >/dev/null 2>&1; then
echo "✅ Loki: OK"
else
echo "❌ Loki: Non accessible"
fi
# Test Promtail
echo "Test Promtail..."
if docker ps --format "table {{.Names}}" | grep -q "promtail"; then
echo "✅ Promtail: En cours d'exécution"
else
echo "❌ Promtail: Arrêté"
fi
echo "🎉 Tests terminés!"