This guide covers operational considerations and procedures for running version 1 of Google Cloud's Agent for SAP on Compute Engine VM instances, Compute Engine bare metal instances, and Bare Metal Solution servers.
Understand the agent lifecycle
When managing the operations of Google Cloud's Agent for SAP, it's helpful to understand what the agent does. In general, here's how it works:
- You must install Google Cloud's Agent for SAP on each Compute Engine instance or Bare Metal Solution server that hosts SAP systems. The agent runs as a Linux service or a Windows service.
- On Compute Engine instances, the agent combines monitoring data from Monitoring and the Compute Engine APIs.
- On Bare Metal Solution servers, for collection of only SAP Host Agent metrics, the agent does not access the Google Cloud APIs.
- The SAP Host Agent polls Google Cloud's Agent for SAP for its cached data, over HTTP. It aggregates the SAP Host Agent metrics, reports them, and stores them in the SAP NetWeaver database.
- SAP's transaction
ST06
or thesaposcol
command line interface displays the aggregated SAP Host Agent metrics. - You can view the SAP Host Agent metrics from Google Cloud's Agent for SAP by running a command in a terminal window.
Verify that the agent is running
After installing the agent or restarting the agent, you can verify that the agent is running as expected.
To check whether the agent is running, follow these steps:
Linux
Establish an SSH connection with your Bare Metal Solution server or Compute Engine instance.
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
Windows
Use RDP to connect to the Compute Engine instance.
As an administrator, run the following command from PowerShell:
$(Get-Service -Name 'google-cloud-sap-agent' -ErrorAction Ignore).Status
If the agent is running, then the status showsRunning
.
If Google Cloud's Agent for SAP 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:
View the monitored metrics
After installing or updating the configuration of Google Cloud's Agent for SAP, you can view the monitored SAP Host Agent metrics.
To view the monitored SAP Host Agent metrics, follow these steps:
Linux
Establish an SSH connection with your host Compute Engine instance or Bare Metal Solution server.
Run the following command:
curl http://localhost:18181
If the metrics are available, then you should receive an XML output containing information about your system. For example:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <metrics> <metric category="cpu" context="vm" type="double" unit="Percent" last-refresh="1670422670" refresh-interval="60"> <name>VM Processing Power Consumption</name> <value>0.0</value> </metric>
Windows
Use RDP to connect to the Compute Engine instance.
As an administrator, run the following command from PowerShell:
(Invoke-WebRequest -Uri 'http://localhost:18181').RawContent
If the metrics are available, you should see a XML output containing information about your system. For example:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <metrics> <metric category="cpu" context="vm" type="double" unit="Percent" last-refresh="1670422528" refresh-interval="60"> <name>VM Processing Power Consumption</name> <value>10.0</value> </metric>
Verify Process Monitoring metrics and Workload Manager evaluation metrics
After updating the configuration, you should verify that the Process Monitoring metrics and Workload Manager evaluation metrics are available. You can access the metrics and information collected by Google Cloud's Agent for SAP in Cloud Monitoring.
To verify the metrics in Monitoring, follow these steps:
In the Google Cloud console, go to the Monitoring Metrics explorer page.
Select the Configuration tab.
Expand the Select a metric menu.
In the Resources menu, select VM instance.
In the Metric category menu, select sap.
In the Metric menu, select
metric: workload.googleapis.com/sap/service/active
or any of the new metrics to chart.Click Apply.
You should see a chart with the time series metric values.
Restart the agent
If Google Cloud's Agent for SAP stops working or you update its configuration, then restart the agent.
Select your operating system, and then follow the steps:
Linux
Establish an SSH connection with your host compute instance.
Run the following command:
sudo systemctl restart google-cloud-sap-agent
Windows
Establish an RDP connection with your host compute instance.
As an administrator, run the following command from PowerShell:
Restart-Service -Name 'google-cloud-sap-agent' -Force
Upgrade to Google Cloud's Agent for SAP from the monitoring agent for SAP NetWeaver
Installing Google Cloud's Agent for SAP automatically detects older versions of the monitoring agent for SAP NetWeaver, disables the agent, and then removes the agent from your host server during installation.
If the monitoring agent for SAP NetWeaver is detected and an existing configuration file is found during the installation, then the installation process automatically migrates the existing configurations to Google Cloud's Agent for SAP.
For instructions on installing and configuring Google Cloud's Agent for SAP, see Choose your Google Cloud's Agent for SAP installation and configuration guide.
Update Google Cloud's Agent for SAP
This section provides steps to check if an updated version of Google Cloud's Agent for SAP is available, and how you can update to version 3.6 (latest) of Google Cloud's Agent for SAP.
If you need to update to a version of the agent that is not the latest one, then contact Cloud Customer Care.
Check for updates
Select your operating system, and then follow the steps:
RHEL
Establish an SSH connection with your host compute instance.
Run the following command:
sudo yum check-update google-cloud-sap-agent
SLES
Establish an SSH connection with your host compute instance.
Run the following command:
sudo zypper list-updates -r google-cloud-sap-agent
Windows
Establish an RDP connection with your host compute instance.
As an administrator, run the following command from PowerShell:
googet latest google-cloud-sap-agent
Install an update
To update your instance of Google Cloud's Agent for SAP to version 3.6 (latest), select your operating system, and then follow the steps.
If you need to install a version of the agent that is not the latest one, then contact Cloud Customer Care.
RHEL
Establish an SSH connection with your host compute instance.
Run the following command:
sudo yum --nogpgcheck update google-cloud-sap-agent
SLES
Establish an SSH connection with your host compute instance.
Run the following command:
sudo zypper --no-gpg-checks update google-cloud-sap-agent
Windows
Establish an RDP connection with your host compute instance.
As an administrator, run the following command from PowerShell:
googet install google-cloud-sap-agent
Roll back to a prior version
If required, you can roll back Google Cloud's Agent for SAP version 1 to the monitoring agent for SAP NetWeaver version 2.
Select your operating system, and then follow the steps:
RHEL
Establish an SSH connection with your host compute instance.
Run the following command:
sudo yum remove google-cloud-sap-agent
Install the monitoring agent for SAP NetWeaver version 2. For instructions about how to install the monitoring agent for SAP NetWeaver, see Choose your monitoring agent for SAP NetWeaver installation guide.
SLES
Establish an SSH connection with your host compute instance.
Run the following command:
sudo zypper remove google-cloud-sap-agent
Install the monitoring agent for SAP NetWeaver version 2. For instructions about how to install the monitoring agent for SAP NetWeaver, see the Choose your monitoring agent for SAP NetWeaver installation guide.
Windows
Establish an RDP connection with your host compute instance.
As an administrator, run the following command from PowerShell:
googet remove google-cloud-sap-agent
Install the monitoring agent for SAP NetWeaver version 2. For instructions about how to install the monitoring agent for SAP NetWeaver, see Choose your monitoring agent for SAP NetWeaver installation guide.
View the agent's logs in Cloud Logging
By default, the logs for Google Cloud's Agent for SAP are redirected from your Compute Engine instances and Bare Metal Solution servers to Cloud Logging.
To view the agent's logs in Logging, follow these steps:
In the Google Cloud console, go to the Logs Explorer page.
Go the Query pane.
From the Resources drop-down menu, select Global, and then click Apply.
In the query editor, enter
google-cloud-sap-agent
.Click Run query.
You see the logs generated by the agent instances running on all your Compute Engine instances or Bare Metal Solution servers. To filter the logs from a specific machine, use the filters available in the interface.
You can disable this default redirection of agent's logs. To do so, follow these steps:
Establish an SSH connection with your host Compute Engine instance of Bare Metal Solution server.
Open the following configuration file:
/etc/google-cloud-sap-agent/configuration.json
For the parameter
log_to_cloud
, update the value tofalse
.Save the configuration file.
Restart the agent for this change to take effect.