Using OpenTelemetry to monitor SAP Netweaver Java systems with SAP Focused Run System Monitoring
Share

Instrumenting SAP NetWeaver Java AS with OpenTelemetry for SAP Focused Run

Introduction

System Monitoring capabilities in SAP Focused Run have reached a new milestone with support for the OpenTelemetry metrics format. This blog explores how to instrument your SAP NetWeaver Java AS with OpenTelemetry and seamlessly integrate it with SAP Focused Run’s System Monitoring.

This represents the second installment of our “Instrumenting SAP NetWeaver Java AS with OpenTelemetry” series. If you haven’t already, we recommend reviewing the first part to understand the foundational concepts.

Note: This guide assumes you have prior experience with SAP Focused Run applications, including System Monitoring and Agent Administration.

Prerequisites

Before diving into configuration, ensure you have the following in place:

  1. OpenTelemetry Java Agent

  2. Simple Diagnostics Agent (SDA)

    • Minimum version: 1.68
    • Must be deployed on all managed system hosts
  3. Credentials

    • Valid sapadm user credentials
  4. Access & Privileges

    • Administrator privileges for NetWeaver Administrator (NWA)
    • Experience with SAP Focused Run System Monitoring

Configuration Steps in NetWeaver Administrator (NWA)

Step 1: Access NetWeaver Administrator

Open your web browser and navigate to:

http://<hostname>:<port>/nwa

You’ll need administrator privileges to proceed.

Step 2: Navigate to Java System Properties

From the main menu:

  • Go to Configuration  Infrastructure  Java System Properties

Step 3: Select Your Java Server Node

  • Expand the template name
  • Choose the ID of the Java Server Node you wish to instrument

Step 4: Add the OpenTelemetry Java Agent

Under Additional VM Parameters, add the following line:

-javaagent:/<path_to_file>/opentelemetry-javaagent.jar

Replace <path_to_file> with your actual installation path.

Step 5: Configure System VM Parameters

Switch to the System VM Parameters tab and add the following parameters:

Parameter Name Parameter Value

otel.exporter.otlp.metrics.endpoint http://<SDA host>:<SDA port>/lmsl/sda/default/v1/metrics
otel.exporter.otlp.protocol http/protobuf
otel.exporter.metrics.exporter otlp
otel.exporter.otlp.headers "Authorization=Basic c2FwYWRtOlBhc3N3b3Jk"
otel.service.name <instance name> (e.g., J00)

Important: The authorization header contains a base64-encoded credentials string in the format:

sapadm:<password>

Ensure you encode your actual sapadm password in base64 format.

Step 6: Repeat for All Java Application Instances

For each Java Application instance in your landscape, repeat Steps 3-5.

Configuration Steps on the SAP NetWeaver J2EE Host

Step 1: Install SDA

Deploy the minimum required SDA version (1.68) on your SAP NetWeaver J2EE host.

Step 2: Enable OpenTelemetry on SDA

Edit the SDA configuration file:

File Path: /usr/sap/hostctrl/SMDAgent/default/configuration/com.sap.solman.agent.mai.otel.v2/custom.properties

Add the following parameter:

otel.enabled=true

Note: In the initial version, the OTel data collector is switched off by default. This will be changed in the future SDA releases.

Step 3: Restart the J2EE System

Restart your J2EE system to activate OpenTelemetry data collection. The SDA will now begin receiving metrics from your system.


Configuration Steps in SAP Focused Run

Step 1: Access Template Maintenance or Metric Management

Create a custom metric in SAP Focused Run at the instance level using either:

  • Template Maintenance UI (System Monitoring), or
  • Metric Management (Custom Metric Management)

Step 2: Create a Metric Group

Begin by establishing a new metric group for your OpenTelemetry metrics.

Step 3: Select the OpenTelemetry Data Collector

In your metric group configuration:

  • Select the Data Provider (DP) named “OpenTelemetry Data Collector”
  • Ensure it’s of type “Diagnostics Agent (push)”

Troubleshooting: If you can’t locate the data collector, import the latest monitoring content version via Rapid Content Delivery.

Step 4: Configure Metric Names

For testing purposes, use .* as filter for the metric name parameter to display all collected metrics. Later, you can filter for specific metrics such as:

  • jvm.memory.used
  • Other JVM or application-specific metrics

Step 5: Assign Metrics to Alerts

Link your newly created metrics to alerts by either:

  • Assigning to existing alerts, or
  • Creating custom alerts as needed

Step 6: Distribute the Template

Save your changes and execute the “Apply & Activate” step to distribute the template across your monitored systems.

Step 7: Verify the results

The newly configured metrics can be found in the System Monitoring UI.

alexander_poplawski_0-1782991079919.png

 

 

 

 

What’s Next?

By following the guide, you’re now prepared to consume the metrics in System Monitoring in OpenTelemetry format. As a next step we are going to release our SAP Focused Run/Cloud ALM-own OpenTelemetry extension in the near future. This extension will provide more relevant metrics, which can be used for monitoring and alerting. Once released, this blog page will be updated accordingly.

Have questions or run into issues? Share your experiences in the comments below and stay tuned for updates on OpenTelemetry integration in future SAP Focused Run releases.

 

 Instrumenting SAP NetWeaver Java AS with OpenTelemetry for SAP Focused RunIntroductionSystem Monitoring capabilities in SAP Focused Run have reached a new milestone with support for the OpenTelemetry metrics format. This blog explores how to instrument your SAP NetWeaver Java AS with OpenTelemetry and seamlessly integrate it with SAP Focused Run’s System Monitoring.This represents the second installment of our “Instrumenting SAP NetWeaver Java AS with OpenTelemetry” series. If you haven’t already, we recommend reviewing the first part to understand the foundational concepts.Note: This guide assumes you have prior experience with SAP Focused Run applications, including System Monitoring and Agent Administration.PrerequisitesBefore diving into configuration, ensure you have the following in place:OpenTelemetry Java AgentDownload from https://opentelemetry.io/docs/zero-code/java/agent/getting-started/Copy the agent file to your preferred directoryExample path: /usr/sap/<SID>/<InstNr>/otel/Simple Diagnostics Agent (SDA)Minimum version: 1.68Must be deployed on all managed system hostsCredentialsValid sapadm user credentialsAccess & PrivilegesAdministrator privileges for NetWeaver Administrator (NWA)Experience with SAP Focused Run System MonitoringConfiguration Steps in NetWeaver Administrator (NWA)Step 1: Access NetWeaver AdministratorOpen your web browser and navigate to:http://<hostname>:<port>/nwaYou’ll need administrator privileges to proceed.Step 2: Navigate to Java System PropertiesFrom the main menu:Go to Configuration → Infrastructure → Java System PropertiesStep 3: Select Your Java Server NodeExpand the template nameChoose the ID of the Java Server Node you wish to instrumentStep 4: Add the OpenTelemetry Java AgentUnder Additional VM Parameters, add the following line:-javaagent:/<path_to_file>/opentelemetry-javaagent.jarReplace <path_to_file> with your actual installation path.Step 5: Configure System VM ParametersSwitch to the System VM Parameters tab and add the following parameters:Parameter Name Parameter Valueotel.exporter.otlp.metrics.endpointhttp://<SDA host>:<SDA port>/lmsl/sda/default/v1/metricsotel.exporter.otlp.protocolhttp/protobufotel.exporter.metrics.exporterotlpotel.exporter.otlp.headers”Authorization=Basic c2FwYWRtOlBhc3N3b3Jk”otel.service.name<instance name> (e.g., J00)Important: The authorization header contains a base64-encoded credentials string in the format:sapadm:<password>Ensure you encode your actual sapadm password in base64 format.Step 6: Repeat for All Java Application InstancesFor each Java Application instance in your landscape, repeat Steps 3-5.Configuration Steps on the SAP NetWeaver J2EE HostStep 1: Install SDADeploy the minimum required SDA version (1.68) on your SAP NetWeaver J2EE host.Step 2: Enable OpenTelemetry on SDAEdit the SDA configuration file:File Path: /usr/sap/hostctrl/SMDAgent/default/configuration/com.sap.solman.agent.mai.otel.v2/custom.propertiesAdd the following parameter:otel.enabled=trueNote: In the initial version, the OTel data collector is switched off by default. This will be changed in the future SDA releases.Step 3: Restart the J2EE SystemRestart your J2EE system to activate OpenTelemetry data collection. The SDA will now begin receiving metrics from your system.Configuration Steps in SAP Focused RunStep 1: Access Template Maintenance or Metric ManagementCreate a custom metric in SAP Focused Run at the instance level using either:Template Maintenance UI (System Monitoring), orMetric Management (Custom Metric Management)Step 2: Create a Metric GroupBegin by establishing a new metric group for your OpenTelemetry metrics.Step 3: Select the OpenTelemetry Data CollectorIn your metric group configuration:Select the Data Provider (DP) named “OpenTelemetry Data Collector”Ensure it’s of type “Diagnostics Agent (push)”Troubleshooting: If you can’t locate the data collector, import the latest monitoring content version via Rapid Content Delivery.Step 4: Configure Metric NamesFor testing purposes, use .* as filter for the metric name parameter to display all collected metrics. Later, you can filter for specific metrics such as:jvm.memory.usedOther JVM or application-specific metricsStep 5: Assign Metrics to AlertsLink your newly created metrics to alerts by either:Assigning to existing alerts, orCreating custom alerts as neededStep 6: Distribute the TemplateSave your changes and execute the “Apply & Activate” step to distribute the template across your monitored systems.Step 7: Verify the resultsThe newly configured metrics can be found in the System Monitoring UI.    What’s Next?By following the guide, you’re now prepared to consume the metrics in System Monitoring in OpenTelemetry format. As a next step we are going to release our SAP Focused Run/Cloud ALM-own OpenTelemetry extension in the near future. This extension will provide more relevant metrics, which can be used for monitoring and alerting. Once released, this blog page will be updated accordingly.Have questions or run into issues? Share your experiences in the comments below and stay tuned for updates on OpenTelemetry integration in future SAP Focused Run releases. Read More Technology Blog Posts by SAP articles 

#SAPCHANNEL

By ali

Leave a Reply