Files
proxmox/scripts/deployment/phase2-observability.sh
defiQUG fbda1b4beb
Some checks failed
Deploy to Phoenix / deploy (push) Has been cancelled
docs: Ledger Live integration, contract deploy learnings, NEXT_STEPS updates
- ADD_CHAIN138_TO_LEDGER_LIVE: Ledger form done; public code review repo bis-innovations/LedgerLive; init/push commands
- CONTRACT_DEPLOYMENT_RUNBOOK: Chain 138 gas price 1 gwei, 36-addr check, TransactionMirror workaround
- CONTRACT_*: AddressMapper, MirrorManager deployed 2026-02-12; 36-address on-chain check
- NEXT_STEPS_FOR_YOU: Ledger done; steps completable now (no LAN); run-completable-tasks-from-anywhere
- MASTER_INDEX, OPERATOR_OPTIONAL, SMART_CONTRACTS_INVENTORY_SIMPLE: updates
- LEDGER_BLOCKCHAIN_INTEGRATION_COMPLETE: bis-innovations/LedgerLive reference

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 15:46:57 -08:00

45 lines
1.7 KiB
Bash
Executable File

#!/usr/bin/env bash
# Phase 2: Observability - Deploy Prometheus, Grafana, Loki, Alertmanager
# Usage: ./scripts/deployment/phase2-observability.sh [--config-only]
# --config-only: write config/monitoring/ (prometheus.yml, alertmanager.yml) and exit.
# See docs/08-monitoring/MONITORING_SUMMARY.md, OPERATIONAL_RUNBOOKS § Phase 2.
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
CONFIG_DIR="${PROJECT_ROOT}/config/monitoring"
CONFIG_ONLY=false
[[ "${1:-}" == "--config-only" ]] && CONFIG_ONLY=true
mkdir -p "$CONFIG_DIR"
echo "Phase 2: Observability Runbook"
echo "=============================="
echo ""
echo "1. Prometheus (VMID 10200 or Docker) - scrape Besu 9545; config: scripts/monitoring/prometheus-besu-config.yml"
echo "2. Grafana (VMID 10201 or Docker) - dashboards; datasource: Prometheus"
echo "3. Loki - log aggregation"
echo "4. Alertmanager - alerts (email/Slack webhook); configure in config/monitoring/alertmanager.yml"
echo "5. Cloudflare Access - optional for Grafana"
echo ""
if $CONFIG_ONLY; then
# Write minimal Prometheus config (merge Besu targets from scripts/monitoring/prometheus-besu-config.yml)
cat > "$CONFIG_DIR/prometheus.yml" << 'EOF'
global:
scrape_interval: 15s
scrape_configs:
- job_name: prometheus
static_configs: [{ targets: ['localhost:9090'] }]
EOF
cat > "$CONFIG_DIR/alertmanager.yml" << 'EOF'
route: { receiver: 'null' }
receivers: [{ name: 'null' }]
EOF
echo "[OK] Config written to $CONFIG_DIR (prometheus.yml, alertmanager.yml)"
exit 0
fi
echo "See: scripts/monitoring/ for existing configs. Run with --config-only to write config/monitoring/."