Today, Monitoring is an important task for an Administrator. Grab statistical data, reconfigure certain aspects of the server, add a new web application etc, form a part of the daily administration tasks. At the end of this blog, the administrator can effectively monitor these parameters and have answers to these questions:

1. Which Webapps has the maximum number of sessions ?
2. How much memory is the Tomcat JVM process taking up ?

Though much has been talked about monitoring tomcat application across the market, my insight here is into monitoring Tomcat Application Server through ManageEngine Applications Manager.

Metrics to monitor :

The following metrics serve as a guideline to monitor Tomcat Server through ManageEngine Applications Manager :

  • Uptime & Availability
  • Number of Requests received by the Server
  • Used / Free Memory of the server
  • Active Thread Count
  • Number of Open Sessions per application
  • Application Session information
  • Application Response Time
  • Servlet Response Time
  • Servlet Requests per min
  • Thread Status ( for Tomcat 5.x and above )

Supported Tomcat Versions :

The following versions are supported by ManageEngine Applications Manager :

  • Tomcat 3.x
  • Tomcat 4.x
  • Tomcat 5.x
  • Tomcat 6.x

Configuring Tomcat Server :

In order that Tomcat Server be monitored by ManageEngine Applications Manager, you have to deploy the Tomcat Agent. The procedure to deploy the agent is outlined below :

a. Tomcat 3.x & 4.x

Step 1 : Copy the agent, corresponding to the Tomcat Version, from [AppManager_Home]\classes folder to the Tomcat Installation folder. [ Tomcat3Agent.zip for Tomcat 3 and Tomcat4Agent.zip for Tomcat 4 ]
Step 2 : Extract the zip file in the Tomcat Installation folder.
Step 3 : Add the following code to conf\server.xml  file in the Tomcat Installation folder, below the Engine Tag.

<Valve className="com.adventnet.appmanager.tomcatagent.ver4.valve.AdventNetHostValve"/>


Step 4 : Restart Tomcat Server.

b. Tomcat 5.x & 6.x

Tomcat server should host the ‘Manager’ application. This application is available by default.

You can find more detailed steps to configure the agent @ http://www.manageengine.com/products/applications_manager/help/managing-business-applications/application-server-monitor.html#tomcat-server

For Tomcat version 5.x and above, the information provided in the url’s below is shown in Applications Manager.

Monitoring Tomcat :

On adding a tomcat server, the metrics to monitor are associated automatically. A few screenshots below shows the Tomcat metrics, as monitored through Applications Manager.

1. Memory usage & Response Time :

2. Tomcat Thread details ( for Tomcat 5.x & 6.x )

3. Tomcat Application Summary :

4. Tomcat Servlet Details :

Click Configure Alarms against each metric to configure Thresholds.

In the above image, the health of the Tomcat server is critical. The Used memory is 17444 kB, which is beyond the threshold value of 400 kB.

You can configure corrective actions to restart Tomcat service / server through ‘Run Program Action’, when the threshold is violated or when the service is down.

Conclusion :

Monitoring Applications is a major task for a Network Administrator. It is made easier through ManageEngine Applications Manager. I hope the steps outlined above should help any administrator to monitor Tomcat Applications and troubleshoot for any performance errors, help in Capacity planning, generate reports of web usage etc.

Kevin

  1. Server monitoring is done very professionally with the SysOrb monitoring system. Is is highly scalable and at the same time so easy to use, which often leads to completion success.