Borg does not live alone. This episode explores its ecosystem: BorgWeb as a GUI to manage repositories, borgmatic as the configuration layer, borg mount for FUSE access, integration with classic monitoring (Nagios/Zabbix) via wrappers, and metric exports to Prometheus with a textfile collector.

Borg is a great CLI — but the operational world rarely stops at the CLI. Teams need a GUI for non-technical operators, integration with existing monitoring, and metrics for dashboards. Episode 19 maps the ecosystem around Borg: from the user-friendly BorgWeb and borgmatic as the configuration layer, to bridges into Nagios/Zabbix and Prometheus.
BorgWeb is a web interface (Python-based) for managing Borg repositories. It gives operators a visual view: seeing the archive list, browsing contents, and performing restores without typing commands.
pip install borgwebBorgWeb runs as an HTTP service and is configured to access specific repositories (e.g. a local repo on the same host, or a remote repo exposed via a mount). Its use case is real: a helpdesk that needs to restore a single file without shell access.
The borgmatic we built in episode 9 is the most important part of the ecosystem: it turns backup policy into a version-controllable YAML file and executes create → prune → compact → check in the right order. There is no reason to run manual backups when borgmatic can make them declarative.
borg mount (episode 5) is the bridge between Borg and other tools. A mounted archive looks like a regular directory — browsable over NFS, backed up by other tools, or scanned by AV. A pattern often used in production: mount the newest archive, then verify its contents with standard tools before a full restore.
Nagios and Zabbix do not speak Borg — they need plugins that print an exit code and text. The standard pattern: a wrapper script runs the Borg operation, then prints output in the plugin format.
#!/usr/bin/env bash
set -euo pipefail
export BORG_REPO=/backup/borg
export BORG_PASSCOMMAND='cat /root/.borg-passphrase'
if borg list --last 1 > /dev/null 2>&1; then
echo "OK - borg backup running normally"
exit 0
else
echo "CRITICAL - borg repository has a problem"
exit 2
fiPut it at /usr/lib/nagios/plugins/check_borg and register it as a command. Zabbix uses a similar pattern: user parameters or external scripts returning values (archive count, repo size, last archive time).
borg check.Prometheus' node_exporter has a textfile collector feature: text files in a specific directory are read and published as metrics. This is the cheapest way to export borgmatic status to Prometheus.
#!/usr/bin/env bash
set -euo pipefail
OUT=/var/lib/node_exporter/textfile_collector/borg.prom
TMP="$OUT.$$"
if borgmatic --verbosity 0 --stats 2>/dev/null; then
STATUS=1
else
STATUS=0
fi
cat > "$TMP" <<EOF
# HELP borg_backup_success Whether the last borgmatic backup succeeded
# TYPE borg_backup_success gauge
borg_backup_success $STATUS
EOF
mv "$TMP" "$OUT"Once the exporter runs, the borg_backup_success metric appears on the node_exporter endpoint and can be pulled by Grafana/Alertmanager.
Tip
The textfile collector pattern separates two things that are often confused: execution (the backup schedule) and exposure (the metrics). The script above can be called from cron after the backup finishes — do not export metrics from inside the backup loop itself, so the two do not block each other.
borg_backup_success only means something when evaluated with time() - last_success. A host that is completely dead "succeeds" without a fresh metric.borg mount (FUSE) bridges Borg with other tools.In episode 20 we build awareness: monitoring & alerting — monitoring borgmatic metrics, triggering alerts when a backup fails or is late, and sending notifications via Email/Slack/Telegram through borgmatic hooks and services like Healthchecks.