This repository has been archived on 2024-04-02. You can view files and clone it, but cannot push or open issues or pull requests.
prometheus-borgbackup-exporter/prometheus-borgbackup-exporter

20 lines
566 B
Plaintext
Raw Normal View History

2020-11-15 19:19:36 +01:00
#!/usr/bin/env python
from prometheus_client import start_http_server, Gauge
from time import sleep
HTTP_PORT = 9401
if __name__ == '__main__':
# Serve metrics over HTTP.
print("Starting prometheus-orgbackup-exporter on port",
"{}...".format(HTTP_PORT), end='')
start_http_server(HTTP_PORT)
print(" OK.")
while True:
# TODO: for every repository in $, use borg's JSON interface and export
# its content - or user the python bindings if they're stable enough.
print("Not implemented yet.")
sleep(1)