13.2. 指标简介
Red Hat Quay 提供了帮助监控 registry 的指标,包括常规 registry 使用情况的指标、上传、下载、垃圾回收和身份验证。
13.2.1. 常规 registry 统计
常规 registry 统计可指示 registry 的增长量。
指标名称 | 描述 |
---|---|
quay_user_rows | 数据库中的用户数 |
quay_robot_rows | 数据库中机器人帐户的数量 |
quay_org_rows | 数据库中的机构数量 |
quay_repository_rows | 数据库中的软件仓库数 |
quay_security_scanning_unscanned_images_remaining_total | 最新安全扫描程序未扫描的镜像数 |
指标输出示例
# HELP quay_user_rows number of users in the database # TYPE quay_user_rows gauge quay_user_rows{host="example-registry-quay-app-6df87f7b66-9tfn6",instance="",job="quay",pid="65",process_name="globalpromstats.py"} 3 # HELP quay_robot_rows number of robot accounts in the database # TYPE quay_robot_rows gauge quay_robot_rows{host="example-registry-quay-app-6df87f7b66-9tfn6",instance="",job="quay",pid="65",process_name="globalpromstats.py"} 2 # HELP quay_org_rows number of organizations in the database # TYPE quay_org_rows gauge quay_org_rows{host="example-registry-quay-app-6df87f7b66-9tfn6",instance="",job="quay",pid="65",process_name="globalpromstats.py"} 2 # HELP quay_repository_rows number of repositories in the database # TYPE quay_repository_rows gauge quay_repository_rows{host="example-registry-quay-app-6df87f7b66-9tfn6",instance="",job="quay",pid="65",process_name="globalpromstats.py"} 4 # HELP quay_security_scanning_unscanned_images_remaining number of images that are not scanned by the latest security scanner # TYPE quay_security_scanning_unscanned_images_remaining gauge quay_security_scanning_unscanned_images_remaining{host="example-registry-quay-app-6df87f7b66-9tfn6",instance="",job="quay",pid="208",process_name="secscan:application"} 5
13.2.2. 队列项
队列项目 指标提供有关 Quay 用来管理工作的多个队列的信息。
指标名称 | 描述 |
---|---|
quay_queue_items_available | 特定队列中的项目数 |
quay_queue_items_locked | 正在运行的项目数 |
quay_queue_items_available_unlocked | 等待处理的项目数 |
指标标签
queue_name : 队列的名称。其中之一:
- exportactionlogs: 排队对导出操作日志的请求。这些日志随后会被处理并放入存储中。然后通过电子邮件将链接发送到请求者。
- namespacegc:排队进行垃圾回收的命名空间
- 通知:要发送的存储库通知的队列
- repositorygc: 排队要收集垃圾回收的存储库
- secscanv4: 特定于 Clair V4 的通知队列
- dockerfilebuild: Queue for Quay docker builds
- imagestoragereplication: 在多个存储间复制队列 blob
- chunk_cleanup: 需要删除的 Queued blob 段。这仅用于某些存储实施,如 Swift。
例如,由仓库垃圾回收 worker 标记的队列标签为 repositorygc 包含了标记为删除的软件仓库。对于带有 repositorygc 的 queue_name 标签的指标:
- quay_queue_items_locked 是当前要删除的存储库的数量。
- quay_queue_items_available_unlocked 是等待被 worker 处理的存储库数量。
指标输出示例
# HELP quay_queue_items_available number of queue items that have not expired # TYPE quay_queue_items_available gauge quay_queue_items_available{host="example-registry-quay-app-6df87f7b66-9tfn6",instance="",job="quay",pid="63",process_name="exportactionlogsworker.py",queue_name="exportactionlogs"} 0 ... # HELP quay_queue_items_available_unlocked number of queue items that have not expired and are not locked # TYPE quay_queue_items_available_unlocked gauge quay_queue_items_available_unlocked{host="example-registry-quay-app-6df87f7b66-9tfn6",instance="",job="quay",pid="63",process_name="exportactionlogsworker.py",queue_name="exportactionlogs"} 0 ... # HELP quay_queue_items_locked number of queue items that have been acquired # TYPE quay_queue_items_locked gauge quay_queue_items_locked{host="example-registry-quay-app-6df87f7b66-9tfn6",instance="",job="quay",pid="63",process_name="exportactionlogsworker.py",queue_name="exportactionlogs"} 0
13.2.3. 垃圾回收指标
这些指标显示已从垃圾回收(gc)中删除多少个资源。它们显示 gc worker 运行的次数,以及删除的命名空间、存储库和 Blob 的数量。
指标名称 | 描述 |
---|---|
quay_gc_iterations_total | GCWorker 的迭代数量 |
quay_gc_namespaces_purged_total | NamespaceGCWorker 清除的命名空间数量 |
quay_gc_repos_purged_total | RepositoryGCWorker 或 NamespaceGCWorker 清除的存储库数量 |
quay_gc_storage_blobs_deleted_total | 删除的存储 Blob 数量 |
指标输出示例
# TYPE quay_gc_iterations_created gauge quay_gc_iterations_created{host="example-registry-quay-app-6df87f7b66-9tfn6",instance="",job="quay",pid="208",process_name="secscan:application"} 1.6317823190189714e+09 ... # HELP quay_gc_iterations_total number of iterations by the GCWorker # TYPE quay_gc_iterations_total counter quay_gc_iterations_total{host="example-registry-quay-app-6df87f7b66-9tfn6",instance="",job="quay",pid="208",process_name="secscan:application"} 0 ... # TYPE quay_gc_namespaces_purged_created gauge quay_gc_namespaces_purged_created{host="example-registry-quay-app-6df87f7b66-9tfn6",instance="",job="quay",pid="208",process_name="secscan:application"} 1.6317823190189433e+09 ... # HELP quay_gc_namespaces_purged_total number of namespaces purged by the NamespaceGCWorker # TYPE quay_gc_namespaces_purged_total counter quay_gc_namespaces_purged_total{host="example-registry-quay-app-6df87f7b66-9tfn6",instance="",job="quay",pid="208",process_name="secscan:application"} 0 .... # TYPE quay_gc_repos_purged_created gauge quay_gc_repos_purged_created{host="example-registry-quay-app-6df87f7b66-9tfn6",instance="",job="quay",pid="208",process_name="secscan:application"} 1.631782319018925e+09 ... # HELP quay_gc_repos_purged_total number of repositories purged by the RepositoryGCWorker or NamespaceGCWorker # TYPE quay_gc_repos_purged_total counter quay_gc_repos_purged_total{host="example-registry-quay-app-6df87f7b66-9tfn6",instance="",job="quay",pid="208",process_name="secscan:application"} 0 ... # TYPE quay_gc_storage_blobs_deleted_created gauge quay_gc_storage_blobs_deleted_created{host="example-registry-quay-app-6df87f7b66-9tfn6",instance="",job="quay",pid="208",process_name="secscan:application"} 1.6317823190189059e+09 ... # HELP quay_gc_storage_blobs_deleted_total number of storage blobs deleted # TYPE quay_gc_storage_blobs_deleted_total counter quay_gc_storage_blobs_deleted_total{host="example-registry-quay-app-6df87f7b66-9tfn6",instance="",job="quay",pid="208",process_name="secscan:application"} 0 ...
13.2.3.1. 多部分上传指标
多部分上传指标显示 Blob 上传到存储的数量(S3、Rados、GoogleCloudStorage、RHOCS)。当 Quay 无法正确地将 Blob 正确上传到存储时,它们可以帮助识别问题。
指标名称 | 描述 |
---|---|
quay_multipart_uploads_started_total | 启动的上传到 Quay 存储的 multipart 数 |
quay_multipart_uploads_completed_total | 完成的上传到 Quay 存储的 multipart 数 |
指标输出示例
# TYPE quay_multipart_uploads_completed_created gauge quay_multipart_uploads_completed_created{host="example-registry-quay-app-6df87f7b66-9tfn6",instance="",job="quay",pid="208",process_name="secscan:application"} 1.6317823308284895e+09 ... # HELP quay_multipart_uploads_completed_total number of multipart uploads to Quay storage that completed # TYPE quay_multipart_uploads_completed_total counter quay_multipart_uploads_completed_total{host="example-registry-quay-app-6df87f7b66-9tfn6",instance="",job="quay",pid="208",process_name="secscan:application"} 0 # TYPE quay_multipart_uploads_started_created gauge quay_multipart_uploads_started_created{host="example-registry-quay-app-6df87f7b66-9tfn6",instance="",job="quay",pid="208",process_name="secscan:application"} 1.6317823308284352e+09 ... # HELP quay_multipart_uploads_started_total number of multipart uploads to Quay storage that started # TYPE quay_multipart_uploads_started_total counter quay_multipart_uploads_started_total{host="example-registry-quay-app-6df87f7b66-9tfn6",instance="",job="quay",pid="208",process_name="secscan:application"} 0 ...
13.2.4. 镜像拉取(push)/拉取(pull)指标
与推送和拉取镜像相关的可用指标数据的数量。
13.2.4.1. 镜像拉取总数
指标名称 | 描述 |
---|---|
quay_registry_image_pulls_total | 从 registry 下载的镜像数量。 |
指标标签
- 协议: 使用的 registry 协议(应该始终为 v2)
- ref: 用于拉取 - tag、inventory 的 ref
- status: 请求的 http 返回码
13.2.4.2. 拉取(pull)镜像字节
指标名称 | 描述 |
---|---|
quay_registry_image_pulled_estimated_bytes_total | 从 registry 下载的字节数 |
指标标签
- 协议: 使用的 registry 协议(应该始终为 v2)
13.2.4.3. 镜像拉取总数
指标名称 | 描述 |
---|---|
quay_registry_image_pushes_total | 从 registry 上传的镜像数量。 |
指标标签
- 协议: 使用的 registry 协议(应该始终为 v2)
- pstatus: 请求的 http 返回代码
- pmedia_type : 上传的清单类型
13.2.4.4. 推送的镜像字节
指标名称 | 描述 |
---|---|
quay_registry_image_pushed_bytes_total | 上传到 registry 的字节数 |
指标输出示例
# HELP quay_registry_image_pushed_bytes_total number of bytes pushed to the registry # TYPE quay_registry_image_pushed_bytes_total counter quay_registry_image_pushed_bytes_total{host="example-registry-quay-app-6df87f7b66-9tfn6",instance="",job="quay",pid="221",process_name="registry:application"} 0 ...
13.2.5. 身份验证指标
身份验证指标提供了身份验证请求的数量,根据类型进行标记,以及它是否成功。例如,此指标可用于监控基本身份验证请求失败。
指标名称 | 描述 |
---|---|
quay_authentication_attempts_total | 跨 registry 和 API 的身份验证尝试次数 |
指标标签
auth_kind : 使用的 auth 类型,包括:
- 基本的
- oauth
- credentials
- success: true 或 false
指标输出示例
# TYPE quay_authentication_attempts_created gauge quay_authentication_attempts_created{auth_kind="basic",host="example-registry-quay-app-6df87f7b66-9tfn6",instance="",job="quay",pid="221",process_name="registry:application",success="True"} 1.6317843039374158e+09 ... # HELP quay_authentication_attempts_total number of authentication attempts across the registry and API # TYPE quay_authentication_attempts_total counter quay_authentication_attempts_total{auth_kind="basic",host="example-registry-quay-app-6df87f7b66-9tfn6",instance="",job="quay",pid="221",process_name="registry:application",success="True"} 2 ...