gpt4 book ai didi

azure - 如何获取特定时间段内未使用(拉取)的ACR图像详细信息?

转载 作者:行者123 更新时间:2023-12-02 06:37:48 25 4
gpt4 key购买 nike

我有两个关于 ACR 图像拉取的问题。

  1. 是否有可能获取 ACR docker 镜像的拉取计数?
  2. 我们能否获取在特定时间段内未拉取的 docker 镜像的详细信息?比如最近7天没有拉取过的镜像?

最佳答案

  1. Is there a possibility to get the pull count of an ACR docker image?
  2. Can we get the details of docker images that are not pulled for a specific time period? For example, the images that are not pulled forthe last 7 days?

正如我在上面的评论中提到的,您可以通过在容器注册表上启用诊断设置并将这些日志传递到日志分析工作区来实现此目的。您可以编写一些自定义 kusto 查询并根据您的要求提取日志。

以下查询有助于获取一段时间内从 acr 获取图像的拉取计数。

ContainerRegistryRepositoryEvents| where ArtifactType contains "acr.docker"
|where Repository contains "<repoName>" and Tag contains "<TagName>"
| where OperationName contains "Pull"
| where TimeGenerated > ago(24h)
| count

您可以引用this更多示例 Kusto 查询的文档。

关于azure - 如何获取特定时间段内未使用(拉取)的ACR图像详细信息?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70379939/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com