Menu
Baba docs

Configuration file

All settings below live in config.json (/var/lib/baba/config.json, or --config, or BABA_CONFIG_PATH). Unknown fields are ignored, so check the spelling of every key. Every field is optional (defaults are applied) except notifiers. Any value can also come from a BABA_* environment variable, which wins over the file.

baba setup writes this file for you; see Getting started.

KeyTypeDefaultDescription
$schemastringnoneJSON Schema URL, for autocomplete and validation in editors. baba setup writes it.
machineNamestringthe hostnameDisplay name for this machine, prepended to every alert message.
logLeveltrace | debug | info | warn | errorinfoLog verbosity. One of: trace, debug, info, warn, error.
intervalSecondsnumber60Seconds between check cycles. Must be positive.
reminderIntervalMinutesnumber30Minutes between re-alerts while an incident stays open. Must be positive.
database.pathstring/var/lib/baba/incidents.jsonThe JSON incident history. A SQLite baba.db from the TypeScript baba found there is moved aside to <path>.sqlite.bak. The service log and the update marker live in the same directory.
checks.cpu.enabledbooleantrueEnable CPU usage monitoring.
checks.cpu.usageThresholdPercentnumber90CPU usage % that counts as a breach, 0 to 100.
checks.cpu.consecutiveBreachesinteger3Consecutive breaches before a CPU incident opens, at least 1.
checks.load.enabledbooleantrueEnable system load-average monitoring.
checks.load.thresholdnumber81-minute load average that counts as a breach. Rule of thumb: the number of CPU cores.
checks.load.consecutiveBreachesinteger3Consecutive high readings before opening a load incident.
checks.memory.enabledbooleantrueEnable memory usage monitoring.
checks.memory.usageThresholdPercentnumber90Memory usage % that counts as a breach, 0 to 100.
checks.memory.consecutiveBreachesinteger3Consecutive high readings before opening a memory incident.
checks.disk.enabledbooleantrueEnable disk usage monitoring.
checks.disk.usageThresholdPercentnumber90Disk usage % that counts as a breach, 0 to 100. Disk incidents open on the first breach.
checks.disk.volumesstring[]["/"]Mount points (/, /data) or devices (/dev/sda1) to watch. At least one.
checks.temperature.enabledbooleanfalseEnable CPU and NVIDIA GPU temperature monitoring. No readings on macOS.
checks.temperature.cpuThresholdCelsiusnumber85CPU temperature (°C) that triggers an alert.
checks.temperature.gpuThresholdCelsiusnumber85GPU temperature (°C) that triggers an alert.
checks.temperature.consecutiveBreachesinteger3Consecutive high readings before opening a temperature incident.
checks.gpu.enabledbooleanfalseEnable NVIDIA GPU VRAM monitoring, through nvidia-smi.
checks.gpu.vramThresholdPercentnumber90VRAM usage % that counts as a breach, 0 to 100.
checks.gpu.consecutiveBreachesinteger3Consecutive high readings before opening a GPU incident.
updates.notifyEnabledbooleantrueSend an alert via your configured notifiers when a newer release is available.
notifiersNotifier[]requiredAt least one Discord or Telegram destination. See Notifiers.

#Notifiers

notifiers is a required array of Discord and Telegram destinations; their fields and how to get a webhook URL or a bot token are in Notifiers.

#Minimal config.json

{
  "$schema": "https://raw.githubusercontent.com/orochibraru/baba/refs/heads/main/schema/config.schema.json",
  "notifiers": [
    {
      "type": "discord",
      "webhookUrl": "https://discord.com/api/webhooks/<id>/<token>"
    }
  ]
}

#When the file is missing

If config.json doesn't exist but config.default.json does, in the same directory, baba copies the template to config.json, warns, and carries on. The install script refreshes that template on every install. With neither file, baba runs from the defaults and the environment variables alone, which is enough once a notifier comes from BABA_NOTIFIERS_*.

#Validation

Every command that reads the config checks all of it first and lists every problem at once:

baba: invalid config:
  • checks.cpu.usageThresholdPercent: Must be between 0 and 100
  • notifiers: At least one notifier must be configured

#Full example with all fields

See config.example.json, which the install script uses as the default template.

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