14 guides · the v2.0.2 release
Baba docs
The lookout. Watches CPU, load, memory, disk, temps and GPU, then pings Discord or Telegram when something breaks, and again when it heals.
Getting started
Install, configure, first alert.
Getting started
Install baba on a Linux or macOS server, point it at Discord or Telegram, and leave it running.
Docker
The orochibraru/baba image (linux/amd64 and linux/arm64) runs baba start and checks its own health with baba health. It needs to see the host, not the container, so it runs privileged in the host's PID and network namespaces.
Configuration
What to watch, when to alert, where to send it.
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.
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.
Checks
Every intervalSeconds, baba reads each enabled check once, one after the other, and logs a status line:
Notifiers
notifiers in config.json is the only required setting: a list of places to send alerts. List several, of either type; every alert goes to all of them.
Running it
Background service, incidents, updates and fixes.
Background service
baba install registers /usr/local/bin/baba start as a service that starts on its own and restarts on crash. It needs /var/lib/baba/config.json, so run baba setup first.
Incidents
baba doesn't alert on every high reading. It opens an incident once a metric has breached its threshold enough times in a row, reminds you while it lasts, and tells you when it's over. Every alert starts with [machineName].
CLI reference
Flags go before or after arguments, with one or two dashes (-config and --config are the same). Every command exits with 1 and prints baba: <error> on stderr when it fails.
Updates
Asks GitHub for the latest stable release. When it's newer than the running version, it downloads baba-<os>-<arch>.gz, and swaps it in place of the running binary (following symlinks). If that directory isn't writable, the swap goes through sudo mv. Then restart the service to run it:
Troubleshooting
Start with baba health: it names the part that's broken. logLevel: "debug" (or BABA_LOG_LEVEL=debug) logs every reading, breach count and incident decision.
Internals
How the code fits together.