Configure Agent Client Collector Apache Tomcat monitoring
To configure the Agent Client Collector to perform Apache Tomcat monitoring, set the following configurations in the Apache Tomcat application.
Before you begin
Role required: agent_client_collector_admin
Procedure
Open a management JMX port when starting the server:
In a Linux environment:
- In
bindirectory in the Tomcat home directory, create asetenv.shfile. Ensure that the file contains the following:
export CATALINA_OPTS=$CATALINA_OPTS" -Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.port={PORT NUMBER} -Dcom.sun.management.jmxremote.rmi.port={PORT NUMBER} -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Djava.rmi.server.hostname=127.0.0.1"Run
chmod 755 setenv.shto give thesetenv.shfile executable permissions.- In a Windows environment:
In
bindirectory in the Tomcat home directory, create asetenv.batfile.Ensure that the file contains the following:
@echo=off if defined CATALINA_OPTS ( set CATALINA_OPTS=%CATALINA_OPTS% - Dcom.sun.management.jmxremote=true ) else ( set CATALINA_OPTS=- Dcom.sun.management.jmxremote=true ) set CATALINA_OPTS=%CATALINA_OPTS% - Dcom.sun.management.jmxremote.port={PORT NUMBER} set CATALINA_OPTS=%CATALINA_OPTS% - Dcom.sun.management.jmxremote.rmi.port={PORT NUMBER} set CATALINA_OPTS=%CATALINA_OPTS% - Dcom.sun.management.jmxremote.authenticate=false set CATALINA_OPTS=%CATALINA_OPTS% - Dcom.sun.management.jmxremote.ssl=false set CATALINA_OPTS=%CATALINA_OPTS% - Djava.rmi.server.hostname=127.0.0.1{PORT NUMBER} represents the number of the port you open for JMX RMI monitoring. The default value created by the check definition is 9000.
- In
Restart Tomcat.
In a Linux environment: Run the
shutdown.shscript, followed by thestartup.shscript.In a Windows environment: Run the
shutdown.batscript, followed by thestartup.batscript.