duplicati / duplicati

Store securely encrypted backups in the cloud!
Other
11.02k stars 897 forks source link

Feature request: Prometheus metrics #3362

Open lukasmrtvy opened 6 years ago

lukasmrtvy commented 6 years ago

Is possible to server /metrics in openmetrics format for Prometheus ? For example:

so-rose commented 2 years ago

+1

eddieparker commented 1 year ago

I would like to add that another metric would be nice of "last backup datetime" so you can know if things are stale.

dvonessen commented 1 year ago

Seems, there is no progress nor reaction from development here. Any suggestion to get their attention?

AnderssonPeter commented 1 year ago

This would be a great feature to have!

so-rose commented 1 year ago

Perhaps we should work together on a PR?

C# instrumentation for OpenTelemetry tracing and metrics is apparently very doable: https://opentelemetry.io/docs/instrumentation/net/ .

AleixoLucas42 commented 4 months ago

Hello everyone, I was searching some days ago prometheus exporter for duplicati and also did not found, so i'm developing an exporter, so if you are interested you can check https://github.com/AleixoLucas42/duplicati-promethes-exporter

kenkendk commented 4 months ago

All the features requested by OP are present in the reports generated by Duplicati. This is currently done in the "built-in modules".

The reporting is not the best design for extending, but it does support sending all the requested information via JSON.

I see the solution by @AleixoLucas42 is using the JSON format to implement the features, but this requires a Docker container running between Duplicati and Prometheus. I think most of the code can be added to Duplicati directly, using a C# Prometheus client.

The advantage of this would be that the report object is accessible, so it does not rely on extracting from the JSON and does not require an in-between Docker instance.