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: Quay docker 构建队列
- Imagestoragereplication : 要在多个存储间复制排队 Blob
- chunk_cleanup : 需要删除队列 Blob 段。这仅适用于某些存储实施,如 Swift。
例如,queue labelled repositorygc 包含由存储库垃圾回收 worker 标记的存储库。对于带有 queue_name 标签为 repositorygc 的指标:
- 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 存储的数量 |
quay_multipart_uploads_completed_total | 上传到完成的 Quay 存储的多部分数 |
指标输出示例
# 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. 镜像拉取(pull)/拉取指标
有多个与推送和拉取镜像相关的指标。
13.2.4.1. 镜像拉取(pull)总数
指标名称 | 描述 |
---|---|
quay_registry_image_pulls_total | 从 registry 下载的镜像数量。 |
指标标签
- 协议: 使用的 registry 协议(应该始终为 v2)
- ref: ref 用于拉取 - 标签、清单
- status: 请求的 http 返回码
13.2.4.2. 镜像拉取(pull)的镜像拉取(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. 身份验证指标
身份验证指标提供身份验证请求数,按 type 标记,以及它是否成功。例如,此指标可用于监控失败的基本身份验证请求。
指标名称 | 描述 |
---|---|
quay_authentication_attempts_total | 跨 registry 和 API 的身份验证尝试次数 |
指标标签
auth_kind : 使用的 auth 类型,包括:
- 基本的
- oauth
- credentials
- 成功: 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 ...