SAP EP Monitoring

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 70

EP Monitoring Infrastructure

EP 6.0 Portal

Introduction to CCMS EP Monitoring Infrastructure Central Computer Monitoring System Integration of SAP Solution Manager

SAP AG 2004, TEP12, 1

Overview: Installing the Monitoring Infrastructure

EP 6.0 Portal

Installing the Monitoring Infrastructure


Install and configure the Prerequisites Log File Monitoring Availability Monitoring Parameter Reporting

SAP AG 2004, TEP12, 2

Software Requirements for CCMS/SolMan Monitoring

Enterprise Portal 6.0 SP1+ SAPJ2EE Engine 6.20 PL 16+ SAPCCMSR Patch Collection 8/2003+ SAPOSCOL Version 20.79 StandAlone Log Viewer 6.30 EP Monitoring Package 3 SAP Web AS with Basis Support Package 29, SAP Solution Manager 3.1

Regular Shipment of SAP EP 6.0 Regular Shipment of SAP EP 6.0 Included in SAP Enterprise Portal , EP Monitoring Package on SAP Service Marketplace/Patches

Included in SAP Web AS package on SAP Service Marketplace/Patches

SAP AG 2004, TEP12, 3

Required Support Infrastructure

SAP Support

via sapserv<n> WAN WAN

used connection types: - R/3 Support - Telnet - WTS - HTTP Connect

SAP Router

Windows-based remote access

SAP Solution Manager 3.1 incl. Windows Terminal Server


Enterprise Portal 6.0* PROD
Windows 2000 Advanced Server SAP Web AS 6.20

Enterprise Portal 6.0* DEV

Enterprise Portal 6.0* INT

*On each server : - SAPOSCOL - SAPCCMSR SAP AG 2004, TEP12, 4

Installation/Integration Steps
1. 2. 3. 4. 5. Install SAPOSCOL and SAPCCMSR Configure SAPCCMSR Configure SAPOSCOL Update jmon.dll and jmonapi.jar Configure J2EE Monitor Server 6. 7. 8. 9. Setup Log file Monitoring Setup StandAlone Log Viewer Enable GRMG Setup JARM Data

SAP Java Components (e.g. SAP Enterprise Portal)


3

Central Monitoring System


Log Viewer Client
1

SAPOSCOL

Log Viewer Server

SAP Web AS or SAP Solution Manager


8

Log files
MHS1 2

SAPCCMSR
Shared Memory 4 9

SAP J2EE

SAP AG 2004, TEP12, 5

Install and Configure the Infrastructure Prerequisites


Installing and configuring the Infrastructure Prerequisites comprises the following steps:
Unpack the EP_Monitoring package on each host of the EP environment Importing a transport request into the Central Monitoring System (CEN) Post processing in Client 000 in CEN Setting up SAPCCMSR Setting up SAPOSCOL Setting up JMon Checking the Shared Memory Segment

SAP AG 2004, TEP12, 6

Download EP_Monitoring Package from SMP


The EP_monitoring package can be downloaded from SMP.
Note: There are different packages for EP 5.0 and EP 6.0. Note: There is only one version for EP 6.0 this package will be constantly updated! [Dont forget to note down the date of last download since there is currently no package-info included!] Note: Upcoming changes for EP on SAPJ2EE 6.40 SP3 (NW 04)

SAP AG 2004, TEP12, 7

Create a moni_temp directory

SAP AG 2004, TEP12, 8

Unpack the supportability archive into moni_temp


Unpack the archive use the complementary sapcar version. Under UNIX: first set the execute flag for sapcar by typing chmod a+x sapcar Type in sapcar xvf <package>

SAP AG 2004, TEP12, 9

Content of EP_monitoring package


Preparation on training system us500x done!
LogViewer 6.30 ConfigFile for SAPOSCOL GRMG Configuration

j2eeadm profile Jmon Transport Packages for CEN including GRMG application including CATjobs for CEN system preparation

Agent SAPCCMSR

SAPOSCOL

SAP AG 2004, TEP12, 10

Install and Configure the Infrastructure Prerequisites


Installing and configuring the Infrastructure Prerequisites comprises the following steps:
Unpack the EP_Monitoring package on each host of the EP environment Importing a transport request into the Central Monitoring System (CEN) clarify with customer ! [ In Appendix: CEN ] Post processing in Client 000 in CEN Setting up SAPCCMSR Setting up SAPOSCOL Setting up Jmon API Checking the Shared Memory Segment clarify with customer

Note: Important for customer systems!


Check first if user CSMREG and/or role CSMREG are already installed the customer if you are not sure! Due to Basis Support Packages and administration already done by the customer, you may overwrite customer settings by applying these transports! test sapccmsr & RZ20 if you are not sure if the CEN & CSMREG (user / role) is already configured properly Appendix: All slides with Windows Only in Red are also in Appendix: Unix Commands
SAP AG 2004, TEP12, 11

ask

Windows only: execute install.cmd from moni_temp

SAP AG 2004, TEP12, 12

Establish an RFC Connection


SAPOSCOL is running now SAPCCMSR needs to be installed and configured
Defining parameters for the RFC connection Installing the SAPCCMSR Defining properties for the Shared Memory Segment and other parameters by editing the profile j2ee.pf Restarting SAPCCMSR

SAP AG 2004, TEP12, 13

Setup an RFC Connection

Central Monitoring System

SAP / Non-SAP Instance

SM59 connection Type T


RFC Connection

GW

Program ID <host>.sapccmsr.99

SAPCCMSR

SAP AG 2004, TEP12, 14

Definition of RFC Connection


To establish an RFC connection between the portal host and Central Monitoring System the file csmconf_sc needs to be edited. The following entries have to be made:
Central Monitoring System:
CEN_CONFIG
CEN_SYSID=$SID$ => TS3

Login information for admin user, only used during registration:


CEN_ADMIN_USER
CEN_ADMIN_CLIENT=$CLIENT$ => 600 CEN_ADMIN_USERID=$USER$ => TEP12-XX CEN_ADMIN_PASSWORD=$PASSWD$ => init CEN_ADMIN_ASHOST=$CEN_HOST$ => host CEN_ADMIN_SYSNR=$INSTANCE_NUMBER_OF_CEN$ => 14

Gateway information for RFC service "-DCCMS", used to build saprfc.ini


CEN_GATEWAY
CEN_GATEWAY_HOST=$CEN_HOST$ => host CEN_GATEWAY_SYSNR=$INSTANCE_NUMBER_OF_CEN$ => 14

login information for CSMREG user


CEN_CSMREG_USER
CEN_CSMREG_CLIENT=$CLIENT$ => 600 CEN_CSMREG_USERID=$USER_CSMREG$ => CSMREG CEN_CSMREG_PASSWORD=$PASSWD$ => init CEN_CSMREG_ASHOST=$CEN_HOST$ => host CEN_CSMREG_SYSNR=$INSTANCE_NUMBER_OF_CEN$ => 14
SAP AG 2004, TEP12, 15

Windows only: Registration of SAPCCMSR (file-based)


Start the SAPCCMSR agent RFC registration by the following command:
WINDOWS: sapccmsr R f <DRIVE>:\usr\sap\prfclog\csmconf_sc

SAP AG 2004, TEP12, 16

Windows only: Starting and Stopping SAPCCMSR


WINDOWS SAPCCMSR can be started and stopped with the same parameters as in UNIX. However, it is recommended to use the Windows service tool instead:

SAP AG 2004, TEP12, 17

Windows only: Configuration of SAPOSCOL and SAPCCMSR as Service Installing SAPOSCOL and SAPCCMSR as Windows service has the advantages:
- Re-starting the Windows server will restart these servives automatically - If services are installed properly, they start always with the correct permissions (security)

SAPOSCOL: ntscmgr install SAPOSCOL b <DRIVE>:\usr\sap\prfclog\saposcol.exe p service SAPCCMSR: ntscmgr install SAPCCMSR <DRIVE>:\usr\sap\prfclog\sapccmsr\sapccmsr.exe DCCMS pf=<DRIVE>:\usr\sap\prfclog\j2ee.pf

SAP AG 2004, TEP12, 18

Extending MONI_SEGM_SIZE
Extending the MONI_SEGM_SIZE to minimum of 64000000 is necessary due to amount of data reported by a standard EP portal installation

SAP AG 2004, TEP12, 19

Windows only: Configuration of SAPOSCOL: Editing dev_proc


Configuring SAPOSCOL by editing dev_proc is done to monitor dedicated processes on the portal host.

here you can see the output of a Windows based Portal

SAP AG 2004, TEP12, 20

Windows only: Configuration of SAPOSCOL: Assigning MTE classes and attribute-groups


Due to upcoming assignment of autoreaction methods and thresholds to this processes it is recommended to attach MTEclasses and attribute-groups onto the process names. Structure oscolfile.txt

SAP AG 2004, TEP12, 21

Windows only: Starting and Stopping SAPOSCOL


WINDOWS SAPOSCOL can be started and stopped with the same parameters as in UNIX. However, it is recommended to use the Windows service tool instead:

SAP AG 2004, TEP12, 22

Windows only: Update Directories which have jmonapi.jar


In the moni_temp directory there is a file called jmon.dll
The right version of jmon.dll can also be found on SAP SMP under http://service.sap.com/patches SAP Web AS SAP Web AS 6.20 Binary Patches SAP Kernel 6.20 32Bit [64-Bit] <PLATFORM> Database Independent JMON: API for CCMS-Monitoring (SAR Archive for installation)

Copy jmon.dll to <Windows home>\system32 Find the directories where jmonapi.jar resides with the Windows Explorer

SAP AG 2004, TEP12, 23

Overview: Installing the Monitoring Infrastructure

EP 6.0 Portal

Installing the Monitoring Infrastructure


Install and configure the Prerequisites Log File Monitoring Availability Monitoring Parameter Reporting

SAP AG 2004, TEP12, 24

Log File Monitoring


Setting up log file monitoring comprises the following steps:
Configuring the SAP J2EE Monitor Server Starting the SAP J2EE Engine and the J2EE Monitoring Server Generating the INI Files for Automatic Monitoring of SAP J2EE Engine Log Files Registering the INI Files in the SAPCCMSR Generating the INI Files for automatic monitoring of the log files of J2EE Applications Integrate the monitoring server into a cluster node for automated startup

SAP AG 2004, TEP12, 25

Configuration of SAPJ2EE Monitor Server


Check monitorServer.properties

java.naming.provider.url=your hostname:<p4 port> java.naming.security.principal=Administrator java.naming.security.credentials=<blank>

Add host name & instance no. to the root node for the SAPJ2EE Engine to avoid clashes, when several SAPJ2EE instances will report data into the same CCMS sytsem.

SAP AG 2004, TEP12, 26

Test SAPJ2EE Engine Monitor Server


Start SAP J2EE Engine and the monitor server as user j2eeadm with /usr/sap/<portal>/j2ee/j2ee_00/tools/monitor

SAP AG 2004, TEP12, 27

Connecting to the SAP Visual Administrator

Check the monitor service node in the Visual Administrator

SAP AG 2004, TEP12, 28

Windows only: Generating INI Files for Automatic Monitoring of SAP J2EE Engine Log Files
The SAPJ2EE monitoring server generates control files that are required to monitor the J2EE Engine logs. After starting the monitoring server, create the log file templates by making the following entry in the monitor server console: generateLT <J2EE home dir> <DRIVE>:\usr\sap\prfclog\logmon

SAP AG 2004, TEP12, 29

Windows only: Registering the INI Files at SAPCCMSR


In every generated sub directory of <DRIVE>:\usr\sap\prfclog\logmon a file log_templates.summary is stored. The content of the summary files should now be copied and inserted into the <DRIVE>:\usr\sap\prfclog\sapccmsr\sapccmsr.ini file. For Windows the registration can automated by the following command:
c:\usr\sap\prfclog\logmon\ALERT\log_template.summary >> c:\usr\sap\prfclog\sapccmsr\sapccmsr.ini

SAP AG 2004, TEP12, 30

Generating the INI files for automatic monitoring of J2EE Application and Portal Logs
2 Save the Changes and restart the service!

Change Entry

3 Restart SAPCCMSR afterwards!

SAP AG 2004, TEP12, 31

Integrate the monitoring server into a cluster node for automated startup
Do the following steps... Add the following lines into <J2EE home dir> /cluster/server/services/shell/work/autorun.scr
add monitor startmonitorserver

For a single node installation (i.e. one server process and one dispatcher process) these entries can be added to the autorun.scr of the dispatcher as an alternative Restart the SAPJ2EE Engine

SAP AG 2004, TEP12, 32

Overview: Installing the Monitoring Infrastructure

EP 6.0 Portal

Installing the Monitoring Infrastructure


Install and configure the Prerequisites Log File Monitoring Availability Monitoring Parameter Reporting

SAP AG 2004, TEP12, 33

Availability Monitoring
Availability Monitoring comprises two major steps:
Enabling availability monitoring for the SAP J2EE Engine
Is already done by configuration of the monitor server

Enabling the GRMG check for the portal: For the availability check using GRMG, the central monitoring system periodically calls a portal URL. The underlying GRMG application checks the portal and reports check results to the central monitoring system. This availability check is activated in the following steps:
Adjusting the GRMG customizing files Uploading the GRMG customizing file to the central monitoring system Activate the GRMG check in the central monitoring system Checking the mechanism in the delivered CCMS monitor

SAP AG 2004, TEP12, 34

Availability Monitoring Using GRMG: Overview

Central Monitoring System

EP-GRMG Application

SAP J2EE Engine

Solution Manager

CCMS HTTPRequest HTTPResponse

GRMG Infrastructure

GRMG Application

Other Components

SAP System GRMG Application SAP Web AS


SAP AG 2004, TEP12, 35

Local CCMS

Typical Web Server Situation

Servlet Engine GRMG application

5 9

3
Web Server

SAP System (R/3)

10

SAP System (R/3) J2EE Server EJB CCMS Monitoring GRMG Framework

7 8

Servlet TX rz20 TX grmg

11

SAP AG 2004, TEP12, 36

GRMG Configfile
In the Portal:
Create a user called heartbeat with password grmg01. Assign the user to the super_admin_role and eu_role.

Download the file grmgRequesthttp_template.xml from the moni_temp directory and edit it.
For entry <scenname> specify a unique name, e.g. EP6_TPxx For entry <scenstarturl>http://. insert the following values:
<host> = Name of Portal host <http-port> = Type in the HTTP-port, by default this is 50000 <user> = heartbeat <password> = grmg01 (Note: The password cannot have more then 6 characters due to restrictions of CCMS GRMG application.)

For entry <scendesc>GRMG_HTTP_EP6_TPxx There are three scenarios by default included:


Test of the cluster Test of a SAP System from the portal Test of a Website

SAP AG 2004, TEP12, 37

Importing the GRMG config file into CEN


Open transaction GRMG with /ngrmg Upload the file grmgRequesthttp_template.xml

SAP AG 2004, TEP12, 38

Check the results


In transaction GRMG you can see the results of your upload.

START

Select the uploaded scenario and start it! In transaction RZ20 you can see the results after a few minutes.

SAP AG 2004, TEP12, 39

Results of GRMG Availability Check


Check in Transaction RZ20:

Cluster communication is ok!

No real test scenario configured! Testing a webcomponent is ok!

SAP AG 2004, TEP12, 40

Overview: Installing the Monitoring Infrastructure

EP 6.0 Portal

Installing the Monitoring Infrastructure


Install and configure the Prerequisites Log File Monitoring Availability Monitoring Parameter Reporting

SAP AG 2004, TEP12, 41

Parameter Reporting
Parameter Reporting comprises
EP Monitors for PRT, PCD, UME KM Monitors for TRex and CM SAPJ2EE Monitors

Proceed the following steps:


Check portal monitoring configuration Set up parameter reporting for SAPJ2EE Manual adding of new monitor sets to CCMS

SAP AG 2004, TEP12, 42

Check Monitoring Configuration in EP 6.0 SP2

SAP AG 2004, TEP12, 43

Parameter Reporting for SAP J2EE Engine 6.20

SAP AG 2004, TEP12, 44

Parameter Reporting
Reports configuration parameters into the monitoring segment of SAPCCMSR J2EE J2EE

CEN

Monitoring Service Monitoring Service

Jmon-API Jmon-API
SAP component for SAP component for central monitoring central monitoring SAPCCMSR
Monitoring segment

Parameters can be displayed centrally!


SAP AG 2004, TEP12, 45

CCMS: Parameter Reporting PRT, PCD, UME, KM


In CCMS the following monitors can be customized:
PRT
Configuration State Version

PCD
Configuration State Version

UME
Configuration State Version

KM
Configuration State Version
SAP AG 2004, TEP12, 46

CCMS: Parameter Reporting PRT, PCD, UME, KM


Example: Checking the state of UME components and services

SAP AG 2004, TEP12, 47

Displaying JARM data


For EP 6.0 SP2 Patch 1 JARM data from the portal is not displayed in the target CCMS system. Proceed as described in OSS Note 516920 & 689872
Update reference.txt in <J2EE_directory>/cluster/server/managers. Update jarm.properties and default.properties in directory profiles.

Update cmdline.properties

Restart the J2EE Engine


SAP AG 2004, TEP12, 48

JARM Data in RZ20

SAP AG 2004, TEP12, 49

Overview: Unit Summary

You are now able to: Install and Configure the Monitoring Infrastructure Prerequisites Set up Log File Monitoring Infrastructure Set up GRMG Availability Monitoring Set up Parameter Reporting

SAP AG 2004, TEP12, 50

Appendix: Setup for CEN

Importing a Transport Request into CEN


Import procedure:
Copy the K*-files to directory /usr/sap/trans/cofiles Copy the R*-files to directory /usr/sap/trans/data Enter CEN system. Start transaction STMS. This is SAP main tool to import change requests. Click on Import overview. Double click CEN system ID. You see the queue of change requests ready for import into CEN system. Now , you have to insert the three change requests of the JSTF package into the CEN queue. Select Extras >> Other requests >> Add. Enter NBSK900051. Click ok. The change request appears in the queue. Do the same for change request NBSK900071 and BCEK079283.

SAP AG 2004, TEP12, 52

Importing a Change Request into CEN


Import procedure:
To import request NBSK900051, position on NBSK900051 and click Import request (NOT: Import All requests!). Enter 000 for Target client and press ENTER. The change request is now imported into CEN system. Run the same procedure for the other two change requests.

SAP AG 2004, TEP12, 53

Post processing in Client 000: Activate CSMREG user Role


Activating procedure:
Enter client 000 in CEN system. Start transaction PFCG. Enter role name CSMREG and click Change Role. Select the tab Authorizations. Click Change authorization data. Click Generate and acknowledge the profile name. The profile of the role CSMREG is now generated and ready for use.

SAP AG 2004, TEP12, 54

Post processing in Client 000: Creating User CSMREG


Post processing procedure:
Enter client 000 in CEN system. Start transaction SCAT. This is a tool to run computer aided tests. In our case, it helps to run through difficult transactions in an automated way. Enter ZCSMREG_USER_ANLEGEN for the test case and press F8. Click once more F8 to start. CSMREG user is created automatically.

SAP AG 2004, TEP12, 55

Post processing in Client 000: Creating Batch Jobs


Post processing procedure:
Enter client 000 in CEN system. Start transaction SCAT. This is a tool to run computer aided tests. In our case, it helps to run through difficult transactions in an automated way. Enter ZCCMSJOBS for the test case and press F8. Click once more F8 to start. All necessary batch jobs are created automatically.

SAP AG 2004, TEP12, 56

Post processing in Client 000: Creating Monitor Set

Post processing procedure:


Start transaction RZ20. This is the CCMS alert monitor to monitor your EP system landscape centrally. Choose Extras Activate maintenance function. Place the cursor on EP JSTF Collection, and choose Copy. Name your monitor set (<my monitor set>) and choose ENTER.

SAP AG 2004, TEP12, 57

Appendix: UNIX Commands

UNIX only: execute install_root.sh from moni_temp

SAP AG 2004, TEP12, 59

UNIX only: execute install_user.sh from moni_temp

SAP AG 2004, TEP12, 60

UNIX only: Registration of SAPCCMSR (file-based)


Start the SAPCCMSR agent RFC registration by the following command:
UNIX: sapccmsr R f /usr/sap/tmp/sapccmsr/csmconf_sc

SAP AG 2004, TEP12, 61

UNIX only: Starting and Stopping SAPCCMSR


UNIX - SAPCCMSR should be started by the following command sapccmsr
DCCMS pf=/usr/sap/tmp/sapccmsr/j2ee.pf

- SAPCCMSR should be stopped by the following command sapccmsr


stop pf=/usr/sap/tmp/sapccmsr/j2ee.pf

SAP AG 2004, TEP12, 62

UNIX only: Starting and Stopping SAPOSCOL


UNIX Starting SAPOSCOL needs to be done by a user with root permission with
/usr/sap/ccms/bin/saposcol l

Stopping SAPOSCOL needs to be done by a user with root permission with


/usr/sap/ccms/bin/saposcol k

SAP AG 2004, TEP12, 63

UNIX only: Troubleshooting Shared Memory Segment properties

Type ipcs ma (UNIX only!) to view Shared Memory Segment Properties:


Key must be 04x4dc4 Hostname need to be 13 characters (current limitation of CCMS) Segsize should be 64 MB --rw-rw---- is required as write permission to the group sapsys

Adapting j2ee.pf for SAPCCMSR


Stop SAPJ2EE to disconnect JMON from Shared Memory Segment Stop SAPCCMSR agent with /usr/sap/ccms/bin/sapccmsr -stop Delete the shared memory segment with /usr/sap/ccms/sapccmsr -initshm Check entry NATTCH by command ipcs ma > Entry must be 0 Go to /usr/sap/tmp/sapccmsr Open j2ee.pf by vi to add the following lines
SAPLOCALHOST=<short hostname> alert/MONI_SEGM_SIZE=64000000 ipc/shm_permission_1008=760

SAP AG 2004, TEP12, 64

Create the new segment with necessary parameters by starting sapccmsr with sapccmsr DCCMS pf=/usr/sap/tmp/sapccmsr/j2ee.pf

UNIX only: Identifier for java processes for SAPOSCOL


To ease identifying different java processes of SAPJ2EE DISPATCHER & SERVER the following parameters should be added:
The parameter D:DSP for the dispatcher is added to \<host>\usr\sap\>portl>\j2ee \j2ee_00\cluster\dispatcher The parameter D:SVR1 is added to /usr/sap/<portal>/j2ee/j2ee_ 01/cluster/server/ cmdline.properties

[Configuration of cmdline.properties]
SAP AG 2004, TEP12, 65

UNIX only: Configuration of SAPOSCOL: Editing dev_proc


Configuring SAPOSCOL by editing dev_proc is done to monitor dedicated processes on the portal host.

here you can see the output of a UNIX based Portal

SAP AG 2004, TEP12, 66

UNIX only: Configuration of SAPOSCOL: Assigning MTE classes and attribute-groups


Due to upcoming assignment of autoreaction methods and thresholds to this processes it is recommended to attach MTEclasses and attribute-groups onto the process names. Structure oscolfile.txt

SAP AG 2004, TEP12, 67

UNIX only: Update All Directories which have jmonapi.jar


In the moni_temp directory there is a file called libjmon.so
The right version of libjmon.so can also be found on SAP SMP under http://service.sap.com/patches
SAP Web AS SAP Web AS 6.20 Binary Patches SAP Kernel 6.20 32-Bit [64-Bit] <PLATFORM> Database Independent JMON: API for CCMSMonitoring (SAR Archive for installation)

Copy libmon.so to all directories where jmonapi.jar is installed Find the directories on UNIX by typing
find /usr/sap name jmonapi.jar

SAP AG 2004, TEP12, 68

UNIX only: Generating INI Files for Automatic Monitoring of SAPJ2EE Engine Log Files
The SAPJ2EE monitoring server generates control files that are required to monitor the J2EE Engine logs. After starting the monitoring server, create the log file templates by making the following entry in the monitor server console:
generateLT <J2EE_directory>/usr/sap/tmp/logmon

SAP AG 2004, TEP12, 69

UNIX only: Registering the INI files at SAPCCMSR agent


In every generated sub directory of /usr/sap/tmp/logmon a file log_templates.summary is stored. The content of the summary files should now be copied and inserted into the /usr/sap/tmp/sapccmsr/sapccmsr.ini file. For UNIX the registration can automated by the following command:
ex.: grep Log File /usr/sap/tmp/logmon/ALERT/log_template.summary >> /usr/sap/tmp/sapccmsr/sapccmsr.ini

SAP AG 2004, TEP12, 70

You might also like