Prometheus exporter for bareos data recovery system
Usage with docker
- Create a file containing your mysql password and mount it inside
/bareos_exporter/pw/auth
- (optional) Overwrite default args using ENV variables
- Run docker image as follows
docker run --name bareos_exporter -p 9625:9625 -d ghcr.io/roock/bareos_exporter:latest -dbtype mysql -dsn mysql://user:password@host/dbname
These metrics are aggregated across all jobs with the same name, type, client and fileset that are in the catalog.
Metrics:
bareos_jobs_run
: Total number of jobs that have run with the parameters from the labelsbareos_files_saved
: Total number of files saved during all backups with the parameters from the labelsbareos_bytes_saved
: Toal number of bytes saved during all backups with the parameters from the labels
Labels:
jobname
: Name of the jobjobtype
: Type indication of the job (B
is backup,O
is consolidate,R
is restore)client
: Name of the client of the jobfileset
: Name of the fileset of the job
These metrics are for the latest job with the same name, type, client and fileset.
The whichjob
label indicates what criterium was used to select the latest job.
Metrics:
bareos_last_job_bytes_saved
: Number of bytes saved during the latest jobbareos_last_job_files_saved
: Number of files saved during the latest jobbareos_last_job_errors
: Number of errors that occured during the latest jobbareos_last_job_start_unix_timestamp
: Timestamp of the start time of the latest jobbareos_last_job_end_unix_timestamp
: Timestamp of the end time of the latest jobbareos_last_job_status
: Current status of the latest job. This is a binary metric (0 or 1) The value will be 1 only for thestatus
label that currently applies for the job
Labels:
jobname
: Name of the jobjobtype
: Type indication of the job (B
is backup,O
is consolidate,R
is restore)client
: Name of the client of the jobfileset
: Name of the fileset of the joblast_selector
: Selector used for determining the last joblast
: The job with the highest start timelast_successful
: The job with the highest start time that terminated succesfullylast_successful_full
: The job with the highest start time that terminated succesfully and is a full backup
These metrics are aggregates for all volumes in a pool
Metrics:
bareos_pool_bytes
: Number of bytes stored in a poolbareos_pool_volumes
: Number of volumes stored in a pool
Labels:
pool
: The pool which the volumes are member ofprunable
:true
orfalse
depending on whether there are still jobs referencing the counted volumesexpired
:true
orfalse
depending on whether the volume has expired or not
Name | Description | Default |
---|---|---|
port | Bareos exporter port | 9625 |
endpoint | Bareos exporter endpoint. | /metrics |
dbtype | Database type (mysql or pgx for PostgreSQL) |
pgx |
dsn | Data source name understood by [go-sql-driver/mysql] or [jakec/pgx] | postgres:// |
job-discovery-days | Number of days to look in the history to discover active jobs. Only jobs that have last run this number of days will be considered for data reporting. | 7 |
- Write some tests.