Menu
Baba docs

Environment Variables

Every setting in config.json can be overridden with an environment variable. Values are applied before Zod 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/baba.db/data/baba.dbPath to the SQLite incident database.
BABA_CPU_ENABLEDbooleantrueEnable CPU usage monitoring.
BABA_CPU_THRESHOLDnumber9080CPU usage % that triggers an alert.
BABA_CPU_CONSECUTIVE_BREACHESnumber3Consecutive high readings before opening a CPU incident.
BABA_LOAD_ENABLEDbooleantrueEnable system load-average monitoring.
BABA_LOAD_THRESHOLDnumber841-minute load average that triggers an alert. Rule of thumb: number of CPU cores.
BABA_LOAD_CONSECUTIVE_BREACHESnumber3Consecutive high readings before opening a load incident.
BABA_MEMORY_ENABLEDbooleantrueEnable memory usage monitoring.
BABA_MEMORY_THRESHOLDnumber9085Memory usage % that triggers an alert.
BABA_MEMORY_CONSECUTIVE_BREACHESnumber3Consecutive high readings before opening a memory incident.
BABA_DISK_ENABLEDbooleantrueEnable disk usage monitoring.
BABA_DISK_THRESHOLDnumber9085Disk usage % that triggers an alert.
BABA_DISK_VOLUMEScsv//,/dataComma-separated mount points to monitor.
BABA_TEMP_ENABLEDbooleanfalseEnable 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_BREACHESnumber3Consecutive high readings before opening a temperature incident.
BABA_GPU_ENABLEDbooleanfalseEnable GPU utilization monitoring. Off by default; metrics unavailable on macOS.
BABA_GPU_THRESHOLDnumber9085GPU utilization % that triggers an alert.
BABA_GPU_CONSECUTIVE_BREACHESnumber3Consecutive high readings before opening a GPU incident.
BABA_UPDATES_NOTIFY_ENABLEDbooleantrueSend 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 active 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
numberParsed with Number()
boolean"true" or "1"true; anything else → false
csvSplit on ,, trimmed, empty strings removed
jsonParsed with JSON.parse() — must be valid JSON

This guide lives in the project repo: edit it there, and this page follows within a day.