Files
proxmox/scripts/monitoring/alert-block-stall.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

47 lines
1.1 KiB
Bash
Executable File

#!/usr/bin/env bash
# Block Production Stall Alert
# Load alert configuration
if [ -f "$SCRIPT_DIR/../smom-dbis-138/.env.alerts" ]; then
source "$SCRIPT_DIR/../smom-dbis-138/.env.alerts"
fi
# Sends alerts when block production stalls
set -euo pipefail
BLOCK=$1
STALL_TIME=$2
# Alert channels (configure as needed)
ALERT_EMAIL="${ALERT_EMAIL:-}"
ALERT_WEBHOOK="${ALERT_WEBHOOK:-}"
log_error() { echo "[ALERT] $1" >&2; }
send_alert() {
local message="$1"
log_error "BLOCK PRODUCTION STALLED: $message"
# Email alert
if [ -n "$ALERT_EMAIL" ]; then
echo "$message" | mail -s "BLOCK PRODUCTION STALLED" "$ALERT_EMAIL" 2>/dev/null || true
fi
# Webhook alert
if [ -n "$ALERT_WEBHOOK" ]; then
curl -X POST "$ALERT_WEBHOOK" \
-H "Content-Type: application/json" \
-d "{\"text\":\"$message\"}" 2>/dev/null || true
fi
# Log to file
echo "$(date): $message" >> /var/log/block-stall-alerts.log
}
main() {
local message="Block production stalled at block $BLOCK for ${STALL_TIME} seconds"
send_alert "$message"
}
main "$@"