title: Check Job Status Of Bacula / Bareos Backup System
agents: linux
catalog: app/backup
license: GPLv3
distribution: kuhn-ruess
description:
 This check monitors the status of Bacula / Bareos Backup Systems.

 It uses database queries to obtain the status.

 Prerequisites:

  - MySQL: mysql binary available. Credentials in /root/.my.cnf

  - PostgreSQL: psql binary available, ident auth in pg_hba.conf for the Bacula / Bareos user

 By default, the plugin uses MySQL. Create a bacula.cfg on the agent host
 in the MK_CONFDIR (typically /etc/check_mk) to configure the plugin.
 If you use the Agent Bakery, the config file is generated automatically.
 If you do not use the Agent bakery, copy the plugins/bacula_jobs file to the
 agents check_mk_agent/plugins dir.

 bacula.cfg options:

  - backend_type=mysql # MySQL / MariaDB (default)

  - backend_type=pgsql # PostgreSQL

  - dbname=bacula      # Database name

  - dbuser=bacula      # In case of PostgreSQL, this is also the local user

  - dbhost=localhost   # DB host to connect to

 The states which result in OK or CRIT, as well as the maximum age of the
 last backup, can be configured via the rule "Bacula Jobs".

item:
 The name of the Bacula / Bareos job.

discovery:
 One service is created for each job found in the agent output.
