autorestic
autorestic copied to clipboard
InfluxDB metrics
InfluxDB output and a Grafana dashboard would be awesome.
I have no insight into that, what would be required?
My two cents:
While monitoring the backup process is important I think writing these metrics to InfluxDB is out of scope for autorestic.
This is the job of some a metrics agent like e.g. Telegraf.
What autorestic could do is calling restic
with --json
to provide the output as JSON file and maybe add a stats:
flag to make that JSON file only contain backup metrics and no other text. This file than can be picked up by some other software like Telegraf or a Prometheus exporter to bring its content into a TSDB.
How people do this in different ways can be seen here: https://forum.restic.net/t/restic-grafana-dashboard/1662
I definitely agree that some kind of automated Log parsing would be nice to have. I would keep it generic, having a json flag sound good, like most of clis do. I'll do some Research:)
Here are examples from two related projects which export basic restic metrics in Prometheus format (which I'd love to see in autorestic as well):
https://github.com/hn/restic2influx might be a source of inspiration.
I added a script which exports prometheus metrics from autorestic metadata which can get picked up by the node-exporter textfile-collector. See https://0xacab.org/varac-projects/ansible-role-autorestic/-/blob/main/files/autorestic-metrics.sh