diff --git a/progs/registry.mtail b/progs/registry.mtail index 5f6aa79..1d9c97c 100644 --- a/progs/registry.mtail +++ b/progs/registry.mtail @@ -9,7 +9,12 @@ counter registry_push_upload_bytes_total by repo, user, node registry_requests_total["pull_blob"][$repo][$node]++ } -/"remote_address":"(?P[^"]*)".*"remote_user":"(?P[^"]*)".*"method":"PATCH".*"path":"\/v2\/(?P.+?)\/blobs\/uploads\/[a-f0-9-]+".*"request_length":(?P\d+)/ { +/"remote_address":"(?P[^"]*)".*"remote_user":"(?P[^"]*)".*"method":"PATCH".*"path":"\/v2\/(?P.+?)\/blobs\/uploads\/[a-f0-9-]+".*"upstream_range":"(?P\d+)-(?P\d+)".*"request_time":(?P[0-9.]+)/ { + registry_push_upload_bytes_total[$repo][$user][$node] += int($end) - int($start) + 1 + registry_requests_total["push_upload"][$repo][$node]++ +} + +/"remote_address":"(?P[^"]*)".*"remote_user":"(?P[^"]*)".*"method":"PATCH".*"path":"\/v2\/(?P.+?)\/blobs\/uploads\/[a-f0-9-]+".*"upstream_range":"" .*"request_length":(?P\d+)/ { registry_push_upload_bytes_total[$repo][$user][$node] += $req registry_requests_total["push_upload"][$repo][$node]++ }