Google Cloud's monitoring agent for SAP NetWeaver operations guide

This guide covers operational considerations and procedures for running the monitoring agent for SAP NetWeaver on Compute Engine VMs and Bare Metal Solution servers.

Understanding the monitoring agent lifecycle

When managing monitoring operations, it's helpful to understand what the monitoring agent for SAP NetWeaver is doing. In general, here's how it works:

  • You must install the monitoring agent for SAP NetWeaver on each Compute Engine VM or Bare Metal Solution server that hosts SAP systems. The monitoring agent runs as a Windows service or a Linux service.
  • On Compute Engine VMs, Cloud Monitoring has a local agent that collects metrics, events, and metadata from Google Cloud. Compute Engine also provides APIs that provide monitoring functionality.
  • On Compute Engine VMs, the monitoring agent for SAP NetWeaver combines monitoring data from Monitoring and the Compute Engine APIs. On Bare Metal Solution servers, the agent does not access the Google Cloud APIs.
  • The SAP Host Agent polls the monitoring agent for SAP NetWeaver for its cached data, over HTTP. It aggregates the metrics, reports them, and stores them in the SAP NetWeaver database.
  • SAP's transaction ST06 or the saposcol command line interface displays the aggregated metrics.
  • You can view the data from the monitoring agent for SAP NetWeaver by running a command in a terminal window.

Cloud API access for the monitoring agent for SAP NetWeaver

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.

If you are running SAP NetWeaver on a server in a Bare Metal Solution regional extension, then the monitoring agent for SAP NetWeaver does not require access to the Google Cloud APIs.

Verify that the monitoring agent for SAP NetWeaver is running

The monitoring agent for SAP NetWeaver is a local HTTP server.

To check whether the monitoring agent is running, follow these 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...
    

To check the collected metrics, see View the monitored metrics.

If the monitoring agent for SAP NetWeaver isn't running, see Restart the monitoring agent for SAP NetWeaver.

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

You can view the monitored metrics by polling the server. Follow these steps:

Linux

  1. Use SSH to connect to the host machine that you need to monitor.
  2. At the command prompt, enter the following command:

    curl http://localhost:18181

Windows

  1. Use RDP to connect to the host machine that you need to monitor.
  2. In a web browser, visit the following URL:

    http://localhost:18181

The following example shows the first few lines of XML output from the monitoring agent for SAP NetWeaver.

Compute Engine VM

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<metrics>
<metric category="config" context="vm" type="string" unit="none"
  last-refresh="1614389614" refresh-interval="0"><name>Data
  Provider Version</name><value>1.1.1.0</value>
</metric>
<metric category="config" context="host" type="string" unit="none"
last-refresh="1614389614" refresh-interval="0">
  <name>Cloud Provider</name><value>Google Cloud
  Platform</value>
</metric>
<metric category="config" context="vm" type="string" unit="none"
last-refresh="1614389614" refresh-interval="0">
  <name>Instance Type</name><value>n2-standard-16</value>
</metric>
<metric category="config" context="host" type="string" unit="none"
last-refresh="1614389614" refresh-interval="0">
  <name>Virtualization Solution</name><value>KVM</value>
</metric>
...
</metrics>

Bare Metal Solution server

The monitoring agent for SAP NetWeaver is configured correctly for a Bare Metal Solution host machine if the Instance Type value shows bms-nn and the Hardware Model value is Google Cloud Bare Metal, as shown in the following example.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<metrics>
<metric category="config" context="vm" type="string" unit="none"
last-refresh="1614391024" refresh-interval="0"><name>Data
Provider Version</name><value>1.1.1.0</value>
</metric><metric category="config" context="host" type="string"
unit="none" last-refresh="1614391024" refresh-interval="0">
<name>Cloud Provider</name><value>Google Cloud
Platform</value></metric><metric category="config"
context="vm" type="string" unit="none" last-refresh="1614391024"
refresh-interval="0"><name>Instance Type</name>
<value>bms-16.0</value></metric><metric
category="config" context="host" type="string" unit="none"
last-refresh="1614391024" refresh-interval="0"><name>Virtualization
Solution</name><value>N/A</value></metric><metric
category="config" context="host" type="string" unit="none"
last-refresh="1614391024" refresh-interval="0"><name>Hardware Manufacturer</name><value>Google</value></metric>
<metric category="config" context="host" type="string" unit="none"
last-refresh="1614391024" refresh-interval="0"><name>Hardware
Model</name><value>Google Cloud Bare Metal</value>
</metric>
...
</metrics>

Restart the monitoring agent for SAP NetWeaver

If the monitoring agent for SAP NetWeaver stops working, restart the monitoring agent.

Select your operating system:

Linux

  1. Establish an SSH connection with your host VM.

  2. Issue the following command:

    systemctl restart google-sapnetweavermonitoring-agent
    

Windows

  1. Establish an RDP connection with your host VM.

  2. Issue the following command:

    Restart-Service -Force google-sapnetweavermonitoring-agent
    

Update the monitoring agent for SAP NetWeaver

To ensure that you have the latest version of the monitoring agent for SAP NetWeaver, check for updates periodically.

Check for updates

Select your operating system:

RHEL

To check for the monitoring agent updates using the package manager:

  1. Establish an SSH connection with your host VM.

  2. Issue the following command:

    sudo yum check-update google-sapnetweavermonitoring-agent

SLES

To check for the monitoring agent updates using the package manager:

  1. Establish an SSH connection with your host VM.

  2. Issue the following command:

    sudo zypper list-updates -r google-sapnetweavermonitoring-agent

Windows

To check for the monitoring agent updates:

  1. Establish an RDP connection with your host VM.

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

    C:\Program Files\Google\google-sapnetweavermonitoring-agent\bin\updatecheck.ps1

Install an update

Select your operating system:

RHEL

To install the monitoring agent using the package manager:

  1. Establish an SSH connection with your host VM.

  2. Issue the following command:

    sudo yum --nogpgcheck update google-sapnetweavermonitoring-agent

SLES

To install the monitoring agent using the package manager:

  1. Establish an SSH connection with your host VM.

  2. Issue the following command:

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

Windows

To install the monitoring agent:

  1. Establish an RDP connection with your host VM.

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

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