I’m using prometheus (a time-series database) and grafana (a dashboard webservice) to monitor my infrastructure. Since there API bindings for both prometheus and urbackup for python3, I’ve written a simple script to translate the output of the urbackup api into prometheus time-series metrics.
The output does not contain everything I’d like to have, but it is a good start. Let me know what you think, maybe this is useful to some people.
Imho the API could use some documentation (couldn’t find any) and be more consistent with return types; When a client hasn’t had a backup yet fields like “lastbackup” return “-” where ususally it is an int.
Here’s an example of the lastbackup timestamp in the database, which makes it easy to create OK/Not OK statistics in grafana and generating alerts.