[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-09-04 (世界標準時間)。"],[],[],null,["# Audit changes to system artifacts\n\nThis page describes how to retrieve audit logs for system artifacts in Google Distributed Cloud (GDC) air-gapped appliance.\n\nSystem artifacts exist in the Artifact Registry of the org infrastructure\ncluster. All changes and operations performed on the system artifacts are\naudited. As an Infrastructure Operator (IO), view the audit logs through the Grafana\nuser interface (UI).\n\nBefore you begin\n----------------\n\nTo get the permissions that you need to view audit logs, ask your Security Admin to grant you the following roles for the org infrastructure cluster access:\n\n- Grafana Viewer (`grafana-viewer`) role.\n- Organization Grafana Viewer (`organization-grafana-viewer`) role.\n\nGet audit logs for artifacts in the org infrastructure cluster\n--------------------------------------------------------------\n\nTo retrieve audit logs for system artifacts in the org infrastructure cluster, complete\nthe following steps:\n\n1. Go to the monitoring instance UI for the org infrastructure cluster.\n\n2. Click **Explore \\\u003e audit-logs-loki**\n and build the query to get audit logs.\n\nFind artifacts with Loki queries\n--------------------------------\n\nYou can build Loki queries to find artifacts.\n| **Note:** Use `service_name=\"artifactmanagement\"` in the query for the audit logs of artifacts.\n\nThe following sections contain examples for querying audit logs.\n\n### Query audit logs for all system artifacts\n\nRun the following query to return audit logs for all system artifacts: \n\n {cluster=\"\u003cvar translate=\"no\"\u003eORG_INFRA_CLUSTER\u003c/var\u003e\",service_name=\"artifactmanagement\"}\n\nReplace \u003cvar translate=\"no\"\u003eCLUSTER_NAME\u003c/var\u003e with the cluster name, which will match the pattern `\u003cORG_NAME\u003e-infra`.\n\nFor example: \n\n {cluster=\"\u003cORG_NAME\u003e-infra\", service_name=\"artifactmanagement\"}`\n\n### Query audit logs for one specific Artifact Registry\n\nRun the following query to return audit logs for one specific Artifact Registry: \n\n {cluster=\"\u003cvar translate=\"no\"\u003eORG_INFRA_CLUSTER\u003c/var\u003e\",service_name=\"artifactmanagement\"} | json resource=\"resource\" | resource=~\"^\u003cvar translate=\"no\"\u003eREGISTRY_PREFIX\u003c/var\u003e.*\"\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eORG_INFRA_CLUSTER\u003c/var\u003e: the org infrastructure cluster name, such as `ORG-INFRA`.\n- \u003cvar translate=\"no\"\u003eREGISTRY_PREFIX\u003c/var\u003e: the target Artifact Registry name prefix.\n\nFor example: \n\n {cluster=\"ORG-INFRA\",service_name=\"artifactmanagement\"} | json resource=\"resource\" | resource=~\"^gpc-system-services.*\"\n\n**Figure 2.** Examples of audit logs for one specific Artifact Registry listed on the Grafana UI.\n\nIn figure 2, the query to return audit logs from the `gpc-system-services` Artifact Registry of the cluster displays its results as a list on the same page.\n\n### Query audit logs for multiple Artifact Registry registries\n\nRun the following query to return audit logs for multiple Artifact Registry registries: \n\n {cluster=\"\u003cvar translate=\"no\"\u003eORG_INFRA_CLUSTER\u003c/var\u003e\",service_name=\"artifactmanagement\"}\n | json resource=\"resource\" |\n resource=~\"^\u003cvar translate=\"no\"\u003eREGISTRY1_PREFIX\u003c/var\u003e.*\" or\n resource=~\"^\u003cvar translate=\"no\"\u003eREGISTRY2_PREFIX\u003c/var\u003e.*\"\n\n| **Note:** The `or` condition specifies additional Artifact Registry registries.\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eORG_INFRA_CLUSTER\u003c/var\u003e: the target cluster name, such as `orgname-infra`.\n- \u003cvar translate=\"no\"\u003eREGISTRY1_PREFIX\u003c/var\u003e: the first target Artifact Registry name prefix.\n- \u003cvar translate=\"no\"\u003eREGISTRY2_PREFIX\u003c/var\u003e: the second target Artifact Registry name prefix.\n\nFor example: \n\n {cluster=\"org-infra\",service_name=\"artifactmanagement\"} | json\n resource=\"resource\" | resource=~\"^gpc-system.*\" or resource=~\"^library/.*\""]]