AppDiagnos monitors web applications that are deployed on Apache Tomcat. AppDiagnos Tomcat Monitor will provide performance counters of Tomcat such as hits count, active sessions, current threads busy etc. The monitor gathers performance information that is exposed by Tomcat to the outside world.
Apache Tomcat 6.0+
Java path setting: To set the java class path
- Open bash profile using vi ~/.bash_profile command.
- Set JAVA_HOME as follows
- export JAVA_HOME=. (E.x. If your path is set to /usr/java/jdk1.5.0_07/bin/java,Set it as follows: export JAVA_HOME=/usr/java/jdk1.5.0_07/bin/java)
- Set PATH as follows: export PATH=$PATH:/usr/java/jdk1.5.0_07/bin
- Replace /usr/java/jdk1.5.0_07 as per your location of java folder
- Save and close the file.
To monitor a tomcat application in Linux environment follow the steps shown below.
- Open AppDiagnos APM Portal URL in a browser.
- Login with valid credentials.
- Click on Ops View menu, Select Applications
- clickon “+” Icon to add New Application
- Select Application from the Create Application Monitor page
- Enter Valid Application Name,Description, Application Type as Tomcat and Tomcat Version as shown below and click Save
- On Successful saving of application, System will allow to download the tomcat monitor agent from below page
- Click on download Monitor Icon, to download the monitor agent.
- Download the agent under /mnt/AppDiagnos_tomcat_agent
- Go to the linux box. Untar the downloaded setup to allocation using the following command.tar -xzmvf AppDiagnos_tomcat_monitor_x.x.x.tar.gz
- Open the “Config.Properties” file and enter the Application Port Number and Click on Save
- Navigate to the “Tomcat Monitor Agent” folder.
- Configure the Monitor agent in Tomcat start-up using the following commands,
- Add Tomcat Configurations: Add these lines in your TOMCAT_HOME/bin/catalina.sh just after the initial commented lines CATALINA_OPTS=”-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9005 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false”
- Save the catalina.sh file. Restart the tomcat after the above change in catalina.sh
- Type the following commands in the terminal window to Install SSL. cp $JAVA_HOME/jre/lib/security/cacerts cacerts_appdiagnos_agent keytool -import -alias apm.appdiganos.com -keystore cacerts_appdiagnos_agent -storepass changeit -file apm.appdiagnos.com.crt -noprompt Note: “changeit” is the default store password for the “cacerts”. If it changed, then use the new password in the above and below commands.
- Run the Agent in background: cd /mnt/appdiagnos_tomcat_agent java -Djavax.net.ssl.trustStore=cacerts_appdiagnos_agent -Djavax.net.ssl.trustStorePassword=changeit -jar appdiagnos_tomcat_agent_2.0.42.jar > logs/appdiagnos_tomcat_agent_2.0.42_$(date +%Y-%m-%d_%H%M).log &
NOTE: On successful installation of the “Tomcat Monitor Agent”, the Monitor Agent Icon will appear in green color.
- Navigate to Appdiagnos APM Portal, OPS View >> Applications page
- A list of applications will appear
- Click on the “Configure Metrics” (Wheel Icon to the left of Card Layout) Option.
- Choose the metrics that are needed to be measured.
- Click SAVE button.
- Newly added counters graph will start appearing on the APM portal.
- On Click on Card Layout will appear the monitoring graph that can be viewed as below.