Monitoring SAP with the Java NetWeaver sensor
You can monitor Java applications that are running on SAP Java NetWeaver by using the Instana Java NetWeaver sensor to identify bottlenecks and optimize their performance. After you install the Instana host agent, the Java NetWeaver sensor is automatically installed. You can view metrics that are related to it in the Instana UI after you configure the Java NetWeaver sensor.
Supported information
To ensure that the SAP Java NetWeaver sensor is compatible with your current setup, check the following sections:
Supported OS
Instana supports the following operating systems for local and remote monitoring of SAP Java NetWeaver sensor:
-
Local monitoring: The Instana agent is installed on the same host as the SAP Java NetWeaver system:
- AIX
- Linux (x86 and IBM PowerPC 64-bit LE)
- Windows
-
Remote monitoring: The Instana agent is installed on a different host and connects remotely to the SAP Java NetWeaver server:
- AIX
- Linux (x86 and IBM PowerPC 64-bit LE)
- Windows
- IBM i (OS/400 PASE)
- Apple macOS (64 bit - Intel and Apple silicon)
Supported versions
The SAP Java Netweaver sensor supports SAP Java Netweaver 7.5.
Configuring the SAP Java NetWeaver sensor
Instana supports both local and remote monitoring for the SAP Java NetWeaver sensor.
local tag.To connect the sensor to SAP Java NetWeaver instances directly, add the local or remote configurations as shown in the following examples. Replace the sample values with those specific to your environment. The default polling interval for metric is set to 60 seconds.
Make sure that the space formatting before each line is preserved as shown in the following examples because it follows the YAML formatting syntax.
Local configuration
The configuration parameters for local monitoring are shown in the following example:
# SAP Java Netweaver
com.instana.plugin.sap.java.netweaver:
enabled: true
local: # local monitoring configuration
- jmxport: '12345'
user: 'User1'
password: 'password'
sysnr: '01'
poll_rate: 60 # seconds
In the configuration.yaml file, enter the appropriate values for the jmxport , user , password , and sysnr (instance ID). The default polling interval for metric is set to 60 seconds.
The host parameter is optional for local monitoring. By default, the system uses localhost or the loopback IP address. If you want SAP Java NetWeaver to use a specific hostname or IP address, you can include the host parameter in the configuration.
host parameter is added to the configuration:
# SAP Java Netweaver
com.instana.plugin.sap.java.netweaver:
enabled: true
local: # local monitoring configuration
- host: 'host-1.com' # Optional, only required if you want to use a specific host name or IP address
jmxport: '12345'
user: 'User1'
password: 'password'
sysnr: '01'
poll_rate: 60 # seconds
Remote configuration
The configuration parameters for remote monitoring are shown in the following example:
# SAP Java Netweaver
com.instana.plugin.sap.java.netweaver # remote monitoring configuration
enabled: true
remote : #multiple configurations supported
- host: 'remote.host-1.com'
jmxport: '23456'
user: 'User1'
password: 'password'
sysnr: '72'
poll_rate: 60 # seconds
- host: 'remote.host-2.com'
jmxport: '23456'
user: 'User1'
password: 'password'
sysnr: '72'
poll_rate: 60 # seconds
In the configuration.yaml file, enter the appropriate values for the host , jmxport , user , password , and sysnr (instance ID). The default polling interval for metric is set to 60 seconds.
Configuration parameters
The following table lists the configuration parameters for SAP Java Netweaver sensor:
| Parameters | Description |
|---|---|
host |
The IP address or qualified hostname of the SAP Java NetWeaver instance from which the sensor fetches the metrics. |
jmxport |
The port that is used for remote communication with a JMX agent. |
sysnr |
The instance ID of the SAP Java NetWeaver instance, for example, 01. |
user |
The username configured in the SAP Java instance. The SAP user must have the authorization to obtain metrics. For more information, seeVerifying user authorization to pull metrics. |
password |
The password that is required to log in to the SAP Java NetWeaver system for the user. |
Verifying user authorization to pull metrics
To enable remote monitoring of an SAP NetWeaver system, configure the SAP NetWeaver system's Java Management Extensions (JMX) by completing the following steps:
- Log in to the SAP NetWeaver system through a browser as an administrator.
- Go to SAP NetWeaver Administrator > Configuration > Infrastructure > Java System Properties > System VM Parameters.
- Add the following parameters:
com.sun.management.jmxremote.port = 23456 com.sun.management.jmxremote.rmi.port = 23456 com.sun.management.jmxremote.ssl = false com.sun.management.jmxremote.authenticate = false
-
If authentication is enforced, ensure that the following parameter is set to
true:com.sun.management.jmxremote.authenticate = true
configuration.yaml for this Java NetWeaver sensor.To access the JMX MBeans, the user must have appropriate permissions. The user can be assigned any of the default roles available in SAP Java NetWeaver (such as Everyone, Guest, or NWA_READONLY) or a custom role that has been created. Ensure that the JmxManageAll action is assigned to the role being used, as all the necessary metrics are captured though JMX.
The following steps use the Guest role for illustration, but the steps are similar for any of the other assigned roles:
-
Go to SAP NetWeaver Administrator > Configuration > Security > Identity Management.
-
Search by the criteria Role, and select the role Guest.
-
On the Assigned Actions tab, add jmx.
Alternatively, assign the necessary JMX permissions to the intended user instead of modifying the Guest role.
Viewing metrics
After you install the host agent and configure the Java Netweaver sensor, you can view SAP metrics and alerts in the Instana UI.
Infrastructure view
To view the metrics in the infrastructure view, complete the following steps:
- In the sidebar of the Instana UI, select Infrastructure.
- On the Map tab, click a tower specific to SAP Java NetWeaver.
- Click Open Dashboard.
You can see the SAP Java NetWeaver dashboard with all the collected metrics.
Platform view
To view the metrics in the platform view, complete the following steps:
- From the navigation menu in the Instana UI, select Platform > SAP. You can view the SAP systems, instances, and databases on separate tabs.
- To view the SAP instance that is connected to the Java NetWeaver sensor, click the Instances tab. The sensor name is typically listed as
JavaNetWeaverInstance@HostName_SID_InstanceID. - Click the SAP Java NetWeaver instance to view the SAP Java NetWeaver dashboard with all the collected metrics.
Metrics collected
The following table outlines the metrics that are collected by the Java NetWeaver and the frequency of their collection:
| Metric collected | Collection frequency |
|---|---|
| Application Tasks | 60 seconds |
| Application Threads | 60 seconds |
| Application Thread Pool | 60 seconds |
| Cache Hit Rate | 60 seconds |
| Cache Usage | 60 seconds |
| Class Loading | 60 seconds |
| Compilation Time | 60 seconds |
| CPU | 60 seconds |
| Disk Usage | 120 seconds |
| GC Collection | 60 seconds |
| GC Errors | 60 seconds |
| GC Problems | 60 seconds |
| GC Reports | 60 seconds |
| Heap and Non Heap Memory | 60 seconds |
| HTTP Requests | 60 seconds |
| HTTP Responses | 60 seconds |
| JDBC connection pool | 60 seconds |
| JDBC timed out requests | 60 seconds |
| JVM Threads | 60 seconds |
| JVM CPU Load | 60 seconds |
| JVM System Load Average | 60 seconds |
| License Validity | 60 seconds |
| Log Messages | 60 seconds |
| Logged In Users | 60 seconds |
| Memory | 60 seconds |
| Process CPU Usage | 60 seconds |
| RFC | 60 seconds |
| Sessions | 60 seconds |
| Swap Space | 60 seconds |
| System Load Average | 60 seconds |
| System Problems | 60 seconds |
| Table Buffer | 60 seconds |
| Thread Count | 60 seconds |
| Thread Pool Usage | 60 seconds |
| Thread Time | 60 seconds |
| Transactions | 60 seconds |
| Waiting Task Usage | 60 seconds |
| Web Container Sessions | 60 seconds |
| Web Container Requests | 60 seconds |
| Web Container Throughput | 60 seconds |
| Web Sessions | 60 seconds |
| Webservice | 60 seconds |
| Uptime | 60 seconds |
The Java NetWeaver sensor generates built-in events for various scenarios. For more information, see Built-in Events Reference.
Configuring custom metrics collection
You can collect custom metrics that are specific to your environment beyond the standard metrics by configuring the Java NetWeaver sensor.
For example, you are remotely monitoring a SAP Java NetWeaver system. To collect metrics related to Java Message Service (JMS), specify the JMS related information under the custom section as shown in the following example:
com.instana.plugin.sap.java.netweaver:
enabled: true
remote:
- host: 'remote.host-1.com'
jmxport: '23456'
user: 'User1'
password: 'password'
sysnr: '72'
poll_rate: 60
custom:
jmxBeans:
- name: JMS_CONNECTION_COUNT
object: "com.sap.default:name=\"/Services/JMS/default/SessionContainer/Connections count\",j2eeType=SAP_MonitorPerNode,*"
attribute: "Value"
- name: JMS_CONSUMER_COUNT
object: "com.sap.default:name=\"/Services/JMS/default/SessionContainer/Consumers count\",j2eeType=SAP_MonitorPerNode,*"
attribute: "Value"
- name: JMS_PRODUCER_COUNT
object: "com.sap.default:name=\"/Services/JMS/default/SessionContainer/Producers count\",j2eeType=SAP_MonitorPerNode,*"
attribute: "Value"