You are browsing a read-only backup copy of Wikitech. The live site can be found at wikitech.wikimedia.org
Check bacula.py
Revision as of 18:22, 2 May 2022 by imported>Jcrespo
Check bacula is a wrapper for bconsole that is able to produce output to be used by icinga and prometheus, for Bacula monitoring in the WMF production.
Usage
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".
See also
More info on how it works and why it was created on Bacula#Monitoring