This guide shows you how to configure Google Cloud's Agent for SAP to collect the health
metrics from the agent's daemon process on your Compute Engine
instance or Bare Metal Solution server.
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.
Required roles
To ensure that the service account has the necessary
permissions to let Google Cloud's Agent for SAP collect Agent Health metrics,
ask your administrator to grant the service account the
following IAM roles on your project:
These predefined roles contain
the permissions required to let Google Cloud's Agent for SAP collect Agent Health metrics. To see the exact permissions that are
required, expand the Required permissions section:
Required permissions
The following permissions are required to let Google Cloud's Agent for SAP collect Agent Health metrics:
To collect the Agent Health metrics from the host Compute Engine instance and write them to Cloud Monitoring:
monitoring.timeSeries.create
Your administrator might also be able to give the service account
these permissions
with custom roles or
other predefined roles.
Enable agent health metrics collection
To enable Google Cloud's Agent for SAP to collect the health metrics for its daemon
process on your host, follow these steps:
Establish an SSH connection with your host Compute Engine instance
or Bare Metal Solution server.
Enable the collection of the agent health metrics:
Run command
To enable the collection of the agent health metrics, run the following
command:
Optionally, you can modify the frequency at which the agent collects
the CPU and memory usage of its daemon process and sends them to
Cloud Monitoring. The default frequency is 60 seconds.
To modify this frequency, run the following command:
Replace FREQUENCY with the required value, in
seconds. The frequency must not be less than 5 seconds.
Optionally, you can modify the frequency at which the agent checks its
operational health and sends that information to Cloud Monitoring.
The default frequency is 60 seconds.
To modify this frequency, run the following command. The frequency must
not be less than 5 seconds.
As an alternative to running the agent's command, you can manually modify
the agent's configuration as follows:
Open the Backint configuration file:
/etc/google-cloud-sap-agent/configuration.json
In the collection_configuration section, include the following:
"collect_agent_metrics": true
Optionally, you can modify the frequency at which the agent collects
the CPU and memory usage of its daemon process and sends them to
Cloud Monitoring. The default frequency is 60 seconds.
To modify this frequency, include the following in the
collection_configuration section.
"agent_metrics_frequency": FREQUENCY
Replace FREQUENCY with the required value, in
seconds. The frequency must not be less than 5 seconds.
Optionally, you can modify the frequency at which the agent checks its
operational health and sends that information to Cloud Monitoring.
The default frequency is 60 seconds.
To modify this frequency, include the following in the
collection_configuration section. The frequency must not be less than
5 seconds.
"agent_health_frequency": FREQUENCY
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 agent health
metrics:
Parameters
collection_configuration.collect_agent_metrics
Boolean
Optional. Specify true to let the agent collect the
following information and send them to Cloud Monitoring:
CPU and memory usage by the agent's daemon process on your host.
The operational health of the agent's daemon process on your host.
The default value is false.
collection_configuration.agent_metrics_frequency
Int
Optional. Specify the frequency at which the agent collects
the CPU and memory usage of its daemon process on
the host and sends them to Cloud Monitoring. This information is
captured by the sap/agent/cpu/utilization and
sap/agent/memory/utilization metrics. The default value is
60 seconds. The frequency must not be less than 5 seconds.
collection_configuration.agent_health_frequency
Int
Optional. Specify the frequency at which the agent which the agent checks
its operational health and sends that information to Cloud Monitoring.
This information is captured by the sap/agent/health metric.
The default value is 60 seconds. The frequency must not be
less than 5 seconds.
[[["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-28 UTC."],[],[],null,["# Configure agent health metrics collection\n\n\u003cbr /\u003e\n\nThis guide shows you how to configure Google Cloud's Agent for SAP to collect the health\nmetrics from the agent's daemon process on your Compute Engine\ninstance or Bare Metal Solution server.\n\nFor information about this feature, see\n[Agent health metrics collection](/sap/docs/agent-for-sap/latest/planning#agent_health_metrics).\n| **Note:** The collection of the agent health 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/latest/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/latest/install-config-on-bms#configure_agent4sap).\n\n### Required roles\n\n\nTo ensure that the service account has the necessary\npermissions to let Google Cloud's Agent for SAP collect Agent Health metrics,\n\nask your administrator to grant the service account the\nfollowing IAM roles on your project:\n\n| **Important:** You must grant these roles to the service account, *not* to your user account. Failure to grant the roles to the correct principal might result in permission errors.\n\n- [Monitoring Metric Writer (`roles/monitoring.metricWriter`)](/iam/docs/understanding-roles#monitoring.metricWriter): to write the collected metrics to Cloud Monitoring.\n\n\nFor more information about granting roles, see [Manage access to projects, folders, and organizations](/iam/docs/granting-changing-revoking-access).\n\n\nThese predefined roles contain\n\nthe permissions required to let Google Cloud's Agent for SAP collect Agent Health metrics. To see the exact permissions that are\nrequired, expand the **Required permissions** section:\n\n\n#### Required permissions\n\nThe following permissions are required to let Google Cloud's Agent for SAP collect Agent Health metrics:\n\n- To collect the Agent Health metrics from the host Compute Engine instance and write them to Cloud Monitoring: ` monitoring.timeSeries.create`\n\n\nYour administrator might also be able to give the service account\nthese permissions\nwith [custom roles](/iam/docs/creating-custom-roles) or\nother [predefined roles](/iam/docs/roles-overview#predefined).\n\nEnable agent health metrics collection\n--------------------------------------\n\nTo enable Google Cloud's Agent for SAP to collect the health metrics for its daemon\nprocess on your host, follow these steps:\n\n1. Establish an SSH connection with your host Compute Engine instance\n or Bare Metal Solution server.\n\n2. Enable the collection of the agent health metrics:\n\n ### Run command\n\n 1. To enable the collection of the agent health metrics, run the following\n command:\n\n\n ```bash\n sudo /usr/bin/google_cloud_sap_agent configure -feature=agent_metrics -enable\n ```\n\n \u003cbr /\u003e\n\n 2. Optionally, you can modify the frequency at which the agent collects\n the CPU and memory usage of its daemon process and sends them to\n Cloud Monitoring. The default frequency is 60 seconds.\n\n To modify this frequency, run the following command:\n\n\n ```bash\n sudo /usr/bin/google_cloud_sap_agent configure -feature=agent_metrics -agent_metrics_frequency=FREQUENCY\n ```\n\n Replace \u003cvar translate=\"no\"\u003eFREQUENCY\u003c/var\u003e with the required value, in\n seconds. The frequency must not be less than 5 seconds.\n\n \u003cbr /\u003e\n\n 3. Optionally, you can modify the frequency at which the agent checks its\n operational health and sends that information to Cloud Monitoring.\n The default frequency is 60 seconds.\n\n To modify this frequency, run the following command. The frequency must\n not be less than 5 seconds.\n\n\n ```bash\n sudo /usr/bin/google_cloud_sap_agent configure -feature=agent_metrics -agent_health_frequency=FREQUENCY\n ```\n\n \u003cbr /\u003e\n\n ### Edit configuration file\n\n As an alternative to running the agent's command, you can manually modify\n the agent's configuration as follows:\n 1. Open the Backint configuration file:\n\n ```\n /etc/google-cloud-sap-agent/configuration.json\n ```\n 2. In the `collection_configuration` section, include the following:\n\n ```\n \"collect_agent_metrics\": true\n ```\n 3. Optionally, you can modify the frequency at which the agent collects\n the CPU and memory usage of its daemon process and sends them to\n Cloud Monitoring. The default frequency is 60 seconds.\n\n To modify this frequency, include the following in the\n `collection_configuration` section. \n\n ```\n \"agent_metrics_frequency\": FREQUENCY\n ```\n\n Replace \u003cvar translate=\"no\"\u003eFREQUENCY\u003c/var\u003e with the required value, in\n seconds. The frequency must not be less than 5 seconds.\n 4. Optionally, you can modify the frequency at which the agent checks its\n operational health and sends that information to Cloud Monitoring.\n The default frequency is 60 seconds.\n\n To modify this frequency, include the following in the\n `collection_configuration` section. The frequency must not be less than\n 5 seconds. \n\n ```\n \"agent_health_frequency\": FREQUENCY\n ```\n 5. Save the configuration file.\n\n 6. Restart the agent for the new settings to take effect:\n\n **Note:** From version 3.7, you need not restart the agent because any changes to the agent's configuration are automatically applied within the next 30 seconds. \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 the agent health metrics is enabled:\n\n\u003cbr /\u003e\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\": false,\n \"collect_agent_metrics\": true,\n \"agent_metrics_frequency\": 60,\n \"agent_health_frequency\": 60\n },\n \"discovery_configuration\": {\n \"enable_discovery\": true,\n \"enable_workload_discovery\": true\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 the agent health metrics is enabled:\n\n\u003cbr /\u003e\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 \"collect_workload_validation_metrics\": true,\n \"collect_process_metrics\": false,\n \"collect_agent_metrics\": true,\n\"agent_metrics_frequency\": 60,\n\"agent_health_frequency\": 60\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 \"discovery_configuration\": {\n \"enable_discovery\": true,\n \"enable_workload_discovery\": true\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 agent health\nmetrics:"]]