This document describes how to configure Google Cloud's Agent for SAP to set up observability for your SAP workload by using Workload Manager.
The Workload Manager observability service needs the agent to collect metrics from your SAP workload and the underlying infrastructure. For more information, see SAP observability overview.
Before you begin
Validate your installation of Google Cloud's Agent for SAP on all the Compute Engine instances running the SAP workload for which you want to set up observability.
For information about how to validate agent installation, see Validate your installation of the agent.
Verify that you've completed the Prerequisites for SAP observability.
Configure the agent for a single-zone workload
VM Extension Manager
To configure and manage the agent on a fleet of Compute Engine instances, you must create a VM Extension Manager policy for it.
To configure the agent to set up observability for an SAP workload that is running in a single zone, complete the following steps:
Set up VM Extension Manager:
- In the VM Extension Manager documentation, review the Before you begin section.
Set up the IAM roles needed to create and manage VM Extension Manager policies. For more information, see the following:
Create a VM extension policy that installs and manages Google Cloud's Agent for SAP on the compute instances that run your SAP workload:
- Create the VM extension policy in the zone where your SAP workload is running. For information about how to create such a VM extension policy, see Create a zonal VM extension policy.
- To view examples of agent configurations for observability, see Example agent configurations.
Package manager
If you manage the agent lifecycle manually instead of using VM Extension Manager, then you can configure Google Cloud's Agent for SAP by using a package manager:
Establish an SSH connection with the compute instance that runs your SAP workload.
Verify that you're running the latest version of the Agent for SAP.
For information about how to update the agent, see Update Google Cloud's Agent for SAP.
To let the agent lookup details about SAP workload and send them to Workload Manager:
sudo /usr/bin/google_cloud_sap_agent configure -feature=sap_discovery -enable sudo /usr/bin/google_cloud_sap_agent configure -feature=workload_discovery -enableEnable the agent to collect metrics from the processes running in your SAP workload:
- Enable the process monitoring feature of the agent:
sudo /usr/bin/google_cloud_sap_agent configure -feature=process_metrics -enable- To let the agent collect process metrics related to your
SAP HANA database instances, you need to configure additional parameters
in the
hana_metrics_configsection.
For more information, see Configure process monitoring metrics collection.
Enable the agent to collect metrics from the SAP HANA instances running in your SAP workload:
- Enable the SAP HANA monitoring feature of the agent:
sudo /usr/bin/google_cloud_sap_agent configure -feature=hana_monitoring -enable- To let the agent connect with the SAP HANA instances and collect metrics, you need to configure additional parameters.
For more information, see Configure SAP HANA monitoring metrics collection.
Save the configuration file.
To view examples of agent configurations for observability, see Example agent configurations.
Configure the agent for a multi-zone workload
VM Extension Manager
To configure and manage the agent on a fleet of Compute Engine instances, you must create a VM Extension Manager policy for it.
To configure the agent to set up observability for an SAP workload that is running in two or more zones, complete the following steps:
Set up VM Extension Manager:
- In the VM Extension Manager documentation, review the Before you begin section.
Set up the IAM roles needed to create and manage VM Extension Manager policies. For more information, see the following:
Create a VM extension policy that installs and manages Google Cloud's Agent for SAP on the compute instances that run the primary site of your SAP workload:
- Create the VM extension policy in the zone where your SAP workload's primary site is running. For information about how to create such a VM extension policy, see Create a zonal VM extension policy.
- To view examples of agent configurations for observability, see Example agent configurations.
If you're running a high-availability SAP workload, or have a disaster recovery (DR) site for your SAP workload, then create a VM extension policy that installs and manages Google Cloud's Agent for SAP on the compute instances that run the secondary or DR site of your SAP workload.
Package manager
If you manage the agent lifecycle manually instead of using VM Extension Manager, then you can configure Google Cloud's Agent for SAP by using a package manager:
Establish an SSH connection with the compute instance that runs your SAP workload.
Verify that you're running the latest version of the Agent for SAP.
For information about how to update the agent, see Update Google Cloud's Agent for SAP.
To let the agent collect details about SAP workload and send them to Workload Manager:
sudo /usr/bin/google_cloud_sap_agent configure -feature=sap_discovery -enable sudo /usr/bin/google_cloud_sap_agent configure -feature=workload_discovery -enableEnable the agent to collect metrics from the processes running in your SAP workload:
- Enable the process monitoring feature of the agent:
sudo /usr/bin/google_cloud_sap_agent configure -feature=process_metrics -enable- To let the agent collect process metrics related to your
SAP HANA database instances, you need to configure additional parameters
in the
hana_metrics_configsection.
For more information, see Configure process monitoring metrics collection.
Enable the agent to collect metrics from the SAP HANA instances running in your SAP workload:
- Enable the SAP HANA monitoring feature of the agent:
sudo /usr/bin/google_cloud_sap_agent configure -feature=hana_monitoring -enable- To let the agent connect with the SAP HANA instances and collect metrics, you need to configure additional parameters.
For more information, see Configure SAP HANA monitoring metrics collection.
Save the configuration file.
If you're running a high-availability SAP workload, or have a disaster recovery (DR) site for your SAP workload, then repeat this procedure for all the other compute instances that are running your SAP workload.
To view examples of agent configurations for observability, see Example agent configurations.
Validate the setup for Workload Manager observability
You can validate if you have the correct Google Cloud setup for using the
Workload Manager observability service by running the agent's
status command.
To validate the Google Cloud setup, complete the following steps:
- Establish an SSH connection with the Compute Engine instance that is running your SAP workload.
Check the Google Cloud setup for observability:
sudo /usr/bin/google_cloud_sap_agent statusIf your Google Cloud setup for using the Workload Manager observability service is correct, then the output includes the following. Your configuration might have values other than the
defaultones.Agent Status: Installed version: 3.10-.... ... Systemd Service Enabled: True Systemd Service Running: True Cloud API Full Scopes: True Configuration File: /etc/google-cloud-sap-agent/configuration.json Configuration Valid: True ... ---------------------------------------------------------------------------- Process Metrics: Enabled Status: Fully Functional IAM Permissions: All granted Configuration: collect_process_metrics: true (configuration file) process_metrics_frequency: 30 (default) process_metrics_to_skip: [] (default) slow_process_metrics_frequency: 120 (default) ... ---------------------------------------------------------------------------- HANA Monitoring Metrics: Enabled Status: Fully Functional IAM Permissions: All granted Configuration: connection_timeout: 120 (default) enabled: true (configuration file) execution_threads: 10 (default) max_connect_retries: 1 (default) query_timeout_sec: 300 (default) sample_interval_sec: 300 (default) send_query_response_time: false (default) ... ---------------------------------------------------------------------------- System Discovery: Enabled Status: Fully Functional IAM Permissions: All granted Configuration: enable_discovery: true (default) enable_workload_discovery: true (default) sap_instances_update_frequency: 60 (default) system_discovery_update_frequency: 14400 (default) ...If your output conveys that some setup is missing, then review the information provided in the preceding sections, perform the required actions, and then re-run the
statuscommand to re-validate the setup.If you're using more than one compute instance to run your workload, then repeat this procedure for all the other compute instances running your workload.
Example agent configurations
The following examples are completed configuration files of Google Cloud's Agent for SAP that is configured to support observability for an SAP HANA workload:
The following example uses a
Secure user store (hdbuserstore) key for
SAP HANA authentication:
{ "provide_sap_host_agent_metrics": true, "bare_metal": false, "log_level": "INFO", "log_to_cloud": true, "collection_configuration": { "collect_workload_validation_metrics": true, "collect_process_metrics": true, "hana_metrics_config": { "hana_db_user": "db_user_name", "sid": "DEH", "hdbuserstore_key": "user_store_key" } }, "discovery_configuration": { "enable_workload_discovery": true, "enable_discovery": true }, "hana_monitoring_configuration": { "enabled": true, "hana_instances": [ { "name": "local", "sid": "DEH", "user": "system", "hdbuserstore_key": "user_store_key" }, { "name": "remote", "sid": "DEH", "user": "system", "hdbuserstore_key": "user_store_key" } ] } }
The following example uses a username and Secret Manager secret for SAP HANA authentication:
{ "provide_sap_host_agent_metrics": true, "bare_metal": false, "log_level": "INFO", "log_to_cloud": true, "collection_configuration": { "collect_workload_validation_metrics": true, "collect_process_metrics": true, "hana_metrics_config": { "hana_db_user": "db_user_name", "sid": "DEH", "hana_db_password_secret_name": "db_pwd_secret_name" } }, "discovery_configuration": { "enable_workload_discovery": true, "enable_discovery": true }, "hana_monitoring_configuration": { "enabled": true, "hana_instances": [ { "name": "local", "sid": "DEH", "host": "localhost", "port": "30015", "user": "db_user_name", "hdbuserstore_key": "user_store_key" }, { "name": "remote", "sid": "DEH", "host": "10.123.0.12", "port": "30015", "user": "db_user_name", "secret_name": "db_pwd_secret_name" } ] } }
The following example uses a username and password for SAP HANA
authentication. We recommend that you instead use a
Secure user store (hdbuserstore) key
or Secret Manager secret for SAP HANA authentication.
{ "provide_sap_host_agent_metrics": true, "bare_metal": false, "log_level": "INFO", "log_to_cloud": true, "collection_configuration": { "collect_workload_validation_metrics": true, "collect_process_metrics": true, "hana_metrics_config": { "hana_db_user": "db_user_name", "sid": "DEH", "hana_db_password": "TempPa55word" } }, "discovery_configuration": { "enable_workload_discovery": true, "enable_discovery": true }, "hana_monitoring_configuration": { "enabled": true, "hana_instances": [ { "name": "local", "sid": "DEH", "host": "localhost", "port": "30015", "user": "db_user_name", "password": "TempPa55word" }, { "name": "remote", "sid": "DEH", "host": "10.123.0.12", "port": "30015", "user": "db_user_name", "password": "TempPa55word" } ] } }
For information about the configuration parameters supported by the agent, see Configuration parameters.
What's next
Once you've successfully completed the observability setup for an SAP workload, it can take up to 15 minutes for that workload to appear in the Workload Manager Observability page in the Google Cloud console.
For information about how to observe your SAP workload, see View observability metrics for SAP.