danihodovic / borg-exporter Goto Github PK
View Code? Open in Web Editor NEWPrometheus exporter for Borg backups.
License: MIT License
Prometheus exporter for Borg backups.
License: MIT License
I've came across this project when looking for a borg
exporter. It took me some time to understand after some digging borg
is not directly used or supported, but borgmatic
seems to be used as some kind of bridge or layer on top.
While borgmatic
is invoked to collect the information for the metrics, it seems to be not installed / required by this project as a (Python-) dependency.
Can you please clarify for those not into borgmatic
borgmatic
)Thanks!
Hi,
After installation of the last version, I have seen an error.
When I tried to start borg-exporter service, I saw this error
Feb 26 08:57:46 interne-11 systemd[1]: Started borg-exporter.service - Borg Prometheus exporter.
Feb 26 08:57:46 interne-11 borg-exporter[166834]: Usage: borg-exporter run [OPTIONS]
Feb 26 08:57:46 interne-11 borg-exporter[166834]: Try 'borg-exporter run --help' for help.
Feb 26 08:57:46 interne-11 borg-exporter[166834]: Error: Invalid value for '-c' / '--config': File '(/etc/borgmatic/config.yaml,)' does not exist.
The file exist in the path, so I tried to set ExecStart
with this syntax and service start correctly (OS : Debian 12 bookworm)
ExecStart=/usr/local/bin/borg-exporter run --config '/etc/borgmatic/config.yaml'
After that, service is correctly started and I can seen metric on port 9996.
Question: what is the good way to change default port et ip address for listening ? Is it possible to set something like this ExecStart=/usr/local/bin/borg-exporter run --web.listen-address=0.0.0.0:9100 --config '/etc/borgmatic/config.yaml'
? (I seen this in node_exporter)
Regards,
Hi,
I have installed the exporter but when I execute borg-exporter enable-systemd
I see this error:
root@*********:/tmp# borg-exporter enable-systemd
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
cli.py 1 <module>
<frozen importlib._bootstrap> 1007 _find_and_load
<frozen importlib._bootstrap> 986 _find_and_load_unlocked
<frozen importlib._bootstrap> 680 _load_unlocked
pyimod02_importers.py 419 exec_module
cli.py 52 <module>
cli.py 17 config_opt
decorators.py 373 decorator
core.py 2536 __init__
core.py 2151 __init__
ValueError:
'default' must be a list when 'multiple' is true.
[129862] Failed to execute script 'cli' due to unhandled exception!
Any idea where I need to change something ?
In /etc/borgmatic/config.yaml
I have just set:
location:
source_directories:
- /data/nfs
repositories:
- ssh://******:***/backup/borgbackup-repository
storage:
encryption_passphrase: "*********"
retention:
keep_hourly: 24
keep_daily: 7
keep_weekly: 4
keep_monthly: 4
If I execute borgmatic --info
I have this result
root@*****:~# borgmatic --info
usage: borgmatic [-h] [-c [CONFIG_PATHS ...]] [--excludes EXCLUDES_FILENAME] [-n] [-nc] [-v {-1,0,1,2}] [--syslog-verbosity {-1,0,1,2}] [--log-file-verbosity {-1,0,1,2}]
[--monitoring-verbosity {-1,0,1,2}] [--log-file LOG_FILE] [--override SECTION.OPTION=VALUE [SECTION.OPTION=VALUE ...]] [--no-environment-interpolation] [--bash-completion] [--version]
...
borgmatic: error: unrecognized arguments: --info
Error parsing arguments: /usr/bin/borgmatic --info
Need some help? https://torsion.org/borgmatic/#issues
I have installed borgmatic from source on Debian 12, so borgmatic version is 1.7.7
Do you think it is a problem with my version ? (borgbackup is in 1.2.4 )
Hi,
I have installed borg and borgmatic on one server and data are backuped via ssh on another server.
I want to monitor if backup is done correctly.
On which server I need to collect metric ? On destination server or source server ?
What is the good way to use this exporter ? Is it a pull exporter with scraping from prometheus or is it a push exporter to prometheus server ?
Regards,
Philippe
Hi,
Do you know if it is possible to use the exporter on Debian11?
When I execute borg-exporter enable-systemd
I have this error
[2773062] Error loading Python lib '/tmp/_MEI1WfdY1/libpython3.9.so.1.0': dlopen: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.35' not found (required by /tmp/_MEI1WfdY1/libpython3.9.so.1.0)
On my server, I have:
root@****:/tmp# python3 --version
Python 3.9.2
root@****:/tmp# python --version
Python 2.7.18
Regards,
Thanks for working on the borgmatic exporter!
It'd be great if the exporter service would support multiple configurations, unless I'm missing how they are already supported?
Hi,
I have set this kind of scraping and prometheus can show metric.
- job_name: 'borgbackup-metric'
scrape_interval: 30m
scrape_timeout: 1m
static_configs:
- targets: ['****:9996']
But I can't explore metric with prometheus graph view and not find value in grafana also.
Do you have any idea?
Regards,
I can see this king of result from my prometheus server if I open metric page http://****:9996/metrics
# HELP borg_backups_total Total number of Borg backups
# TYPE borg_backups_total gauge
borg_backups_total{repo="ssh://****:122/backup/borgbackup-repository"} 39.0
# HELP borg_last_backup_timestamp Timestamp of the last backup
# TYPE borg_last_backup_timestamp gauge
borg_last_backup_timestamp{repo="ssh://****:122/backup/borgbackup-repository"} 1.708938139e+09
# HELP borg_unique_size Uncompressed unique size of the Borg Repo
# TYPE borg_unique_size gauge
borg_unique_size{repo="ssh://****:122/backup/borgbackup-repository"} 9.36144236579e+011
[*snip*]
Step 7/9 : RUN poetry install
---> Running in 152d259ac155
Skipping virtualenv creation, as specified in config file.
Installing dependencies from lock file
Because borg-exporter depends on pytest-celery (^0.0.0-alpha.1) which doesn't match any versions, version solving failed.
The command '/bin/sh -c poetry install' returned a non-zero code: 1
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.