This chapter describes the options for monitoring ADF applications and the procedure for deploying and configuring the ADF Monitoring Service.
Various data collection options are available for ADF monitoring. See Section 1.1.1, "Data Collection" for an introduction to the RUEI data collection. ADF can be monitored using one of the following methods:
Table 4-1 ADF Monitoring Options
Mode | Metrics Collected | Description |
---|---|---|
Network data collector only |
Default ADF metrics as described in the Oracle ADF Support appendix of the RUEI User's Guide. |
This option is described in Section 1.1.1, "Data Collection"and does not require any specific configuration on the ADF servers. |
ADF Monitoring Service only |
Pages, UserID, ADF based dimensions, client-side page load time |
To use this option, you must deploy the ADF Monitoring Service as described in Section 4.2, "Deploying the ADF Monitoring Service" and enable the Monitoring Service in an ADF application. |
Hybrid - Network data collector |
Default ADF metrics as described in the Oracle ADF Support appendix of the RUEI User's Guide and UserID, ADF based dimensions, client-side page load time from ADF Monitoring Service |
The network data collector is the primary source of data and the ADF Monitoring service provides enhanced reporting. RUEI 12.1.0.6 only supported this mode of operation. The network data collector is primarily used to monitor the ADF Application and the ADF Monitoring Service provides additional information (for example, UserID) that is correlated with the network traffic using the ECID cache. To use this option, you must deploy the ADF Monitoring Service as described in Section 4.2, "Deploying the ADF Monitoring Service" and enable the Monitoring Service in an ADF application. |
True-Hybrid |
Default ADF metrics as described in the Oracle ADF Support appendix of the RUEI User's Guide and UserID, ADF based dimensions, client-side page load time from ADF Monitoring Service |
This option provides the most flexible collection of data, allowing you to collect some data from the network data collector and some data from the ADF monitoring service. This is particularly useful if your application consists of some components that are not ADF based. To use this option, you must deploy the ADF Monitoring Service as described in Section 4.2, "Deploying the ADF Monitoring Service", enable the Monitoring Service in an ADF application and use framework exceptions to determine which parts of an application are monitored by the network data collector and which are monitored by the ADF monitoring service. The Working With Suites and Web Services chapter of the RUEI User's Guide describes how to create framework exceptions. |
This section describes the procedure for deploying and configuring the ADF Monitoring Service.
Using the ADF Monitoring Service is optional. The ADF Monitoring Service allows diagnostics information to be collected from tiers not reachable with Network Protocol Analysis (NPA). This information can be consolidated with other ADF information and used to identify causes of End User Experience problems. The resulting information is available in RUEI Reporting, Data Browser and Session Diagnostics.
To communicate with RUEI, the ADF Monitoring Service requires a RUEI user with the ADF Monitoring Service permissions. This permission is only available to a RUEI system account. See the Managing Users and Permissions chapter of the User's Guide for information on creating this account and setting the permission.
To deploy the ADF Monitoring Service into the WebLogic Server environment:
Copy the RueiEUMService.war
file from the /root/RUEI/131/extra
directory of the RUEI distribution zip file to a location accessible to the WebLogic server.
Log into the WebLogic Server Administration Console and navigate to the Deployments screen, then click Install to deploy the war file. Install as a library and not as an application.
An alternative to step 2 above is to deploy using the command line:
Set the environment variables:
setenv BEA_HOME Weblogic_home_dir setenv PATH JDK_dir/bin:$PATH setenv DOMAIN_HOME ${BEA_HOME}/user_projects/domains/domain_name setenv WARFILE $DOMAIN_HOME/servers/AdminServer/upload/RueiEUMService.war
where
Weblogic_home_dir is the location where WebLogic was installed
JDK_dir is the location where JDK is installed
domain_name is the name of the WebLogic domain
Change directory to the location you used in step one and enter the following commands (enter password when prompted):
. $BEA_HOME/wlserver_10.3/server/bin/setWLSEnv.sh cp RueiEUMService.war $DOMAIN_HOME/servers/AdminServer/upload/ java weblogic.Deployer -adminurl adminurl -username username -deploy -source $WARFILE -targets wlservername -stage -library
where:
adminurl is the URL for the WebLogic Administration console
username is the admin username
wlservername is the name of the WebLogic Server
To configure the ADF application for use with the ADF Monitoring Service you must redeploy it with a custom deployment plan.
To generate a standard deployment descriptor of an ADF application's EAR, you can use either the web console or the commands below:
Set the environment variables:
setenv BEA_HOME Weblogic_home_dir setenv PATH JDK_dir/bin:$PATH
where
Weblogic_home_dir is the location where WebLogic was installed
JDK_dir is the location where JDK is installed
Enter the following commands:
. $BEA_HOME/wlserver_10.3/server/bin/setWLSEnv.sh setenv PLANFILE path_of_app/Appname/deploy/stdplan.xml setenv EARFILE path_of_app/Appname/deploy/application_file java weblogic.PlanGenerator -all -plan $PLANFILE $EARFILE
where:
path_of_app is the full directory location to the ADF application
Appname is the name of the ADF application
application_file is the name of either your application ear or war file
Modify the deployment descriptor files as follows:
Add the <variable-definition>
section to the stdplan.xml
file using the following:
<!-- variables for RUEI eum --> <variable> <name>oracle.adf.view.faces.context.ENABLE_ADF_EXECUTION_CONTEXT_ PROVIDER</name> <value>true</value> </variable> <variable> <name>oracle.sysman.apm.ruei.monitoring.RueiEndUserMonitoringService.rueiUrl</name> <value>http(s)://app_host:port/ruei/receive.php</value> </variable> <variable> <name>LibraryRef_RueiEUMLibrary</name> <value>RueiEUMLibrary</value> </variable> <variable> <name>oracle.sysman.apm.ruei.monitoring.RueiEndUserMonitoringService.bufferSize </name> <value>Buffer_size</value> </variable> <variable> <name>oracle.sysman.apm.ruei.monitoring.RueiEndUserMonitoringService.flushTime</name> <value>Buffer_fushtime</value> </variable> <!-- variables for RUEI eum -->
where:
app_host is the hostname for the ADF application
port is the port for the ADF application
Buffer_size: is the integer value for buffering data sent to RUEI.
Buffer_flushtime: is the time (in millisecond) before flushing buffered data to RUEI.
Add the <module-override>
section to the WebLogic.xml
file using the following:
<!-- RUEI library --> <variable-assignment> <name>LibraryRef_RueiEUMLibrary</name> <xpath>/weblogic-web-app/library-ref/[context-root="null",library-name="RueiEndUserMonitoringService"]/library-name</xpath> </variable-assignment> <!-- RUEI library -->
Add the <module-override>
section to the web.xml
file using the following:
<!-- set RUEI eum variables --> <variable-assignment> <name>oracle.adf.view.faces.context.ENABLE_ADF_EXECUTION_CONTEXT_PROVIDER</name> <xpath>/web-app/context-param/[param-name="oracle.adf.view.faces.context.ENABLE_ADF_EXECUTION_CONTEXT_PROVIDER"]/param-value</xpath> </variable-assignment> <variable-assignment> <name>oracle.sysman.apm.ruei.monitoring.RueiEndUserMonitoringService.bufferSize</name> <xpath>/web-app/context-param/[param-name="oracle.sysman.apm.ruei.monitoring.RueiEndUserMonitoringService.bufferSize"]/param-value</xpath> </variable-assignment> <variable-assignment> <name>oracle.sysman.apm.ruei.monitoring.RueiEndUserMonitoringService.flushTime</name> <xpath>/web-app/context-param/[param-name="oracle.sysman.apm.ruei.monitoring.RueiEndUserMonitoringService.flushTime"]/param-value</xpath> </variable-assignment> <variable-assignment> <name>oracle.sysman.apm.ruei.monitoring.RueiEndUserMonitoringService.rueiUrl</name> <xpath>/web-app/context-param/[param-name="oracle.sysman.apm.ruei.monitoring.RueiEndUserMonitoringService.rueiUrl"]/param-value</xpath> </variable-assignment> <!-- set RUEI eum variables -->
Note:
If any of the variables above already exist in the ADF application you can use<operation>replace</operation>
to replace those variables with new values.In Section 4.2.1, "Create a RUEI System User", you created the user credentials for the ADF Monitoring Service. To create a wallet to store these credentials:
Set the environment variables:
setenv BEA_HOME Weblogic_home_dir setenv PATH JDK_dir/bin:$PATH
where
Weblogic_home_dir is the location where WebLogic was installed
JDK_dir is the location where JDK is installed
Start the WebLogic Server console:
. $BEA_HOME/wlserver_10.3/server/bin/setWLSEnv.sh $BEA_HOME/oracle_common/common/bin/wlst.sh
Enter the following WebLogic Server console command:
connect()
When prompted, enter the WebLogic administrator username and password. When prompted for the URL, enter t3://admin_host:admin_port where
admin_host is the WebLogic hostname
admin_password is the WebLogic port
Enter the following WebLogic Server console commands ( enter password when prompted):
map = "ruei_adf_monitoring_agent" key = "receiver" desc = "RUEI Receiver" createCred(map=map, key=key, user="user", password="password", desc=desc)
where:
user is the username you created in Section 4.2.1, "Create a RUEI System User"
password is the password of the RUEI system user
To ensure the user was created, enter the following WebLogic Server console:
listCred(map=map, key=key)
If the user is listed, enter the following WebLogic Server console to disconnect:
disconnect()
Exit the WebLogic Console using Ctrl-D.
Edit the user_projects/domains/
domain_name
/config/fmwconfig/system-jazn-data.xml
file so that it includes:
<grant> <grantee> <codesource> <url>file:${domain.home}/servers/${weblogic.Name}/tmp/_WL_user/RueiEndUserMonitoringService/-</url> </codesource> </grantee> <permissions> <permission> <class>oracle.security.jps.service.credstore.CredentialAccessPermission</class> <name>context=SYSTEM,mapName=ruei_adf_monitoring_agent,keyName=receiver</name> <actions>read</actions> </permission> </permissions> </grant>
where
domain_name is the name of the WebLogic domain
To redeploy the ADF application, either use the WebLogic Server administration console (Deployments > Update) or use the procedure below.
Set the environment variables:
setenv BEA_HOME Weblogic_home_dir setenv PATH JDK_dir/bin:$PATH . $BEA_HOME/wlserver_10.3/server/bin/setWLSEnv.sh setenv PLANFILE deployment_path/stdplan.xml setenv EARFILE path_to_YourApplicationFile
where:
Weblogic_home_dir is the location where WebLogic was installed
JDK_dir is the location where JDK is installed
deployment_path is the location of the ADF deployment
path_to_YourApplicationFile is the location of the ADF ear or war file
Enter the following commands (enter password when prompted):
java weblogic.Deployer -adminurl adminurl -username username -deploy -name app_name -source $EARFILE -targets target_server -stage -plan $PLANFILE
where:
adminurl is the URL for the WebLogic Administration console
username is the admin username
app_name is the application deployment name
target_server is the name of the target WebLogic Server
If you want to monitor an ADF application and the weblogic domain/port differs from the end user application domain/port (for example, if you use a load balancer, or depending of the location of the RUEI installation in the network), you must enter both application domain/port details when defining the suite in RUEI.
Add the second application domain/port details after creating the suite as follows:
Select Applications, then select Suites.
Select the ADF Suite that you want to modify.
Select Add new filter in the Identification tab. Enter the details of the second domain/port.
Use the following procedure to troubleshoot the ADF Monitoring Service:
Log into your ADF application and interact with it to provoke an HTTP request (The ADF Monitoring Service is only initialized after the first HTTP request).
Use a HTTP tool, such as the HTTPHeaders Firefox extension, to make sure that the POST headers include the string oracle.adf.view.rich.monitoring.UserActivityInfo
. For example:
...&org.apache.myfaces.trinidad.faces.FORM=f1...&oracle.adf.view.rich.monitoring.UserActivityInfo=%3Cm+xmlns%3D%22http%3A%2F%2Foracle.com...
If the header does not include the text, check the web.xml
file and the ADF version used.
Check the server logs for library registration log. For example, search the Oracle_Home
/Middleware_11.1.2.3.0/user_projects/domains/
domain_name
/servers/AdminServer/logs/AdminServer.log
file for an entry similar to the following:
Registered library Extension-Name: RueiEndUserMonitoringService
If the log files do not contain an entry similar to the above, make sure the library (RueiEUMService.war
) is deployed correctly as described in Section 4.2.2, "Deploy the ADF Monitoring Service Software".
Check the server
-diagnostics.log
file for oracle.sysman.apm.ruei
entries. For example, the following log entries in AdminServer-diagnostics.log
indicate normal operation:
.[NOTIFICATION] ... Starting RUEI End User Monitoring Service ...[NOTIFICATION] ... Succesfully retrieved information for user eud from the wallet ...[NOTIFICATION] ... Using Basic Authentication ...[NOTIFICATION] ... Set RUEI receiver URL to http://<your ruei host:port>/ruei/receive.php ...[NOTIFICATION] ... RUEI End User Monitoring Service running ...[TRACE]...[SRC_METHOD: logUserActivity] Received useractivity to ruei ecid= 649d46b0ef2a475a:d6e5334:14077999955:-8000-0000000000000259:_adfStreaming ...[TRACE]...[SRC_METHOD: logUserActivity] Received useractivity with requestobject to ruei ecid=weblogic.servlet.internal.RequestEventsFilter$EventsRequestWrapper ...[TRACE]...[SRC_METHOD: process] 9 items for http://<your ruei host:port>/ruei/receive.php ......
If you do not find appropriate log entries, repeat the procedures described in this chapter.