RUM data collector for Tomcat light weight data collector
After you configure the Tomcat data collector, you can enable RUM data collector (RUM DC) to collect data about how actual users interact with and experience web applications. RUM data collector supports the following platforms:
- Power Linux LE
- zLinux
- xLinux
Before you begin
- Ensure that the Kubernetes data collector is installed and enabled. Otherwise, the RUM data collector service cannot be found in Monitoring portal. For more information, see Kubernetes data collector.
- Ensure that the Tomcat data collector that you deploy is up-to-date. For more information, see Monitoring on-premises Tomcat applications
- OpenTracing monitoring must be enabled in Tomcat data collector monitoring.
Procedure
To enable RUM data collector after you configure the Tomcat light weight data collector, do the following steps:
- Open your application deployment yaml file and add the following environment variables.
- name: IBM_APM_RUM_ENABLED value: "true" - name: TOMCAT_SERVER_WEB_APPS_PATH value: "<TOMCAT_HOME>/webapps"
where TOMCAT_HOME is Tomcat server home directory.
Note: If you want to disable RUM data collector, do not set this variable..
- Apply the following changes to the docker file. It will append the loader properties for
catlina.properties
and addrtFilter
jar path so that RUM data collector gets initialized with tomcat server startup.WORKDIR <TOMCAT_HOME> RUN mkdir sublib ADD <TOMCAT_DATACOLLECTOR>/rumdcjar/RTFilter-1.0.jar <tomcat_home>/sublib RUN grep -F "common.loader" /<tomcat_home>/conf/catalina.properties | sed -i 's/$/&,"${catalina.home}\/sublib\/*.jar"/g' /<tomcat_home>/conf/catalina.properties
where:
- TOMCAT_HOME is the Tomcat server home directory.
- TOMCAT_DATACOLLECTOR is the path to the Tomcat Lightweight data collector home directory.
-
Apply your application deployment yaml file.
Note: RUM data collector and the Tomcat light weight data collector use the same yaml file. Changes in the sample setting apply to both RUM data collector and Tomcat data collector.
-
Optional environment variables are:
- LOGFILE_NUMBER - specifies the maximum number of log files for RUM data collector. Default number of log files are 5.
- LOGFILE_SIZE - size for each log file. The size of each file is 5 MB. The size of the file has to be specified in MB.
-
SKIPAPPSLIST - This variable can be set as a comma separated list of web applications that are to be skipped for RUM DC monitoring. For example: /JustHTML,/docs. If this variable is not set in the yaml file, RUM data collector will be enabled for all applications present in
/webapps
directory of tomcat server.Important:
ClassCastException
may be observed for applications using HTTP2 Servlet protocol. For example:/examples/servlets/serverpush/simpleimage
on CP4MCM UI. You will have to skip such applications for RUM data collector using environment variableSKIPAPPSLIST
. Also, see Tomcat RUM DC displays IllegalStateException on the web pages
What to do next
Launch a web request, and then do the following steps to verify whether RUM data collector is successfully enabled:
- Go to Monitor health > Infrastructure monitoring on the console.
- Find Kubernetes Service from the All resource types list.
- Browse the Resource list, click the appropriate 'service name' that you have enabled RUM data collector, and open the resource dashboard.
- Use one of the following methods to verify:
- Check whether Browser is displayed in the Service dependencies section.
- Check whether Browser is listed in the Related resources widget. Click Browser to get detailed browser data.