Google Cloud's Agent for SAP is required for SAP support of SAP systems running on a Bare Metal Solution server.
If you use the following RHEL or SLES "for SAP" OS images that Google Cloud provides, then Google Cloud's Agent for SAP is packaged with the OS images:
- RHEL: all "for SAP" images
- SLES: SLES 15 SP4 for SAP and later versions
For information about the operating systems available for running SAP on Bare Metal Solution servers, see the following:
- For SAP HANA, see Certified operating systems.
- For SAP NetWeaver, see Certified operating systems.
To install and configure version 1 of Google Cloud's Agent for SAP on a Compute Engine instance, see Install Google Cloud's Agent for SAP on a Compute Engine instance.
Installation overview
You install Google Cloud's Agent for SAP by using standard operating
system package management commands: on RHEL, the yum
command; on SLES, the
zypper
command. The package management command completes the following tasks:
- Downloads Google Cloud's Agent for SAP.
- Creates the agent as a Linux
systemd
service, namedgoogle-cloud-sap-agent
. - Enables and starts the service,
google-cloud-sap-agent
.
Install the agent
We recommend that you install the latest version of Google Cloud's Agent for SAP, which supports more features. For instructions, see Install and configure Google Cloud's Agent for SAP on a Bare Metal Solution server.
To install version 1 of Google Cloud's Agent for SAP, contact Cloud Customer Care.
After you install Google Cloud's Agent for SAP and the SAP Host Agent, validate the installation of Google Cloud's Agent for SAP, as described in Validate your installation of the agent.
Validate your installation of the agent
Establish an SSH connection with your Bare Metal Solution server.
Run the following command:
systemctl status google-cloud-sap-agent
If the agent is functioning properly, then the output contains
active (running)
. For example: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
If the agent isn't running, then restart the agent.
Verify that SAP Host Agent is receiving metrics
To verify that the infrastructure metrics are collected by Google Cloud's Agent for SAP and sent correctly to the SAP Host Agent, follow these steps:
- In your SAP system, enter transaction
ST06
. In the overview pane, check the availability and content of the following fields for the correct end-to-end setup of the SAP and Google monitoring infrastructure:
- Cloud Provider:
Google Cloud Platform
- Enhanced Monitoring Access:
TRUE
- Enhanced Monitoring Details:
ACTIVE
- Cloud Provider:
Configure Google Cloud's Agent for SAP on Linux
After you install Google Cloud's Agent for SAP, optionally, you can configure the agent to enable collection of Process Monitoring metrics and Workload Manager evaluation metrics. By default, the collection of only the SAP Host Agent metrics is enabled.
Workload Manager evaluation metrics and Process Monitoring metrics collection is supported only on Linux.
If you enable the Workload Manager evaluation metrics and Process Monitoring metrics collection, then you need to complete the following prerequisites:
- Create an IAM service account for the agent to access the Google Cloud resources. Grant the required IAM role to the service account. See Set up a service account for details.
- On Bare Metal Solution server, install the gcloud CLI. See Install the gcloud CLI for details.
- To access Google Cloud, authorize the gcloud CLI. See Authorize the gcloud CLI for details.
- Establish connection to Google Cloud APIs. See Configuring Private Google Access for on-premises hosts for details.
Set up a service account
To enable the agent to access Google Cloud resources from a Bare Metal Solution environment, you need to set up an IAM service account.
At a minimum, the service account that the agent
uses must include the Monitoring Metric Writer (roles/monitoring.metricWriter
) role.
To create a service account, follow these steps:
-
Create a service account:
-
In the Google Cloud console, go to the Create service account page.
Go to Create service account - Select your project.
-
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
. - Click Create and continue.
-
Grant the Monitoring > Monitoring Metric Writer role to the service account.
To grant the role, find the Select a role list, then select Monitoring > Monitoring Metric Writer.
- Click Continue.
-
Click Done to finish creating the service account.
Do not close your browser window. You will use it in the next step.
-
-
Create a service account key:
- In the Google Cloud console, click the email address for the service account that you created.
- Click Keys.
- Click Add key, and then click Create new key.
- Click Create. A JSON key file is downloaded to your computer.
- Click Close.
Upload the JSON key file to a secure location on the Bare Metal Solution server that is accessible to the agent.
Enable Process Monitoring metrics and Workload Manager evaluation metrics collection
To enable the Process Monitoring metrics and Workload Manager evaluation metrics collection, follow these steps:
- Establish an SSH connection with your Bare Metal Solution server.
Open the following configuration file:
/etc/google-cloud-sap-agent/configuration.json
In the
collection_configuration
section, set the following parameters totrue
:collect_process_metrics
: enables the agent to collect Process Monitoring metrics. For SAP HANA database metrics collection, to access and query the SAP HANA database, you need to set up additional parameters in thehana_metrics_config
section.collect_workload_validation_metrics
: enables the agent to collect Workload Manager evaluation metrics.
For more information about the parameters, see the following table.
Save the configuration file.
Restart the agent for the new settings to take effect.
sudo systemctl restart google-cloud-sap-agent
Configuration parameters
The following table explains the configuration parameters of version 1 of Google Cloud's Agent for SAP.
Parameters | |
---|---|
provide_sap_host_agent_metrics |
To enable the collection of the metrics required by the
SAP Host Agent, specify |
bare_metal |
When the agent is installed on a Bare Metal Solution server, specify
|
log_level |
To set the logging level of the agent, set the required value. The available log levels are as follows:
Default is |
log_to_cloud |
To redirect the agent's logs to
Cloud Logging, specify
|
cloud_properties.project_id |
If your SAP system is running on a Bare Metal Solution server, then
specify the project ID of the Google Cloud project that you are
using with Bare Metal Solution. |
cloud_properties.instance_id
|
Specify the name of the Bare Metal Solution server on which you have installed the agent. |
cloud_properties.region |
If your SAP system is running on a Bare Metal Solution server,
then specify the region of the Bare Metal Solution server. |
cloud_properties.zone |
When the agent runs on a compute instance, by default, the agent uses the zone where the compute instance is deployed. |
cloud_properties.image |
Specify the OS image name of the instance. |
cloud_properties.numeric_project_id |
Specify the numeric ID of the Google Cloud project where the SAP system
is running. |
collection_configuration.collect_process_metrics |
To enable Process Monitoring metrics collection, specify |
collection_configuration.process_metrics_frequency |
Specify the collection frequency of the Process Monitoring metrics, in
seconds. The default value for this parameter is Although you can update the collection frequency of the Process
Monitoring metrics, we recommend that you use the default value. If you
need to modify the default value, then add the
|
collection_configuration.hana_metrics_config.hana_db_user |
Specify the database user account that the agent uses to query
SAP HANA. Default is |
collection_configuration.hana_metrics_config.hana_db_password |
Specify the plain text password for the database user account that the agent uses to query SAP HANA. Instead of specifying a plain text password, we recommend that you use one of the following options:
|
collection_configuration.hana_metrics_config.hana_db_password_secret_name |
To securely provide the password for the database user account that the agent uses to query SAP HANA, specify the name of the secret that contains the security credentials for the database user account. The agent collects the SAP HANA related metrics only when you specify
either |
collection_configuration.hana_metrics_config.sid |
Specify the SID of your SAP HANA instance. |
collection_configuration.collect_workload_validation_metrics |
To enable Workload Manager evaluation metrics collection,
specify |
collection_configuration.workload_validation_metrics_frequency |
The collection frequency of the Workload Manager
evaluation metrics in seconds. The default value is If you need to modify the collection frequency of the
Workload Manager metrics, then add the
|
collection_configuration.workload_validation_db_metrics_config.hana_db_user |
Specify the user account that is used to query the SAP HANA instance. The user account must have the read permission to the SAP HANA database. |
collection_configuration.workload_validation_db_metrics_config.hana_db_password |
Specify the password for the user account that is used to query the SAP HANA instance. |
collection_configuration.workload_validation_db_metrics_config.hana_db_password_secret_name |
Specify the name of the secret in Secret Manager that stores the user account's password. |
collection_configuration.workload_validation_db_metrics_config.sid |
Specify the SID of your SAP HANA instance. |
collection_configuration.workload_validation_db_metrics_config.hostname |
Specify the identifier for the machine, either local or remote, that hosts your SAP HANA instance. The following are the supported values:
|
collection_configuration.workload_validation_db_metrics_config.port |
Specify the port on which your SAP HANA instance accepts queries. For
the first or only tenant database instance, the port is
|
collection_configuration.workload_validation_db_metrics_frequency |
The collection frequency of the SAP HANA database metrics, in seconds,
for Workload Manager evaluation.
Default is |
Default configuration
{ "provide_sap_host_agent_metrics": true, "log_level": "INFO", "log_to_cloud": true, "collection_configuration": { "collect_workload_validation_metrics": false, "collect_process_metrics": false } }
Example configuration
For installing the agent on a Bare Metal Solution server, you need to add the required parameters to the configuration file. The following example shows a completed configuration file for installing the agent on a Bare Metal Solution server.
{ "provide_sap_host_agent_metrics": true, "bare_metal": true, "log_level": "INFO", "log_to_cloud": true, "collection_configuration": { "collect_workload_validation_metrics": false, "collect_process_metrics": true, "hana_metrics_config": { "hana_db_user": "user", "hana_db_password_secret_name": "secret-name" } }, "cloud_properties": { "project_id": "my-project", "instance_id": "bms-machine-1", "image": "rhel-8", "region": "us-central1" } }
View the collected metrics
To visualize the Process Monitoring metrics that the agent collects, you can use the following custom dashboards that Google Cloud provides:
Agent for SAP - HANA Overview: This dashboard provides charts that display status overview for the following metrics: SAP HANA Availability, SAP HANA HA Availability, SAP HANA HA Replication, SAP HANA Service Status, HA Cluster - Node State, and HA Cluster - Resource State for SAP Instances.
The JSON file for this dashboard is
sap-agent-status-overview.json
.Agent for SAP - HANA Raw Metrics: This dashboard provides charts that display raw metric values for the following metrics: SAP HANA Availability, SAP HANA HA Availability, SAP HANA HA Replication, SAP HANA Service Status, HA Cluster - Node State, and HA Cluster - Resource State for SAP Instances.
The JSON file for this dashboard is
sap-agent-raw-metrics.json
.
Install dashboards
To install a custom dashboard, complete the following steps:
Google Cloud console
In the Google Cloud console, go to the Monitoring page:
In the Monitoring navigation panel, click Dashboards.
Click the Sample library tab.
To filter the agent-specific custom dashboards, in the Filter field, type
Agent for SAP
.(Optional) To view details about a dashboard or to preview its contents, click Preview.
Select the dashboard that you want to install.
Click Import, and then click Confirm.
The dashboard is added to the available dashboards in your Google Cloud project. To see your dashboard, follow the instructions in View the installed dashboard.
Google Cloud CLI
Open the Cloud Shell:
In the Cloud Shell, clone or download the repository:
git clone https://github.com/GoogleCloudPlatform/monitoring-dashboard-samples/
In the Cloud Shell, install the required dashboard using the corresponding JSON file:
gcloud monitoring dashboards create --config-from-file=CONFIG_FROM_FILE
Replace
CONFIG_FROM_FILE
with the path to the JSON file that contains the dashboard configuration. Dashboard configuration files can be located at path:monitoring-dashboard-samples/dashboards/google-cloud-agent-for-sap
.The dashboard is added to the available dashboards in your Google Cloud project. To see your dashboard, follow the instructions in View the installed dashboard.
View the installed dashboards
To view the installed dashboards, follow these steps:
In the Google Cloud console, go to the Monitoring page:
In the Monitoring navigation panel, click Dashboards.
Click the dashboard name in the list.
If you have a lot of dashboards, then you can filter for custom dashboards or for the name of the new dashboard. For information on filtering this list, see View custom dashboards.
The following image is an example that shows a part of the custom dashboard for SAP HANA metrics in Monitoring.
Troubleshooting
For information about diagnosing and resolving issues that you might encounter when you install and configure Google Cloud's Agent for SAP, see Google Cloud's Agent for SAP troubleshooting guide.
Get support
If you need help resolving problems with Google Cloud's Agent for SAP, then collect all available diagnostic information and contact Cloud Customer Care. For information about contacting Customer Care, see Getting support for SAP on Google Cloud.