autorestic icon indicating copy to clipboard operation
autorestic copied to clipboard

InfluxDB metrics

Open 12nick12 opened this issue 2 years ago • 6 comments

InfluxDB output and a Grafana dashboard would be awesome.

12nick12 avatar Sep 05 '21 14:09 12nick12

I have no insight into that, what would be required?

cupcakearmy avatar Sep 07 '21 07:09 cupcakearmy

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

frzb avatar Nov 09 '21 04:11 frzb

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:)

cupcakearmy avatar Nov 09 '21 06:11 cupcakearmy

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):

varac avatar Dec 08 '21 22:12 varac

https://github.com/hn/restic2influx might be a source of inspiration.

hn avatar Dec 09 '21 07:12 hn

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

varac avatar May 22 '22 13:05 varac