2026-05-29 12:26:34 +02:00
|
|
|
# ha-diag-agent environment variables
|
|
|
|
|
# Copy to /opt/homelab/config/ha-diag-agent/.env on the target node
|
|
|
|
|
|
|
|
|
|
# Home Assistant connection (required)
|
|
|
|
|
HA_URL=http://homeassistant.local:8123
|
|
|
|
|
HA_TOKEN=your-long-lived-token-here
|
2026-05-29 13:41:55 +02:00
|
|
|
HA_TIMEOUT=10.0
|
2026-05-29 12:26:34 +02:00
|
|
|
|
|
|
|
|
# Node identity
|
|
|
|
|
NODE_NAME=piha
|
|
|
|
|
LOCATION_TAG=ken
|
|
|
|
|
|
2026-05-29 13:41:55 +02:00
|
|
|
# Check intervals (seconds)
|
|
|
|
|
CHECK_INTERVAL=60 # heartbeat check
|
|
|
|
|
CHECK_INTERVAL_UNAVAILABLE=3600 # entity availability check (1h)
|
|
|
|
|
|
|
|
|
|
# Unavailable entities thresholds
|
|
|
|
|
UNAVAILABLE_THRESHOLD_HOURS=24 # alert after N hours unavailable
|
|
|
|
|
INTEGRATION_FAILURE_THRESHOLD_PCT=0.5 # fraction of integration entities
|
|
|
|
|
INTEGRATION_FAILURE_MIN_ENTITIES=3 # minimum count for integration event
|
|
|
|
|
ALERT_COOLDOWN_HOURS=6 # suppress re-alert within N hours
|
2026-05-29 12:26:34 +02:00
|
|
|
|
|
|
|
|
# API server
|
|
|
|
|
PORT=8087
|
|
|
|
|
|
|
|
|
|
# Logging: debug, info, warning, error
|
|
|
|
|
LOG_LEVEL=info
|