vierbergenlars / bareos_exporter

MIT License
12 stars 7 forks source link
bareos prometheus-exporter

bareos_exporter

Go Report Card

Prometheus exporter for bareos data recovery system

Dockerfile

Usage with docker

  1. Create a .env file containing at least your database password using DB_PASSWORD variable.
  2. Run docker image as follows

Using environment variables

docker run --name bareos_exporter -p 9625:9625 -e DB_TYPE=mysql -e DB_NAME=bareos-dir -d vierbergenlars/bareos_exporter:latest

Default variables:

Using custom Docker CMD

docker run --name bareos_exporter -p 9625:9625 -d vierbergenlars/bareos_exporter:latest -dsn 'mysql://login:password@tcp(host:port)/dbname?parseTime=true'

Troubleshooting

docker run --name bareos_exporter -t -i --rm --entrypoint=/bin/sh vierbergenlars/bareos_exporter:latest

Metrics

Aggregated metrics for all jobs

These metrics are aggregated across all jobs with the same name, type, client and fileset that are in the catalog.

Metrics:

Labels:

Metrics for the latest 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:

Labels:

Metrics for pools

These metrics are aggregates for all volumes in a pool

Metrics:

Labels:

Flags

Name Description Default
port Bareos exporter port 9625
endpoint Bareos exporter endpoint. "/metrics"
dsn Data source name of the database that is used by bareos. Protocol can be mysql:// or postgres://. The rest of the string is passed to the database driver. "mysql://bareos@unix()/bareos?parseTime=true"
"postgres://dbname=bareos sslmode=disable user=bareos password=bareos"
"postgres://host=/var/run/postgresql dbname=bareos"
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