(DI-2205) General Information

Used technologies

JMX (Java Management Extensions) is a Java technology designed to monitor and manage (including remotely) various objects (resources)

MBeans (ManagedBeans) are managed resources. Each such object implements a specific interface, through which you can access the attribute values of this object. You can also call its methods and receive notifications (if the application registers the corresponding “listening” MBeans).

MBean Server is object registry (registering MBeans). Any registered object becomes available to applications (more precisely, its interface).

JMX connectors accesses resources and makes the MBean Server available to JMX clients. The JMX connector consists of a client and a server. The connector server connects to the MBean server and takes connection requests from clients. The connector client is usually located on another JVM (mostly the machine in relation to the connector server).

Remote Method Invocation (RMI) is standard connection protocol for JMX API. This protocol allows the JMX client to remotely access MBeans on the MBean server.

JMXServiceURL or JMX endpoint special address of the JMX API connector server. The format of this address is:

service:jmx:rmi://host:port1/jndi/rmi://host:port2/

where

  • service:jmx:” is a constant.
  • rmi:” is a protocol, used to connect to the connector server.
  • //host:port1” is the address at which the connector server can be found
  • /jndi/rmi://host:port2/” is url-path. It means literally the following - take the part of the URL that follows immediately behind /jndi/ and at this address execute the JNDI request in the RMI registry to get information about the RMI server. The registry in response will return the host and port of the RMI server.

NOTE: In the case of access host from a different domain, the full network address of the host has to be used e.g.host_name.domain_name.com

General introduction

SAP Business Object system can be monitored from the central instance via the JMX connector. The JMX (Java Management Extensions) technology defines a connector based on RMI. This connector allows you to connect to MBean via an MBean server from a remote location and view Business Objects servers and monitoring metrics. JMX connector is Java-based and it is implemented in the JCo service which runs on the SAP application server of CrystalBridge® Monitoring central instance. BO specific collectors are calling JCo service from SAP ABAP to access JMX.

To make SAP BO monitoring up and running, the following setup has to be done:

  1. Setup SAP BO system
  2. Setup BO add-on to run JCo service on SAP ABAP AS
  3. Setup system for monitoring in CrystalBridge® Monitoring cockpit

Architecture


Deployment process of the JCo service for the JMX connector consists of loading and installing the sources from the SAP Web Repository into configured installation path on the SAP application server. This is fully performed from the ABAP environment. where Java application 'DVDJMXtoSAP.jar' and all its relevant files (JCo library and starting script) are copied from the SAP Web Repository into the configured installation folder.

Process of deployment requires also storing vulnerable information in the customizing, like user names and passwords.

The user name used for the connection of the JCo client back to the SAP system (user-defined in (DI-2205) Install and start JMX connector on SAP system) is not encrypted. It is recommended that this user has assigned a predefined authorization role /DVD/JMX_JCO_RFC. Password for this user is encrypted by hard wired encryption (an enhanced form of encryption algorithm implemented in SAP standard class CL_HARD_WIRED_ENCRYPTOR). User name and the encrypted password for SAP system logon are stored in the database table /DVD/JMX_CONF. These stored credentials are then used when starting the JCo service at any time.

The user name used for JMX connection to the SAP BO system (user-defined in (DI-2205) Enable Monitoring on SAP Business Objects System) is also not encrypted. Password for this SAP BO user is also encrypted by the same hard-wired encryption algorithm. User name and encrypted password for SAP BO user are stored in the database table /DVD/JMX_CONN. These stored credentials are then used when establishing the connection to the SAP BO system. 

When relevant files are copied into the installation folder, the JCo service is started through a predefined external OS command for JMX connector execution. This external command is executed with specific additional parameters which need to be filled in to run this OS command as expected. These additional parameters are automatically filled based on configured JCO setup when (DI-2205) Install and start JMX connector on SAP system

There are two predefined external OS commands which allow executing the JCo service:

  • /DVD/JMX_DEP_CMD - external OS command to run JCo service on Unix   
    • Example with additional parameters: 
  • /DVD/JMX_WIN_CMD - external OS command to run JCo service on Windows
    • Example with additional parameters: 
Both commands check themself whether they are executed only with the specific additional parameters (valid script and Java application name). It is not possible to execute these OS commands without these additional parameters for security reasons. 

When the JCo service for the JMX connection is installed and started on your SAP system, the following files should exist in the configured installation folder. In this folder, you might also find the logfile 'startup.log' which contains logs from Java or other error messages that occurred during the execution of the external OS command. It is recommended to check these logs when the JCO service for the JMX connection is not started as expected.  

This is an example of the Unix installation. For the Windows installation, there is a different JCo library (sapjco3.dll) and starting script (mon_jmx_start.ps1) available. 

There is also one additional configuration file created in this directory (destination.conf), but this file is automatically deleted for security reasons when the JCo service started.