You are browsing a read-only backup copy of Wikitech. The primary site can be found at wikitech.wikimedia.org
Check bacula is a wrapper for bconsole that is able to produce output to be used by icinga and prometheus, as well as used interactively to debug backup job errors/misses, useful for monitoring of backups generated by Bacula in the WMF production.
check_bacula.py --help usage: check_bacula.py [-h] [--list-jobs] [--prometheus] [--port PORT] [--icinga] [--backup_config_path BACKUP_CONFIG_PATH] [--bconsole_path BCONSOLE_PATH] [job] Checks bacula backup freshness status and prints it on standard output (or starts the bacula prometheus exporter). positional arguments: job If set, check only the status of this job. Otherwise, check all jobs. optional arguments: -h, --help show this help message and exit --list-jobs When used, it just prints the list of configured backup jobs and returns without any check. --prometheus If set, instead of outputing information to the command line, it waits in a loop listening for an HTTP request and returns metrics in the typical prometheus exporter format. --port PORT When using the prometheus mode, it binds and listens on this port. If no one is given, 9133 is used by default. --icinga If set, it prints just a summary for icinga. Otherwise, it prints a detailed output to the command line. --backup_config_path BACKUP_CONFIG_PATH Path of the directory with the files where the bacula job configuration is, by default: "/etc/bacula/jobs.d". --bconsole_path BCONSOLE_PATH Full path of the "bconsole" executable, by default: "/usr/sbin/bconsole".
Examples of interactive usage
- No parameters run will do the full list of configured backups, classified by freshness (See Bacula#Monitoring for the categories). Similar to the icinga output but without sumarizing
- To list jobs, one per line, without checking or classifying:
- To give the available list of past jobs for a particular job (including its id, timestamp, level, finishing status and total size), one can run:
More info on how it works and why it was created on Bacula#Monitoring