restic-exporter icon indicating copy to clipboard operation
restic-exporter copied to clipboard

fix: wrong lock count, header output changed in restic versions

Open TheReal1604 opened this issue 11 months ago • 0 comments

Hey,

I noticed that the metric for the locks was not behaving correctly anymore.

This is due to restic not outputting the header:

repository xyz opened successfully, password is correct

anymore if the output is redirected. You can test that locally with restic list locks --no-locks > test.log.

My solution is to just split the lines by linebreaks and see if the resulting string looks like an ID by a regex -> increasing the counter by one.

TheReal1604 avatar Mar 15 '24 09:03 TheReal1604