restic / rest-server

Rest Server is a high performance HTTP server that implements restic's REST backend API.
BSD 2-Clause "Simplified" License
922 stars 138 forks source link

Prometheus metric for repository's last update #197

Open oxzi opened 1 year ago

oxzi commented 1 year ago

What is the purpose of this change? What does it change?

A new gauge metric rest_server_repo_last_update_timestamp was added to monitor each repository's last write access. This allows a basic monitoring for each repository's freshness.

Was the change discussed in an issue or in the forum before?

This might be related to the feature request in #176.

Checklist

oxzi commented 1 year ago

@wojas: Thanks a lot for your review! I have made some changes and answered in the conversations above.

Furthermore, I tried to motivate why I introduced the preloading, which is not directly part of those metrics, but are imho necessary for a complete view after (automatically) restarting the rest-server.

Please feel free to take another look; and thanks again!

riotbib commented 1 year ago

This is relevant to me, please consider merging. Thanks!