.env.example 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. # Broad-Announce M0 env defaults. Copy to .env if you want docker
  2. # compose to pick them up; otherwise the compose file's inline
  3. # values are used.
  4. BA_ENV=dev
  5. BA_LOG_LEVEL=info
  6. # HTTP addrs
  7. BA_INGESTD_HTTP_ADDR=:8800
  8. BA_ROUTERD_HTTP_ADDR=:8801
  9. BA_DELIVERD_HTTP_ADDR=:8802
  10. BA_ADMIND_HTTP_ADDR=:8803
  11. # Data tier
  12. BA_NATS_URL=nats://localhost:4222
  13. BA_REDIS_URL=redis://localhost:6379/0
  14. BA_POSTGRES_DSN=postgres://ba:ba@localhost:5432/ba?sslmode=disable
  15. # Ingestd source protection defaults (SPEC §22)
  16. BA_INGESTD_MAX_PAYLOAD_BYTES=262144
  17. BA_INGESTD_RATE_LIMIT_PER_SOURCE=100
  18. BA_INGESTD_RATE_LIMIT_PER_COMPANY=10000
  19. BA_INGESTD_MAX_CONCURRENT_PER_IP=64
  20. BA_INGESTD_DEDUPE_TTL_SECONDS=300
  21. BA_INGESTD_QUARANTINE_HITS_THRESHOLD=100
  22. # M6.5: router-level dedupe collapse. A burst of identical
  23. # alerts is held for up to this many ms, then a single
  24. # delivery is fanned out with the final dedupe_count.
  25. BA_ROUTERD_DEDUPE_FLUSH_MS=2000
  26. # M7: archiver cadence + retention cutoff. The Timescale
  27. # retention policy does the same at 7d; the archiver just
  28. # runs ahead so ClickHouse has the data before TS drops it.
  29. BA_ARCHIVERD_RUN_EVERY_SECONDS=3600
  30. BA_ARCHIVERD_OLDER_THAN_HOURS=168
  31. BA_ARCHIVERD_BATCH_SIZE=10000
  32. BA_ARCHIVERD_CLICKHOUSE_URL=http://clickhouse:8123
  33. BA_INGESTD_QUARANTINE_WINDOW_SECONDS=60
  34. BA_INGESTD_QUARANTINE_DURATION_SECONDS=300
  35. # M0 source registry (env-only; M2 swaps for DB)
  36. # Format: comma-separated company:source:secret triples
  37. BA_INGESTD_SOURCES=acme-001:prom-prod:s3cret-acme,globex-002:grafana:s3cret-globex
  38. # M4 MQTT subscriber (ingestd).
  39. # - MQTT_USERNAME/PASSWORD authenticate the subscriber with EMQX
  40. # using the built-in-db row "ingestd" / "ingestd-broker-only".
  41. # - MQTT_SUBSCRIBE is the topic pattern the subscriber joins.
  42. # The + wildcards are the EMQX single-level wildcard; ba/+/+/incoming
  43. # matches every (company, source) pair.
  44. # - Set BA_INGESTD_MQTT_BROKER to "" to disable the MQTT path entirely.
  45. BA_INGESTD_MQTT_BROKER=tcp://emqx:1883
  46. BA_INGESTD_MQTT_USERNAME=ingestd
  47. BA_INGESTD_MQTT_PASSWORD=ingestd-broker-only
  48. BA_INGESTD_MQTT_SUBSCRIBE=ba/+/+/incoming
  49. # Optional override; default is "ingestd-mqtt-<hostname>".
  50. # BA_INGESTD_MQTT_CLIENT_ID=ingestd-mqtt-1
  51. # Shutdown
  52. BA_SHUTDOWN_GRACE_SEC=15