HUB
Sign inSign up
bacula_exporter logo

marfeel/bacula_exporter

By marfeel

•Updated over 4 years ago

Image
0

464

marfeel/bacula_exporter repository overview

⁠Bacula Exporter

Prometheus Exporter for Bacula⁠ metrics written in Go.

⁠Overview

⁠Demo

⁠Requirements

Note, that the following dependencies should be satisfied:

⁠Supported backends

Currently we are supporting only PostgreSQL backend.

⁠Features

Prometheus Exporter exposes several metrics.

⁠Latest jobs

Metrics details

NameExposed informations
bacula_latest_job_files_totalTotal files saved for server during latest backup for client combined
bacula_latest_job_bytes_totalTotal bytes saved for server during latest backup for client combined
bacula_latest_job_sched_timeTimestamp when the latest job was scheduled
bacula_latest_job_start_timeTimestamp when the latest job was started
bacula_latest_job_end_timeTimestamp when the latest job was ended

Metrics output example

# TYPE bacula_latest_job_bytes_total gauge
bacula_latest_job_bytes_total{level="F",name="app1-job",status="T"} 2.585135999e+09
bacula_latest_job_bytes_total{level="I",name="app1-job",status="T"} 265559
# TYPE bacula_latest_job_end_time counter
bacula_latest_job_end_time{level="F",name="app1-job",status="T"} 1.60540267e+09
bacula_latest_job_end_time{level="I",name="app1-job",status="T"} 1.605661203e+09
# TYPE bacula_latest_job_files_total gauge
bacula_latest_job_files_total{level="F",name="app1-job",status="T"} 5135
bacula_latest_job_files_total{level="I",name="app1-job",status="T"} 34
# TYPE bacula_latest_job_sched_time counter
bacula_latest_job_sched_time{level="F",name="app1-job",status="T"} 1.605790438e+09
bacula_latest_job_sched_time{level="I",name="app1-job",status="T"} 1.605790438e+09
# TYPE bacula_latest_job_start_time counter
bacula_latest_job_start_time{level="F",name="app1-job",status="T"} 1.605402002e+09
bacula_latest_job_start_time{level="I",name="app1-job",status="T"} 1.605661201e+09
⁠Jobs summary

Metrics details

NameExposed informations
bacula_summary_job_files_totalTotal files saved for server during all backups for client combined
bacula_summary_job_bytes_totalTotal bytes saved for server during all backups for client combined

Metrics output details

# TYPE bacula_summary_job_bytes_total gauge
bacula_summary_job_bytes_total{level="F",name="app1-job"} 5.472818095e+09
bacula_summary_job_bytes_total{level="I",name="app1-job"} 8.4448111e+07
# TYPE bacula_summary_job_files_total gauge
bacula_summary_job_files_total{level="F",name="app1-job"} 10140
bacula_summary_job_files_total{level="I",name="app1-job"} 348

⁠Build

⁠From the source code
make deps
make all
⁠Docker image
make docker

⁠Deploy

⁠Binary
bacula_exporter -c /path/to/bacula_exporter.knf
⁠Docker image
docker pull funbox/bacula_exporter:1.1.0

⁠Usage

⁠Command line
Usage: bacula_exporter {options}

Options

  --config, -c file    Path to configuraion file
  --no-color, -nc      Disable colors in output
  --help, -h           Show this help message
  --version, -v        Show version
⁠Configuration
[http]

  # HTTP server IP
  ip: 0.0.0.0

  # HTTP server port
  port: 33407

  # HTTP metrics endpoint
  endpoint: /metrics

[db]

  # Database name
  name: bacula

  # Username
  username: bacula

  # Password
  password: keepinsecret

  # IP address or FQDN
  host: db.example.tld

  # Port
  port: 5432

  # SSL mode
  sslmode: disable

[log]

  # Log output (file/console)
  output: console

  # Log file dir
  dir: /

  # Path to log file
  file: {log:dir}/bacula_exporter.log

  # Log permissions
  perms: 600

  # Default log level (debug/info/warn/error/crit)
  level: info

⁠Development

⁠Run environment

Run development environment.

docker-compose up -d

Open Grafana (http://127.0.0.1:3000⁠).

⁠Build status
ArtifactStatus
dockerBuild Status

⁠Contribute

If you like Bacula Exporter, please give it a star. This will help more people know Bacula Exporter.

Please feel free to send your pull requests⁠.

⁠License

MIT

Sponsored by FunBox

Tag summary
Recent tags
Content type
Image
Digest
Size
7 MB
Last updated
over 4 years ago
docker pull marfeel/bacula_exporter:latest