Closed TheReal1604 closed 1 month ago
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.
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.
Thank you @TheReal1604 @benendboss
https://github.com/ngosang/restic-exporter/releases/tag/1.6.0
Hey,
I noticed that the metric for the locks was not behaving correctly anymore.
This is due to restic not outputting the header:
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.