Google Cloud's Agent for SAP 可監控在 Compute Engine 執行個體上執行的 SAP 工作負載,並協助您在 Google Cloud上有效率地執行 SAP 系統。您必須在執行任何 SAP 系統的所有 VM 上安裝 Google CloudAgent for SAP。這個代理程式會收集 SAP 規定的所有必要資訊,並傳送至 SAP Host Agent。詳情請參閱 SAP 注意事項 2469354。
如要收集用於可觀測性的基礎架構和應用程式指標,您必須為 SAP 代理程式啟用其他功能。
本文說明如何在 Agent for SAP 中啟用這些功能。
Agent for SAP 檢查清單
以下檢查清單列出您需要執行的工作,確保 Agent for SAP 已正確設定可觀測性:
安裝及設定 Agent for SAP
在要監控的每個 Compute Engine VM 上,安裝及設定 Google Cloud的 Agent for SAP。
Agent for SAP 會與下列「SAP 專用」公開 OS 映像檔一併封裝:
[[["容易理解","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,["# Configure Agent for SAP for metrics collection\n\n| **Preview**\n|\n|\n| This product or feature is subject to the \"Pre-GA Offerings Terms\" in the General Service Terms section\n| of the [Service Specific Terms](/terms/service-terms#1).\n|\n| Pre-GA products and features are available \"as is\" and might have limited support.\n|\n| For more information, see the\n| [launch stage descriptions](/products#product-launch-stages).\n\nGoogle Cloud's Agent for SAP provides support for monitoring your SAP workloads\nrunning on Compute Engine instances and it helps you run SAP systems efficiently on Google Cloud.\nYou must install Google Cloud's Agent for SAP on all VMs that run any SAP\nsystem. This agent collects and sends all the required information that SAP\nmandates to the SAP Host Agent. For more information, see\n[SAP Note 2469354](https://launchpad.support.sap.com/#/notes/2469354).\n\nTo collect the underlying infrastructure and application metrics that are used\nfor observability, you must enable additional features for the\nAgent for SAP.\n\nThis document describes how to enable these features in Agent for SAP.\n\nChecklist for Agent for SAP\n---------------------------\n\nThe following checklist summarizes the tasks you need to perform to ensure\nthat the Agent for SAP is set up properly for observability:\n\n\n\u003cbr /\u003e\n\nValidate the setup for Workload Manager observability\n-----------------------------------------------------\n\nYou can validate if you have the correct Google Cloud setup for using the\nWorkload Manager observability service by running the agent's\n`status` command. This command is supported from version 3.7 of the agent.\n\nTo validate the Google Cloud setup, complete the following steps:\n\n1. Establish an SSH connection with your Compute Engine instance.\n2. Run the following command:\n\n sudo /usr/bin/google_cloud_sap_agent status\n\n If your Google Cloud setup for using the Workload Manager\n observability service is correct, then the output includes the following.\n Your configuration might have values other than the **`default`** ones. \n\n ```\n Agent Status:\n Installed version: 3.7-....\n ...\n Systemd Service Enabled: True\n Systemd Service Running: True\n Cloud API Full Scopes: True\n Configuration File: /etc/google-cloud-sap-agent/configuration.json\n Configuration Valid: True\n ...\n ----------------------------------------------------------------------------\n Process Metrics: Enabled\n Status: Fully Functional\n IAM Permissions: All granted\n Configuration:\n collect_process_metrics: true (configuration file)\n process_metrics_frequency: 30 (default)\n process_metrics_to_skip: [] (default)\n slow_process_metrics_frequency: 120 (default)\n ...\n ----------------------------------------------------------------------------\n HANA Monitoring Metrics: Enabled\n Status: Fully Functional\n IAM Permissions: All granted\n Configuration:\n connection_timeout: 120 (default)\n enabled: true (configuration file)\n execution_threads: 10 (default)\n max_connect_retries: 1 (default)\n query_timeout_sec: 300 (default)\n sample_interval_sec: 300 (default)\n send_query_response_time: false (default)\n ...\n ----------------------------------------------------------------------------\n System Discovery: Enabled\n Status: Fully Functional\n IAM Permissions: All granted\n Configuration:\n enable_discovery: true (default)\n enable_workload_discovery: true (default)\n sap_instances_update_frequency: 60 (default)\n system_discovery_update_frequency: 14400 (default)\n ...\n ```\n3. If your output conveys that some setup is missing, then review the\n information provided in the preceding sections, perform the required actions,\n and then re-run the `status` command to re-validate the setup.\n\nExample configuration file\n--------------------------\n\nOnce you've enabled the features for observability, Agent for SAP's configuration\nfile looks similar to the following: \n\n```json\n {\n \"provide_sap_host_agent_metrics\": true,\n \"bare_metal\": false,\n \"log_level\": \"INFO\",\n \"log_to_cloud\": true,\n \"collection_configuration\": {\n \"collect_workload_validation_metrics\": true,\n \"collect_process_metrics\": true\n },\n \"discovery_configuration\": {\n \"enable_workload_discovery\": true,\n \"enable_discovery\": true\n },\n \"hana_monitoring_configuration\": {\n \"enabled\": true,\n \"hana_instances\": [\n {\n \"name\": \"local\",\n \"sid\": \"DEH\",\n \"host\": \"localhost\",\n \"port\": \"30015\",\n \"user\": \"system\",\n \"secret_name\": \"password-secret-name\"\n }\n ]\n }\n }\n \n```\n\nWhat's next\n-----------\n\n- Learn how to [observe an SAP workload](/workload-manager/docs/observe/sap/view-dashboards)."]]