Menu
Baba docs

Environment Variables

Every setting in config.json can be overridden with an environment variable. Values are applied before validation, so type coercion and defaults still apply.

VariableTypeDefaultExampleDescription
BABA_LOG_LEVELstringinfodebugLog verbosity. One of: trace, debug, info, warn, error.
BABA_MACHINE_NAMEstring(system hostname)nas-01Display name for this machine, prepended to every alert message.
BABA_INTERVAL_SECONDSnumber6030Seconds between monitor check cycles.
BABA_REMINDER_INTERVAL_MINUTESnumber3060Minutes before re-alerting for an ongoing incident.
BABA_DATABASE_PATHstring/var/lib/baba/incidents.json/data/incidents.jsonPath to the JSON incident history.
BABA_CPU_ENABLEDbooleantrue—Enable CPU usage monitoring.
BABA_CPU_THRESHOLDnumber9080CPU usage % that triggers an alert.
BABA_CPU_CONSECUTIVE_BREACHESnumber3—Consecutive high readings before opening a CPU incident.
BABA_LOAD_ENABLEDbooleantrue—Enable system load-average monitoring.
BABA_LOAD_THRESHOLDnumber841-minute load average that triggers an alert. Rule of thumb: number of CPU cores.
BABA_LOAD_CONSECUTIVE_BREACHESnumber3—Consecutive high readings before opening a load incident.
BABA_MEMORY_ENABLEDbooleantrue—Enable memory usage monitoring.
BABA_MEMORY_THRESHOLDnumber9085Memory usage % that triggers an alert.
BABA_MEMORY_CONSECUTIVE_BREACHESnumber3—Consecutive high readings before opening a memory incident.
BABA_DISK_ENABLEDbooleantrue—Enable disk usage monitoring.
BABA_DISK_THRESHOLDnumber9085Disk usage % that triggers an alert.
BABA_DISK_VOLUMEScsv//,/dataComma-separated mount points to monitor.
BABA_TEMP_ENABLEDbooleanfalse—Enable temperature monitoring (CPU + all GPUs). Off by default; most values are null on macOS.
BABA_TEMP_CPU_THRESHOLDnumber8580CPU temperature (°C) that triggers an alert.
BABA_TEMP_GPU_THRESHOLDnumber8580GPU temperature (°C) that triggers an alert.
BABA_TEMP_CONSECUTIVE_BREACHESnumber3—Consecutive high readings before opening a temperature incident.
BABA_GPU_ENABLEDbooleanfalse—Enable GPU utilization monitoring. Off by default; metrics unavailable on macOS.
BABA_GPU_THRESHOLDnumber9085GPU utilization % that triggers an alert.
BABA_GPU_CONSECUTIVE_BREACHESnumber3—Consecutive high readings before opening a GPU incident.
BABA_UPDATES_NOTIFY_ENABLEDbooleantrue—Send an alert via your configured notifiers when a newer release is available.

#Notifiers

Configure notifiers with individual environment variables — no JSON required. Each notifier type is independent; set whichever you need.

#Discord

VariableDescriptionExample
BABA_NOTIFIERS_DISCORD_WEBHOOK_URLWebhook URL. When set, replaces any Discord notifier from config.json.https://discord.com/api/webhooks/<id>/<token>
BABA_NOTIFIERS_DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/<id>/<token>

#Telegram

Both variables must be set together.

VariableDescriptionExample
BABA_NOTIFIERS_TELEGRAM_BOT_TOKENToken from @BotFather on Telegram.123456789:AAFxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
BABA_NOTIFIERS_TELEGRAM_CHAT_IDTarget chat, group ID (prefixed with -), or @channelname.-1001234567890
BABA_NOTIFIERS_TELEGRAM_BOT_TOKEN=123456789:AAFxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
BABA_NOTIFIERS_TELEGRAM_CHAT_ID=-1001234567890

#Both notifiers at the same time

BABA_NOTIFIERS_DISCORD_WEBHOOK_URL="https://discord.com/api/webhooks/<id>/<token>"
BABA_NOTIFIERS_TELEGRAM_BOT_TOKEN="123456789:AAFxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
BABA_NOTIFIERS_TELEGRAM_CHAT_ID="-1001234567890"

Env var notifiers override any notifier of the same type from config.json while leaving other types in place. If only one of the Telegram pair is set, both are ignored with a warning.

#Types

TypeParsing
stringPassed through as-is
numberA decimal number; the *_CONSECUTIVE_BREACHES ones must be whole
boolean"true" or "1" is true; anything else is false
csvSplit on ,, trimmed, empty entries removed

An unset or empty variable leaves the config value alone. A number that doesn't parse stops baba with invalid value for BABA_…, instead of silently falling back.

#Config file location

BABA_CONFIG_PATH sets where every command reads config.json when --config isn't given; the default is /var/lib/baba/config.json. The Docker image sets it to /app/config.json.

This guide lives in the project repo: edit it there, and this page follows with the next release.