If you have installed the agent on a Bare Metal Solution server, then make sure
that you have completed the required prerequisites and set up a service
account. For instructions, see
Configure Google Cloud's Agent for SAP on Linux.
Set IAM roles
To allow Google Cloud's Agent for SAP collect the Process Monitoring metrics, you
must ensure that the service account being used by your Compute Engine
instance or Bare Metal Solution server includes the following roles:
Identify the service account to which you want to add a role.
If the service account isn't already on the principals list,
then it doesn't have any roles assigned to it. Click Add and enter the
email address of the service account.
If the service account is already on the principals list, then it has existing
roles. Click the Edit button for the service account that you want to
edit.
Select the required role from the list of available roles:
Compute Viewer
Monitoring > Monitoring Metric Writer
Secret Manager > Secret Manager Secret Accessor
Click Add or Save to apply the roles to the service account.
Enable Process Monitoring metrics collection
To enable the collection of Process Monitoring metrics using
Google Cloud's Agent for SAP, follow these steps:
Establish an SSH connection with your host Compute Engine instance.
Open the agent's configuration file:
/etc/google-cloud-sap-agent/configuration.json
In the collection_configuration section, perform the following:
For the parameter collect_process_metrics, specify the value true.
To enable the collection of process monitoring metrics related to your
SAP HANA database instances, you need to configure additional parameters
in the hana_metrics_config section. For information about these
parameters, see Configuration parameters.
Optionally, under the cloud_properties section, you can update the parameter values that
are set automatically. To do so, add the cloud_properties section to your
configuration file, and then specify the required parameters and their values.
Save the configuration file.
Restart the agent for the new settings to take effect:
The following table explains the configuration parameters of
Google Cloud's Agent for SAP that are specific to the collection of the Process
Monitoring metrics.
Parameters
provide_sap_host_agent_metrics
Boolean
To enable the collection of the metrics required by the
SAP Host Agent, specify true.
Default is true.
Don't set provide_sap_host_agent_metrics to false
unless you are directed by Cloud Customer Care or SAP Support.
bare_metal
Boolean
When the agent is installed on a Bare Metal Solution server, specify
true. Default is false.
log_level
String
To set the logging level of the agent, set the required value.
The available log levels are as follows:
DEBUG
INFO
WARNING
ERROR
Default is INFO. Don't change the logging level unless you
are directed by Cloud Customer Care.
log_to_cloud
Boolean
To redirect the agent's logs to
Cloud Logging, specify
true. The default is true.
sap_system_discovery
Boolean
To enable the SAP system discovery, specify true. Default is
true.
cloud_properties.project_id
String
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.
When the agent runs on a Compute Engine instance, by default,
the agent detects the project ID automatically.
cloud_properties.instance_name
String
If your SAP system is running on a Compute Engine instance,
then specify the name of that compute instance. The agent automatically detects
the compute instance name upon installation.
If your SAP system is running on a Bare Metal Solution server, then
specify the name of that server. In agent version 2.5 or earlier, specify
the Bare Metal Solution server name for the property
instance_id.
cloud_properties.region
String
If your SAP system is running on a Bare Metal Solution server,
then specify the region of the Bare Metal Solution server.
When the agent runs on a compute instance, by default,
the agent uses the region where the compute instance is deployed.
cloud_properties.zone
String
When the agent runs on a compute instance, by default, the agent uses the
zone where the compute instance is deployed.
cloud_properties.image
String
Specify the OS image name of the instance.
When the agent runs on a compute instance, by default, the agent
automatically detects the OS image used by the compute instance.
cloud_properties.numeric_project_id
String
Specify the numeric ID of the Google Cloud project where the SAP system
is running.
When the agent runs on a compute instance, by default, the agent
automatically detects project number.
collection_configuration.collect_process_metrics
Boolean
To enable Process Monitoring metrics collection, specify true.
Default is false.
This parameter is applicable only for Linux.
If you enable Process metrics collection for SAP HANA, then you need to
set up additional parameters listed under hana_metrics_config.
From version 2.6, this parameter determines the collection frequency of the
fast-changing Process Monitoring metrics,
in seconds. Fast-changing Process Monitoring metrics are: sap/hana/availability,
sap/hana/ha/availability, and
sap/nw/availability.
The default value for this parameter is
5 seconds. We recommend that you use this default value.
All other (slow-changing) Process Monitoring metrics are collected at a
default frequency of 120 seconds. To change the collection frequency of
the slow-changing Process Monitoring metrics, use the parameter
slow_process_metrics_frequency.
The default value for this parameter is 120 seconds.
collection_configuration.process_metrics_to_skip
Array
Specify the
Process Monitoring metrics
that you don't want the agent to collect. This parameter accepts a
comma-separated value of Process Monitoring metric names. For example:
"process_metrics_to_skip": ["/sap/nw/abap/sessions", "/sap/nw/abap/rfc"].
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 hana_db_password_secret_name
or hana_db_password.
collection_configuration.hana_metrics_config.sid
String
Specify the SID of your SAP HANA instance.
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.
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-29 UTC."],[],[],null,["# Version 2: Configure Process Monitoring metrics collection\n\n\u003cbr /\u003e\n\n\n| **Warning:** Support for version 2 of Google Cloud's Agent for SAP ended on July 31, 2025.\n|\n| If you're using version 2 of Google Cloud's Agent for SAP, then we recommend that you switch to the\n| latest version of the agent as soon as possible. For information about how to update\n| Google Cloud's Agent for SAP, see\n| [Update\n| Google Cloud's Agent for SAP](/sap/docs/agent-for-sap/latest/operations#agent4sap-update).\n\n\u003cbr /\u003e\n\nThis guide shows you how to configure version 2 of\nGoogle Cloud's Agent for SAP to collect the Process\nMonitoring metrics from your SAP systems.\n\nFor information about this feature, see\n[Process Monitoring using Google Cloud's Agent for SAP](/sap/docs/agent-for-sap/2.0/process-monitoring).\n| **Note:** The collection of Process Monitoring metrics is supported only on Linux. It is not supported on Windows.\n\nBefore you begin\n----------------\n\n- Validate your installation of Google Cloud's Agent for SAP. For instructions, see the [installation guide for your scenario](/sap/docs/agent-for-sap/2.0/install-config).\n- If you have installed the agent on a Bare Metal Solution server, then make sure that you have completed the required prerequisites and set up a service account. For instructions, see [Configure Google Cloud's Agent for SAP on Linux](/sap/docs/agent-for-sap/2.0/install-config-on-bms#configure_agent4sap).\n\nSet IAM roles\n-------------\n\nTo allow Google Cloud's Agent for SAP collect the Process Monitoring metrics, you\nmust ensure that the service account being used by your Compute Engine\ninstance or Bare Metal Solution server includes the following roles:\n\n- [Compute Viewer (`roles/compute.viewer`)](/compute/docs/access/iam#compute.viewer)\n- [Monitoring Metric Writer (`roles/monitoring.metricWriter`)](/monitoring/access-control#mon_roles_desc) roles.\n- [Secret Manager Secret Accessor (`roles/secretmanager.secretAccessor`)](/secret-manager/docs/access-control#secretmanager.secretAccessor), if you use Secret Manager for storing SAP HANA database password.\n\nTo add these required roles to your service account, follow these steps:\n\n1. In the Google Cloud console, go to the **IAM** page.\n\n [Go to IAM](https://console.cloud.google.com/project/_/iam-admin/iam)\n2. Select your Google Cloud project.\n\n3. Identify the service account to which you want to add a role.\n\n - If the service account isn't already on the principals list, then it doesn't have any roles assigned to it. Click **Add** and enter the email address of the service account.\n - If the service account is already on the principals list, then it has existing roles. Click the **Edit** button for the service account that you want to edit.\n4. Select the required role from the list of available roles:\n\n - **Compute Viewer**\n - **Monitoring \\\u003e Monitoring Metric Writer**\n - **Secret Manager \\\u003e Secret Manager Secret Accessor**\n5. Click **Add** or **Save** to apply the roles to the service account.\n\nEnable Process Monitoring metrics collection\n--------------------------------------------\n\nTo enable the collection of Process Monitoring metrics using\nGoogle Cloud's Agent for SAP, follow these steps:\n\n1. Establish an SSH connection with your host Compute Engine instance.\n\n2. Open the agent's configuration file:\n\n ```\n /etc/google-cloud-sap-agent/configuration.json\n ```\n3. In the `collection_configuration` section, perform the following:\n\n - For the parameter `collect_process_metrics`, specify the value `true`.\n - To enable the collection of process monitoring metrics related to your SAP HANA database instances, you need to configure additional parameters in the `hana_metrics_config` section. For information about these parameters, see [Configuration parameters](#configuration_parameters).\n4. Optionally, under the `cloud_properties` section, you can update the parameter values that\n are set automatically. To do so, add the `cloud_properties` section to your\n configuration file, and then specify the required parameters and their values.\n\n5. Save the configuration file.\n\n6. Restart the agent for the new settings to take effect:\n\n ```\n sudo systemctl restart google-cloud-sap-agent\n ```\n\n### Example configuration files\n\n### Compute Engine instance\n\nThe following example is a completed configuration file of Google Cloud's Agent for SAP, running on a Compute Engine instance, where the collection of Process Monitoring metrics is enabled: \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 \"sap_system_discovery\": true,\n \"collect_workload_validation_metrics\": true,\n \"collect_process_metrics\": true,\n \"process_metrics_frequency\": 5,\n \"slow_process_metrics_frequency\": 30,\n \"hana_metrics_config\": {\n \"hana_db_user\": \"db_user_name\",\n \"sid\": \"DEH\",\n \"hana_db_password_secret_name\": \"db_pwd_secret_name\"\n }\n },\n \"hana_monitoring_configuration\": {\n \"enabled\": false\n }\n}\n```\n\n### Bare Metal Solution server\n\nThe following example is a completed configuration file of Google Cloud's Agent for SAP, running on a Bare Metal Solution server, where the collection of Process Monitoring metrics is enabled: \n\n```json\n{\n \"provide_sap_host_agent_metrics\": true,\n \"bare_metal\": true,\n \"log_level\": \"INFO\",\n \"log_to_cloud\": true,\n \"collection_configuration\": {\n \"sap_system_discovery\": true,\n \"collect_workload_validation_metrics\": true,\n \"collect_process_metrics\": true,\n \"process_metrics_frequency\": 5,\n \"slow_process_metrics_frequency\": 30,\n \"hana_metrics_config\": {\n \"hana_db_user\": \"db_user_name\",\n \"sid\": \"DEH\",\n \"hana_db_password_secret_name\": \"db_pwd_secret_name\"\n }\n },\n \"cloud_properties\": {\n \"project_id\": \"my-project\",\n \"instance_name\": \"bms-machine-1\",\n \"region\": \"us-central1\",\n \"image\": \"rhel-8\"\n },\n \"hana_monitoring_configuration\": {\n \"enabled\": false\n }\n}\n```\n\n### Configuration parameters\n\nThe following table explains the configuration parameters of\nGoogle Cloud's Agent for SAP that are specific to the collection of the Process\nMonitoring metrics.\n\n\u003cbr /\u003e\n\nView the collected metrics\n--------------------------\n\nTo visualize the\n[Process Monitoring metrics](/sap/docs/agent-for-sap/2.0/planning#process_monitoring_metrics)\nthat the agent collects, you can use the following custom dashboards that\nGoogle Cloud provides:\n\n- **Agent for SAP - HANA Overview**:\n This dashboard provides charts that display status overview for the following\n metrics:\n SAP HANA Availability, SAP HANA HA Availability, SAP HANA HA Replication,\n SAP HANA Service Status, HA Cluster - Node State, and HA Cluster - Resource\n State for SAP Instances.\n\n The JSON file for this dashboard is `sap-agent-status-overview.json`.\n- **Agent for SAP - HANA Raw Metrics**:\n This dashboard provides charts that display raw metric values for the\n following metrics:\n SAP HANA Availability, SAP HANA HA Availability, SAP HANA HA Replication,\n SAP HANA Service Status, HA Cluster - Node State, and\n HA Cluster - Resource State for SAP Instances.\n\n The JSON file for this dashboard is `sap-agent-raw-metrics.json`.\n\n\n### Install dashboards\n\nTo install a custom dashboard, complete the following steps: \n\n### Google Cloud console\n\n1. In the Google Cloud console, go to the **Monitoring** page:\n\n [Go to Monitoring](https://console.cloud.google.com/monitoring)\n2. In the Monitoring navigation panel, click **Dashboards**.\n\n3. Click the **Sample library** tab.\n\n4. To filter the agent-specific custom dashboards, in the **Filter** field,\n type `Agent for SAP`.\n\n5. (Optional) To view details about a dashboard or to preview its\n contents, click **Preview**.\n\n6. Select the dashboard that you want to install.\n\n7. Click **Import** , and then click **Confirm**.\n\n The dashboard is added to the available dashboards in your\n Google Cloud project. To see your dashboard, follow the instructions\n in [View the installed dashboard](#view_dashboard).\n\n### Google Cloud CLI\n\n1. Open the Cloud Shell:\n\n [Open Cloud Shell](https://console.cloud.google.com/monitoring?cloudshell=true)\n2. In the Cloud Shell, clone or download the repository:\n\n \u003cbr /\u003e\n\n ```sh\n git clone https://github.com/GoogleCloudPlatform/monitoring-dashboard-samples/\n ```\n\n \u003cbr /\u003e\n\n3. In the Cloud Shell, install the required dashboard using the\n corresponding JSON file:\n\n \u003cbr /\u003e\n\n ```sh\n gcloud monitoring dashboards create --config-from-file=CONFIG_FROM_FILE\n ```\n\n \u003cbr /\u003e\n\n Replace \u003cvar translate=\"no\"\u003eCONFIG_FROM_FILE\u003c/var\u003e with the path to the\n JSON file that contains the dashboard configuration. Dashboard\n configuration files can be located at path: `monitoring-dashboard-samples/dashboards/google-cloud-agent-for-sap`.\n\n The dashboard is added to the available dashboards in your\n Google Cloud project. To see your dashboard, follow the instructions\n in [View the installed dashboard](#view_dashboard).\n\n### View the installed dashboards\n\nTo view the installed dashboards, follow these steps:\n\n1. In the Google Cloud console, go to the **Monitoring** page:\n\n [Go to Monitoring](https://console.cloud.google.com/monitoring)\n2. In the Monitoring navigation panel, click **Dashboards**.\n\n3. Click the dashboard name in the list.\n\nIf you have a lot of dashboards, then you can filter for custom dashboards or for\nthe name of the new dashboard. For information on filtering this list,\nsee [View custom dashboards](/monitoring/charts/dashboards#view-dashboard).\n\nThe following image is an example that shows a part of the custom dashboard for\nSAP HANA metrics in Monitoring."]]