Show TOC

 Principle of Creating a GRMG ApplicationLocate this document in the navigation structure

Use

To instrument any application for monitoring with the GRMG, you must implement a corresponding GRMG application. The GRMG application receives the GRMG request with all transferred parameters from the GRMG infrastructure, performs the availability checks, and returns the result to the GRMG infrastructure as the GRMG response.

Prerequisites

This section is part of the process GRMG: Instrumenting a Component. It is therefore a prerequisite that you have already performed the part of the process that is to be performed before this section.

Activities

The following resources are available to you to support the processing of the parameters of a GRMG request and the creation of a GRMG response, depending on your development environment:

  • As of Java Basic Libraries 6.20 Support Package 03: a set of application-independent Java classes
  • As of SAP Web Application Server 6.20 Support Package 12: a corresponding service and handler class

Java

The GRMG infrastructure sends a GRMG request to an HTTP server. There, a servlet functions as a GRMG application that monitors an application on a J2EE server as an agent. The GRMG response is ultimately returned to the GRMG infrastructure by the GRMG application:

You can use the following predefined Java classes to simply implement your own GRMG application:

Name of the Class Description

GrmgRequest

Container for a GRMG request

GrmgResponse

Container for a GRMG response

GrmgScenario

Container for a GRMG scenario

GrmgComponent

Container for a GRMG component

GrmgProperty

Container for a GRMG parameter

GrmgMessage

Container for a GRMG message

See also Example Coding for a GRMG Application.

Note

If you want to use the above classes in the context of a J2EE application, you must specify a file application-j2ee-engine.xml in your EAR file in the META-INF directory. This file must contain the following:

<reference reference-type="weak">  <reference-target target-type="library" provider-name="sap.com">    com.sap.util.monitor.grmg  </reference-target></reference>

<reference reference-type="weak">  <reference-target target-type="library" provider-name="engine.sap.com">    sapxmltoolkit  </reference-target></reference>

ABAP

SAP Web Application Server contains, as of  SAP Web AS 6.20 (SP 12), a ready-to-run GRMG application, with which you can monitor all ABAP components that run on an SAP Web Application Server as of SAP Web AS 6.20 (SP 12). There are two possibilities for monitoring here:

  • You can use the scenario to allow the application to execute a function module that then performs all required availability checks. You can transfer parameters and parameter values when doing this.

    The function module can use an interface such as GRMG_ABAP_REFERENCE_TOOL (function group GRMG), which returns a message with optional associated parameters. The ABAP-GRMG application can, however, also call any function module and interpret the result of the call, which returns a return value other than zero if an error occurs.

  • You can send a GRMG request to the ABAP-GRMG application without specifying a function module. In this case, the GRMG application responds (or does not respond, as the case may be) to a ping to the application server that is processing the request.
    Note

    If the standard application does not meet your needs, you can also derive and customize the classes CL_CCMS_GRMG_APPLICATION and CX_CCMS_GRMG_APPLICATION_ERROR.

You also create a Customizing file when Customizing an ABAP scenario (see Creating the Template for the Customizing File). The only difference is in the following optional parameters, which you can only use in an ABAP scenario. These parameters (of ABAP data type String) are transferred within the properties tag:

Parameter Name Description

funcmod

Name of the function module that is to be executed by the GRMG application. If the module is active in the system in which the application is running, it is executed. If not, it is skipped, and a corresponding error message is returned in the GRMG response.

grmg_compliant

Indicator that specifies whether the above function module is GRMG-compatible that is, whether its interface corresponds to that of the module GRMG_ABAP_REFENRENCE_TOOL:

YES/yes: It corresponds to the interface

<any other value>: It does not correspond to the interface. In this case, the module does not import any parameters, and does not export any messages. The result of the call is therefore determined using only the return value: in the case of the return value 0, the GRMG application returns a message with the message text OKAY. Any other value generates a message with the text ERROR.

dest

RFC destination at which the function module is to be executed

parname<1-5>

Names of the parameters that are transferred when a GRMG-compatible function module is called

parvalue<1-5>

Values of the parameters parname<n>, which are transferred when a GRMG-compatible function module is called

To be able to use the service, start transaction SICF (Maintain Service). The service is available under the following path:

/default_host/sap/bc/ccms/monitoring/GRMG_APP.

  • To enter logon data, select the service by double-clicking it, and enter the data on the Service Data page. Use a user with restricted authorizations similar to the user CSMREG for this purpose.
    Note

    You can also leave these fields empty and instead transfer the user and password by defining an RFC destination of the type HTTP and entering the user data there.

  • To activate the service, select the service, and choose Service/Virt.Host → Activate.

 Monitoring with the Generic Request and Message Generator start page