Another one simple bacula web reports interface.
I wasn't satisfied with current web interfaces for bacula. Cause they show default information which I can get from console and doesn't show really useful information (like big files in backup, long-running-backups etc).
So as a result I start writing own web reports interface.
#Requirements
- Enabled bacula history for jobs
- PostgreSQL database (I use postgres on all my servers with bacula)
- python Flask
#Documentation Instalation notes
#Notes
- requirements.txt contains modules which I use in my web interface
- css is based on SemanticUI (http://semantic-ui.com/)
- for database connection I use SQLAlchemy
git clone https://github.com/l13t/pyWBacula.git
cd pyWBacula
virtualenv venv
source venv/bin/activate
pip install -r requirements.txt
After downloading you should rename next configuration files:
cp config.py.example config.py cp app/config.py.example app/config.py
- DB_URI:
DB_URI = 'postgresql://<user>:<password>@<host>:<port>/<db_name>?client_encoding=utf8'
Currently only PostgreSQL supported.
You can use run.py to start application:
./run.py
Or you can use gunicorn:
venv/bin/gunicorn --bind 0.0.0.0:15995 run:app
To run on startup just do next steps:
cp utils/pywbacula /etc/init.d/
chmod 755 /etc/init.d/pywbacula && chown root:root /etc/init.d/pywbacula
update-rc.d pywbacula defaults
update-rc.d pywbacula enable
Edit /etc/init.d/pywbacula to change WWW_HOME and APP_USER variables.
In utils you can find scripts which would help you create graph reports with Grafana+InfluxDB.
- utils/bacula_to_influx - custom cronjob to push data to InfluxDB
- utils/results_to_influx.sh - script which push data to InfluxDB
- utils/grafana_panel_template.json - dashboard template for Grafana to show results