This commit is contained in:
zino
2025-08-14 19:06:14 +02:00
parent 330c528060
commit c9092b329e

View File

@@ -2,7 +2,6 @@ counter registry_requests_total by path_class, repo, node
counter registry_pull_blob_bytes_total by repo, user, node
counter registry_pull_blob_seconds_total by repo, user, node
counter registry_push_upload_bytes_total by repo, user, node
counter registry_push_upload_seconds_total by repo, user, node
/"remote_address":"(?P<node>[^"]*)".*"remote_user":"(?P<user>[^"]*)".*"method":"GET".*"path":"\/v2\/(?P<repo>.+?)\/blobs\/sha256:[a-f0-9]+".*"body_bytes_sent":(?P<body>\d+).*"request_time":(?P<rt>[0-9.]+)/ {
registry_pull_blob_bytes_total[$repo][$user][$node] += $body
@@ -10,15 +9,8 @@ counter registry_push_upload_seconds_total by repo, user, node
registry_requests_total["pull_blob"][$repo][$node]++
}
/"remote_address":"(?P<node>[^"]*)".*"remote_user":"(?P<user>[^"]*)".*"method":"PATCH".*"path":"\/v2\/(?P<repo>.+?)\/blobs\/uploads\/[a-f0-9-]+".*"upstream_range":"(?P<start1>\d+)-(?P<end1>\d+)".*"request_time":(?P<rt1>[0-9.]+)/ {
registry_push_upload_bytes_total[$repo][$user][$node] += int($end1) + 1
registry_push_upload_seconds_total[$repo][$user][$node] += $rt1
registry_requests_total["push_upload"][$repo][$node]++
}
/"remote_address":"(?P<node>[^"]*)".*"remote_user":"(?P<user>[^"]*)".*"method":"PATCH".*"path":"\/v2\/(?P<repo>.+?)\/blobs\/uploads\/[a-f0-9-]+".*"request_time":(?P<rt2>[0-9.]+).*"upstream_range":"(?P<start2>\d+)-(?P<end2>\d+)"/ {
registry_push_upload_bytes_total[$repo][$user][$node] += int($end2) + 1
registry_push_upload_seconds_total[$repo][$user][$node] += $rt2
/"remote_address":"(?P<node>[^"]*)".*"remote_user":"(?P<user>[^"]*)".*"method":"PATCH".*"path":"\/v2\/(?P<repo>.+?)\/blobs\/uploads\/[a-f0-9-]+".*"request_length":(?P<req>\d+)/ {
registry_push_upload_bytes_total[$repo][$user][$node] += $req
registry_requests_total["push_upload"][$repo][$node]++
}