Sign inSign up

darkvex/bareos-prom_exporter

By darkvex

Updated about 6 years ago

Expose bareos backup data via Prometheus

Image
0

260

darkvex/bareos-prom_exporter repository overview

bareos_exporter

Go Report Card

Prometheus exporter for bareos data recovery system

Dockerfile
Usage with docker
  1. Create a file containing your mysql password and mount it inside /bareos_exporter/pw/auth
  2. (optional) Overwrite default args using ENV variables
  3. Run docker image as follows
docker run --name bareos_exporter -p 9625:9625 -d Dark-Vex/bareos_exporter:latest -dsn mysql://user:password@host/dbname
Usage with [docker-compose]

This is just an example, would be more secure to create a dedicated user on DB with read-only permission

  bareos-db:
    image: mysql:5.6
    restart: always
    volumes:
      - /srv/bareos/mysql/data:/var/lib/mysql
    environment:
      - MYSQL_ROOT_PASSWORD=ThisIsMySecretDBp4ssw0rd
      - TZ=Europe/Rome

  bareos-prometheus:
    image: darkvex/bareos-prom_exporter:latest
    restart: always
    ports:
      - 9625:9625
    environment:
      - DSN=mysql://root:ThisIsMySecretDBp4ssw0rd@tcp(bareos-db)/bareos
      - TZ=Europe/Rome
Metrics
  • Total amout of bytes and files saved
  • Latest executed job metrics (level, errors, execution time, bytes and files saved)
  • Latest full job (level = F) metrics
  • Amount of scheduled jobs
Flags
NameDescriptionDefault
portBareos exporter port9625
endpointBareos exporter endpoint."/metrics"
dsnData source name of the database that is used by bareos. Protocol can be mysql:// or postgresql://. The rest of the string is passed to the database driver."mysql://bareos@unix()/bareos?parseTime=true"

Tag summary

Content type

Image

Digest

Size

7.5 MB

Last updated

about 6 years ago

docker pull darkvex/bareos-prom_exporter