Giter Club home page Giter Club logo

borg-exporter's Introduction

borg-exporter's People

Contributors

adinhodovic avatar danihodovic avatar dependabot[bot] avatar edbrk avatar r053nr07 avatar skraus-dev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

borg-exporter's Issues

Documentation needed: configuration file & dependency 'borgmatic'

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

  • what the dependencies are (or maybe try to install them as dependency, seems to be Python as well)
  • how a minimal configuration looks like (or refer to some documentation of e.g. borgmatic)

Thanks!

Installation add systemd service but syntax error in file for borgmatic config path

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,

ValueError when try exporter

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 )

Question of where I need to install borgmatic and how use it

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

Not compatible with debian11 - python error

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
  • Do you think it's possible to execute this exporter without GLIBC_2.35 ?
  • Is it possible to build and run docker image of this exporter, or I can't solve this issue for my Debian11 server ? (I can't upgrade my server at present)

Regards,

Multiple configurations

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?

What kind of scraping config for prometheus

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

Docker image fails to build

[*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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.