在 Bare Metal 解決方案伺服器上安裝及設定 Google Cloud 的 Agent for SAP

如果 SAP 系統在 Bare Metal 解決方案伺服器上執行,則必須使用Google Cloud's Agent for SAP,才能獲得 SAP 支援。

如果您使用下列「SAP 專用」RHEL 或 SLES OS 映像檔,則 Google CloudGoogle Cloud的 Agent for SAP 會與 OS 映像檔一併封裝:

  • RHEL:所有「for SAP」映像檔
  • SLES:SLES 15 SP4 for SAP 和後續版本

如要瞭解可在 Bare Metal Solution 伺服器上執行 SAP 的作業系統,請參閱下列文章:

安裝總覽

您可以使用標準作業系統套件管理指令安裝 Google Cloud's Agent for SAP:在 RHEL 上使用 yum 指令,在 SLES 上使用 zypper 指令。套件管理指令會完成下列工作:

  • 下載最新版的 Google CloudAgent for SAP。
  • 以 Linux systemd 服務的形式建立代理程式,並命名為 google-cloud-sap-agent
  • 啟用並啟動服務 google-cloud-sap-agent

安裝代理程式

如要在 Bare Metal 解決方案伺服器上安裝 Google Cloud的 Agent for SAP,請按照下列步驟操作:

  1. 建立與 Bare Metal 解決方案伺服器的 SSH 連線。

  2. 在終端機中,執行適用於作業系統的指令,安裝代理程式:

    • (建議) 如要安裝代理程式 3.8 版 (最新版):

      RHEL

      sudo tee /etc/yum.repos.d/google-cloud-sap-agent.repo << EOM
      [google-cloud-sap-agent]
      name=Google Cloud Agent for SAP
      baseurl=https://packages.cloud.google.com/yum/repos/google-cloud-sap-agent-el$(cat /etc/redhat-release | cut -d . -f 1 | tr -d -c 0-9)-x86_64
      enabled=1
      gpgcheck=1
      repo_gpgcheck=0
      gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
      EOM
      sudo yum install google-cloud-sap-agent

      SLES15

      sudo zypper addrepo --refresh https://packages.cloud.google.com/yum/repos/google-cloud-sap-agent-sles15-x86_64 google-cloud-sap-agent
      sudo zypper install google-cloud-sap-agent

      SLES 12

      sudo zypper addrepo --refresh https://packages.cloud.google.com/yum/repos/google-cloud-sap-agent-sles12-x86_64 google-cloud-sap-agent
      sudo zypper install google-cloud-sap-agent
    • 如要安裝特定版本的代理程式,請按照下列步驟操作:

      RHEL

      sudo tee /etc/yum.repos.d/google-cloud-sap-agent.repo << EOM
      [google-cloud-sap-agent]
      name=Google Cloud Agent for SAP
      baseurl=https://packages.cloud.google.com/yum/repos/google-cloud-sap-agent-el$(cat /etc/redhat-release | cut -d . -f 1 | tr -d -c 0-9)-x86_64
      enabled=1
      gpgcheck=1
      repo_gpgcheck=0
      gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
      EOM
      sudo yum install google-cloud-sap-agent-VERSION_NUMBER.x86_64

      SLES15

      sudo zypper addrepo --refresh https://packages.cloud.google.com/yum/repos/google-cloud-sap-agent-sles15-x86_64 google-cloud-sap-agent
      sudo zypper install google-cloud-sap-agent-VERSION_NUMBER.x86_64

      SLES 12

      sudo zypper addrepo --refresh https://packages.cloud.google.com/yum/repos/google-cloud-sap-agent-sles12-x86_64 google-cloud-sap-agent
      sudo zypper install google-cloud-sap-agent-VERSION_NUMBER.x86_64

      VERSION_NUMBER 替換為要安裝的代理程式版本號碼,例如 3.1-606637668。如要瞭解可安裝的代理程式版本,請參閱「列出所有可用的代理程式版本」。

  3. 開啟下列設定檔:

    /etc/google-cloud-sap-agent/configuration.json

    或者,您也可以執行指令來完成這項設定。詳情請參閱「適用於 SAP 的 Google Cloud代理程式設定指令」。

  4. 在設定檔中修改或新增下列參數:

    • 在第一個部分中:
      • bare_metal:設為 true
    • 新增 cloud_properties 區段,並指定下列參數:
      • project_id:指定 Google Cloud 專案
      • instance_name:指定 Bare Metal 解決方案伺服器的名稱
      • region:指定 Bare Metal 解決方案伺服器的區域
  5. 儲存設定檔。

  6. 重新啟動代理程式:

    sudo systemctl restart google-cloud-sap-agent
如要進一步瞭解設定參數,請參閱「設定參數」和「設定範例」。

安裝 Google Cloud's Agent for SAP 和 SAP Host Agent 後,請按照「驗證代理程式安裝作業」一文的說明,驗證 Google Cloud's Agent for SAP 的安裝作業。

驗證代理程式安裝

  1. 與 Bare Metal 解決方案伺服器建立 SSH 連線。

  2. 執行下列指令:

    systemctl status google-cloud-sap-agent

    如果代理程式正常運作,輸出內容會包含 active (running)。例如:

    google-cloud-sap-agent.service - Google Cloud Agent for SAP
    Loaded: loaded (/usr/lib/systemd/system/google-cloud-sap-agent.service; enabled; vendor preset: disabled)
    Active:  active (running)  since Fri 2022-12-02 07:21:42 UTC; 4 days ago
    Main PID: 1337673 (google-cloud-sa)
    Tasks: 9 (limit: 100427)
    Memory: 22.4 M (max: 1.0G limit: 1.0G)
    CGroup: /system.slice/google-cloud-sap-agent.service
           └─1337673 /usr/bin/google-cloud-sap-agent
    

如果代理程式未執行,請重新啟動代理程式

確認 SAP 主機代理程式正在接收指標

如要確認基礎架構指標是由Google Cloud's Agent for SAP 收集,並正確傳送至 SAP Host Agent,請按照下列步驟操作:

  1. 在 SAP 系統中,輸入交易 ST06
  2. 在「Overview」(總覽) 窗格中,查看以下欄位的可用性和內容,確認 SAP 和 Google 監控基礎架構已做好正確的端對端設定:

    • 雲端服務供應商Google Cloud Platform
    • Enhanced Monitoring AccessTRUE
    • Enhanced Monitoring Details (強化版監控功能詳細資料)ACTIVE

在 Linux 上設定 Google Cloud的 Agent for SAP

安裝 Google Cloud' Agent for SAP 後,您可以視需要執行下列設定,啟用代理程式的其他功能。根據預設,系統會啟用 SAP 主機代理程式指標Workload Manager 評估指標的收集作業。

必要條件

如要讓代理程式存取 Bare Metal 解決方案環境中的資源,請完成下列事前準備工作: Google Cloud

設定服務帳戶

如要讓代理程式存取 Bare Metal Solution 環境中的資源,請設定 IAM 服務帳戶。 Google Cloud

代理程式使用的服務帳戶至少須具備「Workload Manager Insights Writer (roles/workloadmanager.insightWriter)」角色。

如要建立服務帳戶,請按照下列步驟操作:

  1. Create a service account:

    1. In the Google Cloud console, go to the Create service account page.

      Go to Create service account
    2. Select your project.
    3. In the Service account name field, enter a name. The Google Cloud console fills in the Service account ID field based on this name.

      In the Service account description field, enter a description. For example, Service account for quickstart.

    4. Click Create and continue.
    5. Grant the Workload Manager > Workload Manager Insights Writer role to the service account.

      To grant the role, find the Select a role list, then select Workload Manager > Workload Manager Insights Writer.

    6. Click Continue.
    7. Click Done to finish creating the service account.

      Do not close your browser window. You will use it in the next step.

  2. Create a service account key:

    1. In the Google Cloud console, click the email address for the service account that you created.
    2. Click Keys.
    3. Click Add key, and then click Create new key.
    4. Click Create. A JSON key file is downloaded to your computer.
    5. Click Close.

建立服務帳戶後,請務必將 JSON 金鑰檔案上傳至 Bare Metal Solution 伺服器上安全的位置,供代理程式存取。

啟用功能

為 Bare Metal Solution 設定服務帳戶並授予必要角色後,您就能執行下列設定,啟用 Google Cloud的 SAP 代理程式其他功能:

預設設定檔

以下程式碼片段是 Google Cloud的 Agent for SAP 3.8 版 (最新版) 的預設設定範例:

{
  "provide_sap_host_agent_metrics": true,
  "bare_metal": true,
  "log_level": "INFO",
  "log_to_cloud": true,
  "collection_configuration": {
    "collect_workload_validation_metrics": true,
    "collect_process_metrics": false
  },
  "discovery_configuration": {
    "enable_discovery": true,
    "enable_workload_discovery": true
  },
  "hana_monitoring_configuration": {
    "enabled": false
  }
}

如要查看特定功能的設定檔範例,請參閱該功能的設定指南。

設定參數

下表說明在 Bare Metal Solution 伺服器上執行的Google CloudAgent for SAP 設定參數,包括與指標收集相關的參數。如要瞭解與代理程式 Backint 功能相關的設定參數,請參閱「設定參數」。

參數
provide_sap_host_agent_metrics

Boolean

如要啟用 SAP Host Agent 所需指標的收集作業,請指定 true。預設為 true 步。
除非 Cloud Customer Care 或 SAP 支援團隊指示,否則請勿將 provide_sap_host_agent_metrics 設為 false

bare_metal

Boolean

在 Bare Metal 解決方案伺服器上安裝代理程式時,請指定 true。預設值為 false

log_level

String

如要設定代理程式的記錄層級,請設定必要值。 可用的記錄層級如下:

  • DEBUG
  • INFO
  • WARNING
  • ERROR

預設為 INFO 步。除非 Cloud Customer Care 指示您變更記錄層級,否則請勿擅自更動。

log_to_cloud

Boolean

如要將代理程式記錄重新導向至 Cloud Logging,請指定 true。預設值為 true

cloud_properties.project_id

String

如果 SAP 系統是在 Bare Metal 解決方案伺服器上執行,請指定您搭配 Bare Metal 解決方案使用的 Google Cloud 專案 ID。

如果代理程式在 Compute Engine 執行個體上執行,代理程式預設會自動偵測專案 ID。

cloud_properties.instance_name

String

指定您已安裝代理程式的 Bare Metal 解決方案伺服器名稱。

cloud_properties.region

String

如果 SAP 系統是在 Bare Metal Solution 伺服器上執行,請指定 Bare Metal Solution 伺服器的區域

如果代理程式在運算執行個體上執行,根據預設,代理程式會使用部署運算執行個體的區域。

cloud_properties.zone

String

如果代理程式在運算執行個體上執行,根據預設,代理程式會使用部署運算執行個體的可用區。

cloud_properties.image

String

指定執行個體的 OS 映像檔名稱。

代理程式在運算執行個體上執行時,預設會自動偵測運算執行個體使用的 OS 映像檔。

cloud_properties.numeric_project_id

String

指定 SAP 系統執行的 Google Cloud 專案的 ID 編號。

當代理程式在運算執行個體上執行時,代理程式預設會自動偵測專案編號。

discovery_configuration.enable_workload_discovery

Boolean

如要讓代理程式收集主機上執行的 SAP 產品名稱和版本,請指定 true。預設值為 true

詳情請參閱 google-cloud-sap-agent GitHub 存放區的代理程式程式碼庫,位於 GoogleCloudPlatform/sapagent 下方。

discovery_configuration.enable_discovery

Boolean

如要將代理程式收集到的主機上執行 SAP 產品的相關資訊傳送至 Cloud Logging,請指定 true。預設值為 true

如果指定值 false,代理程式會將收集到的資訊儲存在主機上,不會傳送至 Cloud Logging。

collection_configuration.collect_process_metrics

Boolean

如要啟用程序監控指標收集功能,請指定 true。 預設值為 false
這個參數僅適用於 Linux。

如果啟用 SAP HANA 的程序指標收集功能,則必須設定 hana_metrics_config 下列的其他參數。

collection_configuration.process_metrics_frequency

Int

從 2.6 版開始,這個參數會決定快速變更的程序監控指標的收集頻率 (以秒為單位)。快速變更的程序監控指標包括:sap/hana/availabilitysap/hana/ha/availabilitysap/nw/availability

這個參數的預設值是 5 秒。建議您使用這個預設值。

所有其他 (變化緩慢) 的程序監控指標,都會以 30 秒的預設頻率收集。如要變更緩慢變更的程序監控指標的收集頻率,請使用 slow_process_metrics_frequency 參數。

collection_configuration.slow_process_metrics_frequency

Int

指定變化緩慢的程序監控指標收集頻率 (以秒為單位)。

這個參數的預設值是 30 秒。

collection_configuration.process_metrics_to_skip

Array

指定您不希望代理程式收集的程序監控指標。這個參數接受以逗號分隔的「程序監控」指標名稱值。例如: "process_metrics_to_skip": ["/sap/nw/abap/sessions", "/sap/nw/abap/rfc"]

collection_configuration.hana_metrics_config.hana_db_user

String

指定代理程式用來查詢 SAP HANA 的資料庫使用者帳戶。預設值為 SYSTEM

collection_configuration.hana_metrics_config.hana_db_password

String

指定資料庫使用者帳戶的純文字密碼,代理程式會使用該帳戶查詢 SAP HANA。

建議您使用下列其中一個選項,而非指定純文字密碼:

對於 SAP HANA 驗證,代理程式會依下列偏好順序使用參數:如果已指定 hdbuserstore_key 設定參數,則優先使用該參數,其次是 hana_db_password 參數,最後是 hana_db_password_secret_name 參數。建議您在設定檔中只設定一個驗證選項。

collection_configuration.hana_metrics_config.hana_db_password_secret_name

String

如要安全地提供資料庫使用者帳戶的密碼,供代理程式查詢 SAP HANA,請指定包含資料庫使用者帳戶安全憑證的密碼名稱。

只有在指定 hana_db_password_secret_namehdbuserstore_keyhana_db_password 時,代理程式才會收集 SAP HANA 相關指標。

對於 SAP HANA 驗證,代理程式會依下列偏好順序使用參數:如果已指定 hdbuserstore_key 設定參數,則優先使用該參數,其次是 hana_db_password 參數,最後是 hana_db_password_secret_name 參數。建議您在設定檔中只設定一個驗證選項。

collection_configuration.hana_metrics_config.hdbuserstore_key

String

如要安全地連線至 SAP HANA 系統,請指定您為該系統建立的安全使用者存放區 (hdbuserstore) 金鑰。

如要使用 hdbuserstore 金鑰進行驗證,請確認下列事項:

  • SAP 工具 hdbsqlhdbuserstore 安裝在代管代理程式的運算執行個體上。
  • hdbuserstore 鍵對應至一個特定 SAP HANA 執行個體。您無法使用包含多個 SAP HANA 執行個體主機名稱的金鑰。
  • SIDadm 使用者可以使用這個金鑰查詢 SAP HANA 資料庫。其中 SID 是指您為 sid 參數指定的值。如要驗證,請以 SIDadm 使用者身分執行下列指令:
    hdbsql -U HDB_USERSTORE_KEY "SELECT * FROM DUMMY"

代理程式 3.3 以上版本支援這個設定參數。

對於 SAP HANA 驗證,代理程式會依下列偏好順序使用參數:如果已指定 hdbuserstore_key 設定參數,則優先使用該參數,其次是 hana_db_password 參數,最後是 hana_db_password_secret_name 參數。建議您在設定檔中只設定一個驗證選項。

collection_configuration.hana_metrics_config.sid

String

指定 SAP HANA 執行個體的 SID。 如果您使用 hdbuserstore 金鑰向 SAP HANA 進行驗證,請參閱hdbuserstore_key 一節。

collection_configuration.collect_workload_validation_metrics

Boolean

如要啟用 Workload Manager 評估指標收集作業,請指定 true。從 3.2 版開始,預設值為 true
這個參數僅適用於 Linux。

collection_configuration.workload_validation_metrics_frequency

Int

Workload Manager 評估指標的收集頻率 (以秒為單位)。預設值為 300 秒。

如要修改 Workload Manager 指標的收集頻率,請在 collection_configuration 區段下方新增 workload_validation_metrics_frequency 參數,並提供必要值。

collection_configuration.workload_validation_collection_definition.fetch_latest_config

Boolean

(選用步驟) 預設值為 true,可讓代理程式收集最新的 Workload Manager 評估指標,不必更新代理程式。如要關閉這項行為,請在設定檔中指定這個參數,並將值設為 false

collection_configuration.workload_validation_db_metrics_config.hana_db_user

String

指定用於查詢 SAP HANA 執行個體的帳戶。 使用者帳戶必須具備 SAP HANA 資料庫的讀取權限。

collection_configuration.workload_validation_db_metrics_config.hana_db_password

String

指定用於查詢 SAP HANA 執行個體的使用者帳戶密碼。

對於 SAP HANA 驗證,代理程式會依下列偏好順序使用參數:如果已指定 hdbuserstore_key 設定參數,則優先使用該參數,其次是 hana_db_password 參數,最後是 hana_db_password_secret_name 參數。建議您在設定檔中只設定一個驗證選項。

collection_configuration.workload_validation_db_metrics_config.hana_db_password_secret_name

String

Secret Manager 中指定儲存使用者帳戶密碼的密碼名稱。

或者,您也可以指定 hdbuserstore_key 設定參數,驗證指定的 SAP HANA 使用者。

對於 SAP HANA 驗證,代理程式會依下列偏好順序使用參數:如果已指定 hdbuserstore_key 設定參數,則優先使用該參數,其次是 hana_db_password 參數,最後是 hana_db_password_secret_name 參數。建議您在設定檔中只設定一個驗證選項。

collection_configuration.workload_validation_db_metrics_config.hdbuserstore_key

String

如要安全地連線至 SAP HANA 系統,請指定您為該系統建立的安全使用者存放區 (hdbuserstore) 金鑰。

如要使用 hdbuserstore 金鑰進行驗證,請確認下列事項:

  • SAP 工具 hdbsqlhdbuserstore 安裝在代管代理程式的運算執行個體上。
  • hdbuserstore 鍵對應至一個特定 SAP HANA 執行個體。您無法使用包含多個 SAP HANA 執行個體主機名稱的金鑰。
  • SIDadm 使用者可以使用這個金鑰查詢 SAP HANA 資料庫。其中 SID 是指您為 sid 參數指定的值。如要驗證,請以 SIDadm 使用者身分執行下列指令:
    hdbsql -U HDB_USERSTORE_KEY "SELECT * FROM DUMMY"

代理程式 3.3 以上版本支援這個設定參數。

如果指定 hdbuserstore_key,則可以略過 hostnameport 參數。

對於 SAP HANA 驗證,代理程式會依下列偏好順序使用參數:如果已指定 hdbuserstore_key 設定參數,則優先使用該參數,其次是 hana_db_password 參數,最後是 hana_db_password_secret_name 參數。建議您在設定檔中只設定一個驗證選項。

collection_configuration.workload_validation_db_metrics_config.sid

String

指定 SAP HANA 執行個體的 SID。

collection_configuration.workload_validation_db_metrics_config.hostname

String

指定主機的 ID,可以是本機或遠端,用來代管 SAP HANA 執行個體。支援的值如下:

  • 如果主機是本機電腦,請指定字串 localhost 或本機迴路 IP 位址,例如 127.0.0.1
  • 如果主機是遠端電腦,請指定其內部或外部 IP 位址。
collection_configuration.workload_validation_db_metrics_config.port

String

指定 SAP HANA 執行個體接受查詢的通訊埠。如果是第一個或唯一租戶資料庫執行個體,通訊埠為 3NN15,其中 NN 是 SAP HANA 執行個體的執行個體編號。

collection_configuration.workload_validation_db_metrics_frequency

Int

SAP HANA 資料庫指標的收集頻率 (以秒為單位),用於 Workload Manager 評估。預設值為 3600 秒。

雖然您可以更新 SAP HANA 資料庫指標的收集頻率,但建議使用預設值。如要修改預設值,請在 collection_configuration 區段下方新增 workload_validation_db_metrics_frequency 參數,並提供必要值。請勿將收集頻率設為大於 3600 秒。

hana_monitoring_configuration.enabled

Boolean

(選用步驟) 如要讓 SAP 代理程式收集 SAP HANA 監控指標,請指定 true。 Google Cloud預設值為 false

只有在指定 hana_monitoring_configuration.enabled: true 時,才能使用下列子項參數。
hana_monitoring_configuration.sample_interval_sec

Int

(選用步驟) 指定取樣間隔 (以秒為單位),這會決定 Google Cloud的 Agent for SAP 查詢 SAP HANA 執行個體的頻率,以收集 SAP HANA 監控指標。預設值為 300 秒。

針對 Google Cloud「Agent for SAP」設定檔中定義的每個查詢,您可以為 sample_interval_sec 參數指定所需間隔,覆寫全域範例間隔。樣本間隔必須為 5 秒以上。

hana_monitoring_configuration.query_timeout_sec

Int

(選用步驟) 為對 SAP HANA 執行個體發出的每個查詢指定逾時時間。 預設值為 300 秒。

hana_monitoring_configuration.execution_threads

Int

(選用步驟) 指定用於將查詢傳送至 SAP HANA 執行個體的執行緒數量。每項查詢都會在各自的執行緒中執行。預設值為 10。

hana_monitoring_configuration.send_query_response_time

Boolean

(選用步驟) 指定 true,讓代理程式擷取代理程式設定檔中定義的每個 SAP HANA 監控查詢的回應時間。

hana_monitoring_configuration.hana_instances.name

String

指定 SAP HANA 執行個體的名稱 ID。

hana_monitoring_configuration.hana_instances.sid

String

指定 SAP HANA 執行個體的 SID。這個字串會做為標籤,加到查詢 SAP HANA 執行個體後產生的所有指標。

hana_monitoring_configuration.hana_instances.host

String

指定主機的 ID,可以是本機或遠端,用來代管 SAP HANA 執行個體。支援的值如下:

  • 如果主機是本機電腦,請指定字串 localhost 或本機迴路 IP 位址,例如 127.0.0.1
  • 如果主機是遠端電腦,請指定其內部或外部 IP 位址。
hana_monitoring_configuration.hana_instances.port

String

指定 SAP HANA 執行個體接受查詢的通訊埠。如果是第一個或唯一租戶資料庫執行個體,通訊埠為 3NN15,其中 NN 是 SAP HANA 執行個體的執行個體編號。

hana_monitoring_configuration.hana_instances.user

String

指定用於查詢 SAP HANA 執行個體的帳戶。

請確認這個使用者有權讀取 SAP HANA 資料庫中的監控檢視區塊。如果未授予這項權限,與監控檢視區塊相關的 SAP HANA 監控指標就不會包含任何資料。

hana_monitoring_configuration.hana_instances.password

String

(選用步驟) 以純文字指定密碼,驗證使用者帳戶,以便查詢 SAP HANA 執行個體。

如要進行驗證,您必須指定下列其中一項:

  • 參數 password 的純文字密碼。
  • (建議) 如果您使用 Secret Manager 將密碼儲存為密鑰,則必須為 secret_name 參數指定對應的密鑰名稱。
  • (建議) 參數的 hdbuserstore hdbuserstore_key

如要進行 SAP HANA 驗證,代理程式會依下列偏好順序使用參數:如果已指定 hdbuserstore_key 設定參數,則優先使用該參數,其次是 password 參數,最後是 secret_name 參數。建議您在設定檔中只設定一個驗證選項。

hana_monitoring_configuration.hana_instances.secret_name

String

(選用步驟) 在 Secret Manager 中指定儲存使用者帳戶密碼的密碼名稱。

如要進行 SAP HANA 驗證,代理程式會依下列偏好順序使用參數:如果已指定 hdbuserstore_key 設定參數,則優先使用該參數,其次是 password 參數,最後是 secret_name 參數。建議您在設定檔中只設定一個驗證選項。

hana_monitoring_configuration.hana_instances.hdbuserstore_key

String

如要安全地連線至 SAP HANA 系統,請指定您為該系統建立的安全使用者存放區 (hdbuserstore) 金鑰。

如要使用 hdbuserstore 金鑰進行驗證,請確認下列事項:

  • SAP 工具 hdbsqlhdbuserstore 安裝在代管代理程式的運算執行個體上。
  • hdbuserstore 鍵對應至一個特定 SAP HANA 執行個體。您無法使用包含多個 SAP HANA 執行個體主機名稱的金鑰。
  • SIDadm 使用者可以使用這個金鑰查詢 SAP HANA 資料庫。其中 SID 是指您為 sid 參數指定的值。如要驗證,請以 SIDadm 使用者身分執行下列指令:
    hdbsql -U HDB_USERSTORE_KEY "SELECT * FROM DUMMY"

代理程式 3.3 以上版本支援這個設定參數。

如果指定 hdbuserstore_key,則可以略過指定 hostport 參數。

hana_monitoring_configuration.hana_instances.is_local

Boolean

如要監控高可用性系統,請指定 true,告知代理程式定義的 SAP HANA 執行個體與代理程式位於同一個 Compute Engine 執行個體。這樣一來,代理程式就會在執行階段檢查定義的 SAP HANA 執行個體,是否為該高可用性系統中的主要或次要節點。代理程式必須瞭解這項資訊,才能在您為 queries.run_on 參數指定的 SAP HANA 執行個體類型上,執行 SAP HANA 監控查詢。

這個參數的預設值為 false,可讓代理程式在對應的 SAP HANA 執行個體上執行所有已啟用的 SAP HANA 監控查詢。詳情請參閱「監控多租戶和高可用性系統」。

代理程式 3.7 以上版本支援這個參數。

hana_monitoring_configuration.hana_instances.instance_num

String

請指定您為 SAP HANA 執行個體設定的執行個體編號。 代理程式需要這項資訊,才能探索 SAP HANA 執行個體。

代理程式 3.7 以上版本支援這個參數。

hana_monitoring_configuration.hana_instances.queries_to_run.run_all

Boolean

(選用步驟) 指定 true,即可在指定的 SAP HANA 執行個體上,執行代理程式設定檔中已啟用的所有 SAP HANA 監控查詢 (預設和自訂)。預設值為 false

hana_monitoring_configuration.hana_instances.queries_to_run.query_name

String

(選用步驟) 指定要在指定 SAP HANA 執行個體上執行的查詢。

如果您執行的是多租戶 SAP HANA 資料庫,可以使用這個設定參數設定特定租戶的監控。在下列範例設定中,系統會在 HANA_TENANT_1 上執行兩個查詢,並在 HANA_TENANT_2 上執行設定中定義的所有查詢:

    "hana_instances": [
      {
        "name": "HANA_TENANT_1,
        "queries_to_run": {
          "query_name": ["QUERY_NAME_1", "QUERY_NAME_2"]
        }
      },
      {
        "name": "HANA_TENANT_2,
        "queries_to_run": {
          "run_all": true
        }
      }
      ...
    ]
hana_monitoring_configuration.hana_instances.enable_ssl

Boolean

(選用步驟) 指出 SAP HANA 執行個體是否已啟用 SSL。預設值為 false

hana_monitoring_configuration.hana_instances.host_name_in_certificate

String

如果您為 SAP HANA 執行個體指定 enable_ssl: true,則必須指定 SSL 憑證中設定的主機名稱。

hana_monitoring_configuration.hana_instances.tls_root_ca_file

String

如果您為 SAP HANA 執行個體指定 enable_ssl: true,則必須指定安全憑證的路徑。

hana_monitoring_configuration.queries.enabled

Boolean

(選用步驟) 如要為所有 SAP HANA 執行個體啟用 SQL 查詢,請為該 SQL 查詢的參數 enabled 指定值 true

hana_monitoring_configuration.queries.name

String

如果您已在設定檔中定義自訂查詢,則必須為每個自訂查詢指定不重複的名稱。

查詢名稱不得重複,因為系統會使用這個名稱在監控中建構指標的預設網址。

hana_monitoring_configuration.queries.run_on

String

(選用步驟) 如果您要監控 SAP HANA HA 系統,並在主要或次要節點上執行 SAP HANA 監控查詢,請指定這個參數。支援的值:PRIMARYSECONDARYALL。指定 ALL 值時,代理程式會在 HA 叢集中的主要和次要節點上,執行 SAP HANA 監控查詢。

代理程式 3.7 以上版本支援這項參數。此外,如要在次要節點上執行查詢,請務必使用主動/主動 (啟用讀取) 設定部署 HA 系統。

hana_monitoring_configuration.queries.sql

String

指定代理程式向 SAP HANA 執行個體發出的 SQL 陳述式。

SQL 陳述式必須符合 SAP 在 SAP HANA SQL 和系統檢視表參考資料中定義的 SQL 語法。
hana_monitoring_configuration.queries.sample_interval_sec

Int

(選用步驟) 指定 SQL 查詢的取樣間隔。這會覆寫全域樣本間隔。值必須等於或大於 5 秒。

hana_monitoring_configuration.queries.columns.name

String

指定可專用於識別每個資料欄的名稱。

資料欄名稱不得重複,因為系統會使用該名稱在 Monitoring 中建立指標的預設網址。

hana_monitoring_configuration.queries.columns.metric_type

String

如要交由 Monitoring 處理,請指定下列其中一種指標類型:METRIC_LABELMETRIC_GAUGEMETRIC_CUMULATIVE

類型為 METRIC_LABEL 的指標會附加為標籤,傳送至 Monitoring 的所有 METRIC_GAUGEMETRIC_CUMULATIVE 指標都會附加這類標籤。

hana_monitoring_configuration.queries.columns.value_type

String

如要交由 Monitoring 處理,請指定指標類型支援的資料類型。

支援的資料類型如下:VALUE_BOOLVALUE_INT64VALUE_STRINGVALUE_DOUBLE。詳情請參閱「支援的組合」。

hana_monitoring_configuration.queries.columns.name_override

String

(選用步驟) 如要交由 Monitoring 處理,請指定要在指標網址中顯示的路徑,而非查詢和資料欄名稱。例如:

  • 指標的預設網址: workload.googleapis.com/sap/hanamonitoring/QUERY_NAME/COLUMN_NAME
  • 使用自訂路徑的指標網址: workload.googleapis.com/sap/hanamonitoring/CUSTOM_PATH

疑難排解

如要瞭解如何診斷及解決安裝和設定 Google Cloud的 Agent for SAP 時可能遇到的問題,請參閱 Google Cloud的 Agent for SAP 疑難排解指南

取得支援

如需解決Google Cloud's Agent for SAP 問題的協助,請收集所有可用的診斷資訊,然後與 Cloud Customer Care 聯絡。如要瞭解如何與 Customer Care 聯絡,請參閱「取得 SAP on Google Cloud支援服務」。