[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-09-04。"],[[["\u003cp\u003eThis page details how to monitor Vertex AI services, such as OCR, Speech-to-Text, and Vertex AI Translation, using logs and metrics within Google Distributed Cloud (GDC) air-gapped.\u003c/p\u003e\n"],["\u003cp\u003eYou can visualize Vertex AI metrics and logs in dashboards by querying operational logs, audit logs, or Prometheus metrics using Grafana.\u003c/p\u003e\n"],["\u003cp\u003eTo view logs and metrics, you must be granted the Project Grafana Viewer (\u003ccode\u003eproject-grafana-viewer\u003c/code\u003e) role by your Project IAM Admin.\u003c/p\u003e\n"],["\u003cp\u003eSample queries are provided for monitoring both the Vertex AI platform's performance, and specific Vertex AI API services, using PromQL for metrics and LogQL for logs.\u003c/p\u003e\n"],["\u003cp\u003eAccessing Vertex AI service monitoring involves signing in to the GDC console, enabling the relevant Vertex AI API, and then navigating to the Grafana interface to explore data sources and create queries.\u003c/p\u003e\n"]]],[],null,["# View Vertex AI logs and metrics\n\nLogs and metrics let you monitor your services and troubleshoot issues with\nservice performance. You can view logs and metrics from Vertex AI\nservices using the monitoring and logging resources from\nGoogle Distributed Cloud (GDC) air-gapped. You can also create queries to monitor specific\nVertex AI metrics.\n\nThis page describes how to query and view logs and metrics from\nVertex AI services in\n\nthe monitoring instance of Distributed Cloud.\n\n\nThis page also contains sample queries that you can use to monitor the\nVertex AI platform and services, such as\nOptical Character Recognition (OCR), Speech-to-Text, and Vertex AI Translation.\nFor more information about logging and monitoring solutions in\nDistributed Cloud, see [Monitor metrics and logs](/distributed-cloud/hosted/docs/latest/gdch/platform/pa-user/obs-overview).\n\nBefore you begin\n----------------\n\nTo get the permissions you need to view logs and metrics from\nVertex AI, ask your Project IAM Admin to grant you the\nProject Grafana Viewer (`project-grafana-viewer`) role in your project\nnamespace.\n\nFor more information about this role, see [Prepare IAM permissions](/distributed-cloud/hosted/docs/latest/gdch/platform/pa-user/obs-iam-permissions#p-gr-v).\n\nVisualize logs and metrics in dashboards\n----------------------------------------\n\nYou can view Vertex AI metrics and logs in dashboards. For\nexample, you can create a query to view how Vertex AI affects CPU\nusage.\n\nFollow these steps to view Vertex AI logs and metrics in\ndashboards:\n\n1. [Sign in to the GDC console and select your project](/distributed-cloud/hosted/docs/latest/gdch/application/ao-user/iam/sign-in).\n\n2. In the navigation menu, click **Vertex AI** \\\u003e **Pre-trained APIs**.\n\n3. On the **Pre-trained APIs** page, make sure that [the Vertex AI API for the service you want to monitor is enabled](/distributed-cloud/hosted/docs/latest/gdch/application/ao-user/vertex-ai-enable-pre-trained-apis).\n\n4. Click **Monitor services in Grafana** to open the Grafana home page.\n\n5. In the navigation menu of the home page, click explore **Explore**\n to open the **Explore** page.\n\n6. From the menu at the **Explore** page, select one of the following data\n sources:\n\n - **Operational Logs**: retrieve operational logs.\n - **Audit Logs**: retrieve audit logs.\n - **Prometheus**: retrieve metrics.\n7. If you want to display metrics, enter a query using\n [PromQL](https://prometheus.io/docs/prometheus/latest/querying/basics/)\n (Prometheus Query Language) expressions.\n\n8. If you want to display logs, enter a query using\n [LogQL](https://grafana.com/docs/loki/latest/logql/) (Log Query\n Language) expressions.\n\nThe page displays the metrics or logs matching your query.\n\n**Figure 1.** Menu option in Grafana to query metrics.\n\nIn figure 1, the **Prometheus** option displays the interface that lets you\nbuild queries to retrieve metrics.\n\nSample queries\n--------------\n\nThe following table contains sample queries to monitor the\nVertex AI platform in your environment:\n\nThe following table contains sample queries to monitor\nVertex AI API services, such as OCR,\nSpeech-to-Text, and Vertex AI Translation, in your environment:"]]