Install the monitoring agent for SAP NetWeaver on a Compute Engine VM

Google Cloud's monitoring agent for SAP NetWeaver is required for SAP support of SAP systems running on Google Cloud, including SAP NetWeaver, SAP HANA, SAP ASE, SAP MaxDB, and others.

When you install the agent on a Compute Engine VM instance, the monitoring agent for SAP NetWeaver combines monitoring data from Monitoring and the Compute Engine APIs and provides that data to the SAP Host Agent.

To install the monitoring agent for SAP NetWeaver on a Bare Metal Solution server, see Install the monitoring agent for SAP NetWeaver on a Bare Metal Solution server.

Installation overview

In Linux, you install the monitoring agent for SAP NetWeaver by using standard operating system package management commands, yum or zypper. The package management command completes the following tasks:

  • Downloads the latest version of the monitoring agent for SAP NetWeaver.
  • Creates the agent as a Linux systemd service, named google-sapnetweavermonitoring-agent.

In Windows, when you issue the install command, the provided installation script completes the following tasks:

  • Downloads the latest version of the monitoring agent for SAP NetWeaver.
  • Creates a Windows service named google-sapnetweavermonitoring-agent and a scheduled task that runs every minute to check if the service is still running and, if necessary, restart it.

Prerequisites for the monitoring agent for SAP NetWeaver

Before you install the monitoring agent for SAP NetWeaver, you need to ensure access to the Google Cloud APIs and ensure that the proper JRE is available.

Access to Google Cloud APIs

When the monitoring agent for SAP NetWeaver is running on a Compute Engine VM, it reads data from Monitoring.

The access to the Monitoring APIs can be controlled by IAM permissions granted to the host VM service account, by Google Cloud API access scopes granted to the VM, or both.

Compute Engine recommends using only the IAM permissions of the VM service account to control access to Google Cloud resources and setting the VM access scopes to allow full access to all Cloud APIs. For more information, see Best practices.

The monitoring agent for SAP NetWeaver uses the service account of its host VM to retrieve Cloud Monitoring metrics. Consequently, the monitoring agent requires that the host VM have a service account and that the service account includes the monitoring.timeSeries.list permission, which is contained in the predefined Monitoring Viewer role.

If you do limit access to the Cloud APIs, then the monitoring agent for SAP NetWeaver requires the following minimum Cloud API access scopes on the host VM instance:

  • Compute Engine: Read Only
  • Stackdriver Monitoring API: Read Only

If you are running SAP NetWeaver on a VM that does not have an external IP address, then you need to enable access the Google Cloud APIs and services for the monitoring agent for SAP NetWeaver.

To enable Private Google Access from a Compute Engine VM on a subnet, see Configuring Private Google Access.

Java Runtime Environment

The monitoring agent for SAP NetWeaver version 2 requires a specific version of the Java Runtime Environment (JRE).

If the server that you are installing the agent on has access to the internet, then the agent downloads the files automatically during installation.

If the server does not have internet access, then you can upload the files to the server yourself.

Linux

If you need to upload them yourself, then before you install the agent, upload the following file into the /tmp/gcpsapdeps/ directory:

https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.1/sapmachine-jre-17.0.1_linux-x64_bin.tar.gz

Windows

If you need to upload them yourself, then before you install the agent, upload the following file into the C:\gcpsapdeps directory:

https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.1/sapmachine-jre-17.0.1_windows-x64_bin.zip

Install the monitoring agent for SAP NetWeaver

To install the monitoring agent for SAP NetWeaver, select your operating system, and follow the steps:

Linux

Add the Google Cloud RPM repository to the OS repository list

You need to add the URL for the Google Cloud RPM repository for the monitoring agent for SAP NetWeaver to the list of package repositories for the operating system. How you add a repository is different depending on whether you are using a Red Hat or a SLES operating system.

RHEL

To add the Google Cloud RPM repository to RHEL, follow these steps:

  1. Establish an SSH connection with your host VM.

  2. Run the following command after replacing RHEL_VERSION with your operating system version number. For example, replace RHEL_VERSION with 7 for RHEL 7 or 8 for RHEL 8. You might need to scroll to see RHEL_VERSION.

    sudo tee /etc/yum.repos.d/google-sapnetweavermonitoring-agent.repo << EOM
    [google-sapnetweavermonitoring-agent]
    name=Google Cloud monitoring agent for SAP NetWeaver
    baseurl=https://packages.cloud.google.com/yum/repos/google-sapnetweavermonitoring-agent-elRHEL_VERSION-\$basearch
    enabled=1
    gpgcheck=0
    repo_gpgcheck=0
    gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
    EOM

SLES

To add the Google Cloud RPM repository to SLES, follow these steps:

  1. Establish an SSH connection with your host VM.

  2. Run the following command after replacing SLES_VERSION with your operating system version number. For example, replace SLES_VERSION with 12 for SLES 12 or 15 for SLES 15. You might need to scroll to see SLES_VERSION.

    zypper addrepo --gpgcheck-allow-unsigned-package --refresh \
    https://packages.cloud.google.com/yum/repos/google-sapnetweavermonitoring-agent-slesSLES_VERSION-\$basearch google-sapnetweavermonitoring-agent

Install the agent

You install the monitoring agent for SAP NetWeaver by using the OS package manager.

To install the agent, select your operating system, and follow these steps:

RHEL

  1. Establish an SSH connection with your host VM.

  2. Run the following command:

    sudo yum install google-sapnetweavermonitoring-agent

SLES

  1. Establish an SSH connection with your host VM.

  2. Run the following command:

    sudo zypper --no-gpg-checks install google-sapnetweavermonitoring-agent

Windows

To install the monitoring agent for SAP NetWeaver, as an administrator on the host VM, run the following command:

. { Invoke-WebRequest -useb https://storage.googleapis.com/cloudsapdeploy/netweaver-agent-windows/install.ps1 } | iex

After you install the monitoring agent for SAP NetWeaver and the SAP Host Agent, validate the installation of the monitoring agent for SAP NetWeaver, as described in Validate your installation of the agent.

Validate your installation of the monitoring agent for SAP NetWeaver

To verify that the monitoring agent for SAP NetWeaver is running, select your operating system, and follow the steps:

Linux

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

  2. Run the following command:

    sudo systemctl status google-sapnetweavermonitoring-agent

    If the monitoring agent for SAP NetWeaver is functioning properly, then the output contains active (running). For example:

    google-sapnetweavermonitoring-agent.service - Google Cloud monitoring agent for SAP NetWeaver
    Loaded: loaded (/usr/lib/systemd/system/google-sapnetweavermonitoring-agent.service; enabled; vendor preset: disabled)
    Active:  active (running)  since Thu 2021-09-02 07:21:42 UTC; 742ms ago
    Main PID: 10723 (java)
    Tasks: 26 (limit: 512)
    CGroup: /system.slice/google-sapnetweavermonitoring-agent.service
           └─10723 /usr/sap/google-sapnetweavermonitoring-agent/jre/bin/java -Xms32m -Xmx64m -cp /usr/sap/google-sapnetweavermonitoring-age...
    

Windows

  1. Use RDP to connect to the VM instance that you want to monitor.

  2. Run the following command:

    Get-Service -Name google-sapnetweavermonitoring-agent

    If the monitoring agent for SAP NetWeaver is functioning properly, then the Status column shows Running. For example:

        Status   Name               DisplayName
        ------   ----               -----------
        Running  google-sapnetwe... Google Cloud monitoring agent for S...
    

If the monitoring agent isn't running, then see the Operations Guide section about restarting 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