Observer now optionally (PROM_SHADOW_URL) queries Prometheus up{} once per
cycle and LOGS SHADOW_LIVENESS_MISMATCH when its event-driven liveness
disagrees. Parallel-run only: compute_liveness and _emit_node_transition are
untouched; authoritative liveness stays 100% event-driven. Fail-open on any
Prometheus error (down/timeout/bad JSON -> {}). 9 new tests, incl. proof that
shadow-read does not change node_info liveness/status.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
19 lines
920 B
Plaintext
19 lines
920 B
Plaintext
# Control Plane Environment Variables
|
|
PORT=8080
|
|
HOMELAB_STATE_ROOT=/opt/homelab/state
|
|
HOMELAB_EVENTS_ROOT=/opt/homelab/events
|
|
HOMELAB_WORLD_ROOT=/opt/homelab/world
|
|
HOMELAB_ACTIONS_ROOT=/opt/homelab/actions
|
|
HOMELAB_CONFIG_ROOT=/opt/homelab/config
|
|
|
|
# --- SHADOW-READ: Prometheus up{} liveness (cutover etap 1) ---------------
|
|
# OPTIONAL. Consumed only by the observer service. When set, the observer ALSO
|
|
# queries Prometheus up{} each cycle and LOGS disagreements with its own
|
|
# event-driven liveness (grep-able: SHADOW_LIVENESS_MISMATCH). It NEVER switches
|
|
# the liveness source — this is a parallel-run to collect ≥7 days of evidence.
|
|
# Empty/unset → shadow disabled, observer behaves exactly as today. Any
|
|
# Prometheus error (down/timeout/bad JSON) is fail-open (no effect on liveness).
|
|
# Real value is the fleet-prometheus Tailscale URL, e.g.:
|
|
# PROM_SHADOW_URL=http://100.95.58.48:9090
|
|
# PROM_SHADOW_TIMEOUT=5
|