| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- # Broad-Announce M0 env defaults. Copy to .env if you want docker
- # compose to pick them up; otherwise the compose file's inline
- # values are used.
- BA_ENV=dev
- BA_LOG_LEVEL=info
- # HTTP addrs
- BA_INGESTD_HTTP_ADDR=:8800
- BA_ROUTERD_HTTP_ADDR=:8801
- BA_DELIVERD_HTTP_ADDR=:8802
- BA_ADMIND_HTTP_ADDR=:8803
- # Data tier
- BA_NATS_URL=nats://localhost:4222
- BA_REDIS_URL=redis://localhost:6379/0
- BA_POSTGRES_DSN=postgres://ba:ba@localhost:5432/ba?sslmode=disable
- # Ingestd source protection defaults (SPEC §22)
- BA_INGESTD_MAX_PAYLOAD_BYTES=262144
- BA_INGESTD_RATE_LIMIT_PER_SOURCE=100
- BA_INGESTD_RATE_LIMIT_PER_COMPANY=10000
- BA_INGESTD_MAX_CONCURRENT_PER_IP=64
- BA_INGESTD_DEDUPE_TTL_SECONDS=300
- BA_INGESTD_QUARANTINE_HITS_THRESHOLD=100
- # M6.5: router-level dedupe collapse. A burst of identical
- # alerts is held for up to this many ms, then a single
- # delivery is fanned out with the final dedupe_count.
- BA_ROUTERD_DEDUPE_FLUSH_MS=2000
- # M8: in-process retry knobs shared by deliverd-fcm and
- # deliverd-telegram. See internal/retry/retry.go.
- # - MAX_ATTEMPTS: total tries including the first
- # - RETRY_BASE_MS: wait before the SECOND attempt;
- # doubles each subsequent attempt, capped at MAX_MS
- # - RETRY_MAX_MS: cap on the per-attempt wait
- # - RETRY_BUDGET_MS: wall-clock cap across all attempts;
- # the loop bails early if the next wait would exceed it
- # With the defaults below, a fully-failing target
- # terminates in ~12s — fast enough for the smoke test
- # to be practical, slow enough that transient blips
- # recover cleanly.
- BA_DELIVERD_MAX_ATTEMPTS=10
- BA_DELIVERD_RETRY_BASE_MS=100
- BA_DELIVERD_RETRY_MAX_MS=2000
- BA_DELIVERD_RETRY_BUDGET_MS=30000
- # M7: archiver cadence + retention cutoff. The Timescale
- # retention policy does the same at 7d; the archiver just
- # runs ahead so ClickHouse has the data before TS drops it.
- BA_ARCHIVERD_RUN_EVERY_SECONDS=3600
- BA_ARCHIVERD_OLDER_THAN_HOURS=168
- BA_ARCHIVERD_BATCH_SIZE=10000
- BA_ARCHIVERD_CLICKHOUSE_URL=http://clickhouse:8123
- BA_INGESTD_QUARANTINE_WINDOW_SECONDS=60
- BA_INGESTD_QUARANTINE_DURATION_SECONDS=300
- # M9 circuit breaker (layer 6): trips when
- # BA_INGESTD_CB_FAILURE_THRESHOLD failures accumulate
- # within BA_INGESTD_CB_FAILURE_WINDOW_SECS.
- BA_INGESTD_CB_FAILURE_THRESHOLD=5
- BA_INGESTD_CB_FAILURE_WINDOW_SECS=10
- BA_INGESTD_CB_OPEN_DURATION_SECS=30
- BA_INGESTD_CB_MAX_HALF_OPEN=1
- # M0 source registry (env-only; M2 swaps for DB)
- # Format: comma-separated company:source:secret triples
- BA_INGESTD_SOURCES=acme-001:prom-prod:s3cret-acme,globex-002:grafana:s3cret-globex
- # M4 MQTT subscriber (ingestd).
- # - MQTT_USERNAME/PASSWORD authenticate the subscriber with EMQX
- # using the built-in-db row "ingestd" / "ingestd-broker-only".
- # - MQTT_SUBSCRIBE is the topic pattern the subscriber joins.
- # The + wildcards are the EMQX single-level wildcard; ba/+/+/incoming
- # matches every (company, source) pair.
- # - Set BA_INGESTD_MQTT_BROKER to "" to disable the MQTT path entirely.
- BA_INGESTD_MQTT_BROKER=tcp://emqx:1883
- BA_INGESTD_MQTT_USERNAME=ingestd
- BA_INGESTD_MQTT_PASSWORD=ingestd-broker-only
- BA_INGESTD_MQTT_SUBSCRIBE=ba/+/+/incoming
- # Optional override; default is "ingestd-mqtt-<hostname>".
- # BA_INGESTD_MQTT_CLIENT_ID=ingestd-mqtt-1
- # Shutdown
- BA_SHUTDOWN_GRACE_SEC=15
|