Version 1: Google Cloud's Agent for SAP operations guide

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 the saposcol 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

  1. Establish an SSH connection with your Bare Metal Solution server or VM instance.

  2. 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

  1. Use RDP to connect to the VM instance.

  2. 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 shows Running.

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:

  1. In your SAP system, enter transaction ST06.
  2. 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

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

  1. Establish an SSH connection with your host VM instance of Bare Metal Solution server.

  2. 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

  1. Use RDP to connect to the VM instance.

  2. 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:

  1. In the Google Cloud console, go to the Monitoring Metrics explorer page.

    Go to Metrics explorer

  2. Select the Configuration tab.

  3. Expand the Select a metric menu.

  4. In the Resources menu, select VM instance.

  5. In the Metric category menu, select sap.

  6. In the Metric menu, select metric: workload.googleapis.com/sap/service/active or any of the new metrics to chart.

  7. 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

  1. Establish an SSH connection with your host compute instance.

  2. Run the following command:

    sudo systemctl restart google-cloud-sap-agent
    

Windows

  1. Establish an RDP connection with your host compute instance.

  2. 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

  1. Establish an SSH connection with your host compute instance.

  2. Run the following command:

    sudo yum check-update google-cloud-sap-agent

SLES

  1. Establish an SSH connection with your host compute instance.

  2. Run the following command:

    sudo zypper list-updates -r google-cloud-sap-agent

Windows

  1. Establish an RDP connection with your host compute instance.

  2. 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

  1. Establish an SSH connection with your host compute instance.

  2. Run the following command:

    sudo yum --nogpgcheck update google-cloud-sap-agent

SLES

  1. Establish an SSH connection with your host compute instance.

  2. Run the following command:

    sudo zypper --no-gpg-checks update google-cloud-sap-agent

Windows

  1. Establish an RDP connection with your host compute instance.

  2. 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

  1. Establish an SSH connection with your host compute instance.

  2. Run the following command:

    sudo yum remove google-cloud-sap-agent

  3. 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

  1. Establish an SSH connection with your host compute instance.

  2. Run the following command:

    sudo zypper remove google-cloud-sap-agent

  3. 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

  1. Establish an RDP connection with your host compute instance.

  2. As an administrator, run the following command from PowerShell:

    googet remove google-cloud-sap-agent

  3. 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:

  1. In the Google Cloud console, go to the Logs Explorer page.

    Go to Logs explorer

  2. Go the Query pane.

  3. From the Resources drop-down menu, select Global, and then click Apply.

  4. In the query editor, enter google-cloud-sap-agent.

  5. 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:

  1. Establish an SSH connection with your host Compute Engine instance of Bare Metal Solution server.

  2. Open the following configuration file:

    /etc/google-cloud-sap-agent/configuration.json
  3. For the parameter log_to_cloud, update the value to false.

  4. Save the configuration file.

  5. Restart the agent for this change to take effect.