Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.
Go aialertsdashboarddockerdocker-monitoringgohomelabinfrastructure-monitoringkubernetesmonitoringmspproxmoxproxmox-backup-serverproxmox-mail-gatewayproxmox-veself-hostedtruenastypescriptvspherewebhooks
Add automatic control-plane reconciliation
rcourtmanca4c570fa17a
diff --git a/scripts/install-sensor-proxy.sh b/scripts/install-sensor-proxy.shindex a1cceda741..26cfcb413c 100755--- a/scripts/install-sensor-proxy.sh+++ b/scripts/install-sensor-proxy.sh@@ -13,6 +13,8 @@ MIN_ALLOWED_NODES_FILE_VERSION="v4.31.1"ALLOWLIST_MODE="file"INSTALLED_PROXY_VERSION=""+PENDING_CONTROL_PLANE_FILE="/etc/pulse-sensor-proxy/pending-control-plane.env"+# Colors for outputRED='\033[0;31m'GREEN='\033[0;32m'@@ -723,6 +725,8 @@ EOFrm -f "$CTID_FILE"fi+ rm -f "$PENDING_CONTROL_PLANE_FILE" 2>/dev/null || true+if command -v systemctl >/dev/null 2>&1; thensystemctl daemon-reload 2>/dev/null || truefi@@ -1422,8 +1426,10 @@ if [[ "$HTTP_MODE" != true ]]; thenif [[ -z "$CONTROL_PLANE_REFRESH" ]]; thenCONTROL_PLANE_REFRESH="60"fi+ clear_pending_control_planeelseprint_warn "Failed to register socket proxy with Pulse; continuing without control plane sync"+ record_pending_control_plane "socket"fififi@@ -1515,6 +1521,7 @@ if [[ "$HTTP_MODE" == true ]]; thenif [[ $? -ne 0 || -z "$registration_response" ]]; thenprint_error "Failed to register with Pulse - aborting installation"print_error "Fix the issue and re-run the installer"+ record_pending_control_plane "http"exit 1fi@@ -1524,6 +1531,7 @@ if [[ "$HTTP_MODE" == true ]]; thenif [[ -z "$CONTROL_PLANE_REFRESH" ]]; thenCONTROL_PLANE_REFRESH="60"fi+ clear_pending_control_planeif [[ -z "$HTTP_AUTH_TOKEN" ]]; thenprint_error "Registration succeeded but Pulse did not return an auth token"@@ -2797,12 +2805,56 @@ set -euo pipefailSERVICE="pulse-sensor-proxy"INSTALLER="/opt/pulse/sensor-proxy/install-sensor-proxy.sh"CTID_FILE="/etc/pulse-sensor-proxy/ctid"+PENDING_FILE="/etc/pulse-sensor-proxy/pending-control-plane.env"+TOKEN_FILE="/etc/pulse-sensor-proxy/.pulse-control-token"LOG_TAG="pulse-sensor-proxy-selfheal"log() {logger -t "$LOG_TAG" "$1"}+attempt_control_plane_reconcile() {+ if [[ ! -f "$PENDING_FILE" ]]; then+ return+ fi+ if [[ -f "$TOKEN_FILE" ]]; then+ return+ fi+ if [[ ! -x "$INSTALLER" ]]; then+ return+ fi++ # shellcheck disable=SC1090+ source "$PENDING_FILE" || return+ if [[ -z "${PENDING_PULSE_SERVER:-}" ]]; then+ return+ fi++ cmd=("$INSTALLER" "--skip-restart" "--quiet" "--pulse-server" "${PENDING_PULSE_SERVER}")+ if [[ "${PENDING_STANDALONE:-false}" == "true" ]]; then+ cmd+=("--standalone")+ if [[ "${PENDING_HTTP_MODE:-false}" == "true" ]]; then+ cmd+=("--http-mode")+ if [[ -n "${PENDING_HTTP_ADDR:-}" ]]; then+ cmd+=("--http-addr" "${PENDING_HTTP_ADDR}")+ fi+ fi+ else+ if [[ -f "$CTID_FILE" ]]; then+ cmd+=("--ctid" "$(cat "$CTID_FILE")")+ else+ log "CTID file missing; cannot reconcile control plane"+ return+ fi+ fi++ if bash "$INSTALLER" "${cmd[@]}"; then+ rm -f "$PENDING_FILE"+ else+ log "Control-plane reconciliation failed"+ fi+}+if ! command -v systemctl >/dev/null 2>&1; thenexit 0fi@@ -2827,6 +2879,8 @@ if ! systemctl is-active --quiet "${SERVICE}.service"; thensystemctl start "${SERVICE}.service" || truefifi++attempt_control_plane_reconcileEOFchmod 0755 "$SELFHEAL_SCRIPT"@@ -2907,3 +2961,22 @@ elsefiexit 0+record_pending_control_plane() {+ local mode="$1"+ if [[ -z "$PULSE_SERVER" ]]; then+ return+ fi++ cat > "$PENDING_CONTROL_PLANE_FILE" <<EOF+PENDING_PULSE_SERVER="${PULSE_SERVER}"+PENDING_MODE="${mode}"+PENDING_STANDALONE="${STANDALONE}"+PENDING_HTTP_MODE="${HTTP_MODE}"+PENDING_HTTP_ADDR="${HTTP_ADDR}"+EOF+ chmod 0600 "$PENDING_CONTROL_PLANE_FILE" 2>/dev/null || true+}++clear_pending_control_plane() {+ rm -f "$PENDING_CONTROL_PLANE_FILE" 2>/dev/null || true+}