Core/stats vs /metrics query

Hi All

Started playing around with prometheus/grafana to monitor rclone. But trying to understand the metrics, as they do not seem to match whats pulled from /metrics vs cli. For example;

rclone_speed{instance="", job="rclone"} = 6241802.159716875


rclone rc core/stats
"bytes": 1046502264719,
"checks": 0,
"deletedDirs": 0,
"deletes": 0,
"elapsedTime": 198684.630663534,
"errors": 1,
"eta": 65,
"fatalError": false,
"lastError": "file already closed",
"renames": 0,
"retryError": true,
"speed": 13481262.304121848,
"totalBytes": 1047391141774,
"totalChecks": 0,
"totalTransfers": 17558,
"transferTime": 0,
"transferring": [
"bytes": 989532160,
"eta": 9223372036,
"group": "global_stats",
"name": "Media/TV/REDACTED.mkv",
"percentage": 52,
"size": 1878409215,
"speed": 546168.9094200057,
"speedAvg": 3.6865597126954386e-9
"transfers": 1755

I am missing something?

I ran a little test on this

$ curl -s | grep 'rclone_speed.*[0-9]' && echo === && rclone rc core/stats | grep 'speed' | head -1
rclone_speed 10818.462582324595
	"speed": 11636.716670734497,

And ran it multiple times on an rclone with a bandwidth limit

The /metrics value is more heavily averaged than the value from core/stats - it is the total bytes / total time. This is what we used to show on core/stats but this got changed here

But we didn't update the prometheus metrics to show the same value - maybe we should?

The "speed" metric varies quite a lot. Were these taken at the same time?

How did you get the

Within a few seconds of pressing query on Prometheus and running the RC core/stats command.

Just ran your cmd

curl -s | grep 'rclone_speed.*[0-9]' && echo === && rclone rc core/stats | grep 'speed' | head -1
rclone_speed 6.118668948132735e+06
"speed": 13481262.304121848

Would be nice for Prometheus to match, least in my opinion.

Do you want to open a new issue on Github about that? Put a link to this forum thread and we'll fix at some point :slight_smile:

1 Like
1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.