12.2. 指标简介


Red Hat Quay 提供帮助监控 registry 的指标,包括常规 registry 使用量、上传、下载、垃圾回收和身份验证的指标。

12.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

12.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 build
    • imagestoragereplication: 要在多个存储之间复制 Queued blob
    • chunk_cleanup: 需要删除的 Queued blob 片段。这仅由某些存储实施使用,例如 Swift。

例如,队列标记的 repositorygc 包含标记为通过存储库垃圾回收 worker 标记的存储库。对于带有 repositorygcqueue_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

12.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
...

12.2.3.1. 多部分上传指标

多部分上传指标显示 Blob 数上传到存储(S3、ROPs、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
...

12.2.4. 镜像拉取/拉取(pull)指标

与推送和拉取镜像相关的可用指标数据的数量。

12.2.4.1. 镜像拉取总计

指标名称描述

quay_registry_image_pulls_total

从 registry 中下载的镜像数量。

指标标签

  • 协议: 使用的 registry 协议(始终为 v2)
  • ref: 用于拉取 - 标签、清单
  • status: 请求的 http 返回代码

12.2.4.2. 拉取的镜像字节数

指标名称描述

quay_registry_image_pulled_estimated_bytes_total

从 registry 下载的字节数

指标标签

  • 协议: 使用的 registry 协议(始终为 v2)

12.2.4.3. 镜像推送总计

指标名称描述

quay_registry_image_pushes_total

从 registry 中上传的镜像数量。

指标标签

  • 协议: 使用的 registry 协议(始终为 v2)
  • pstatus: 请求的 http 返回代码
  • pmedia_type: 上传的清单类型

12.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
...

12.2.5. 身份验证指标

身份验证指标提供了身份验证请求的数量,根据类型进行标记,以及它是否成功。例如,此指标可用于监控失败的基本身份验证请求。

指标名称描述

quay_authentication_attempts_total

registry 和 API 间的身份验证尝试次数

指标标签

  • auth_kind: 使用的 auth 类型,包括:

    • Basic
    • 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
...

Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.