Google Cloud的 Agent for SAP 支持监控在 Compute Engine 实例上运行的 SAP 工作负载,并帮助您在 Google Cloud上高效运行 SAP 系统。您必须在运行任何 SAP 系统的所有虚拟机上安装 Google Cloud的 Agent for SAP。此代理会收集 SAP 要求的所有必需信息,并将其发送到 SAP Host Agent。如需了解详情,请参阅 SAP 说明 2469354。
如需收集用于实现可观测性的底层基础架构和应用指标,您必须为 Agent for SAP 启用其他功能。
本文档介绍了如何在适用于 SAP 的代理中启用这些功能。
Agent for SAP 核对清单
以下核对清单总结了您需要执行的任务,以确保 Agent for SAP 已正确设置,可用于实现可观测性:
安装和配置 Agent for SAP
在要监控的每个 Compute Engine 虚拟机上安装和配置 Google Cloud的 Agent for SAP。
Agent for SAP 与以下“for SAP”公共操作系统映像打包在一起:
[[["易于理解","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-09。"],[],[],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)."]]