Tomcat 4.0 server

Tomcat 4.0 server

Log Track Supported: Yes
Config Track Supported: Yes
Custom Properties Supported: None
Supported Control Actions: start,stop,restart
Supported Metrics:

Name Alias Units Category Default On Default Interval
JVM Active Thread Count ActiveThreadCount none UTILIZATION true 5 min
JVM Active Thread Group Count ActiveThreadGroupCount none UTILIZATION false 5 min
JVM Free Memory FreeMemory B UTILIZATION false 5 min
JVM Total Memory TotalMemory B UTILIZATION false 5 min
Uptime Uptime ms AVAILABILITY false 5 min
Availability Availability percentage AVAILABILITY true 5 min
Process CPU System Time TimeSys sec UTILIZATION false 10 min
Process CPU User Time TimeUser sec UTILIZATION false 10 min
Process Memory Size MemSize B UTILIZATION false 5 min
Process Resident Memory Size MemResident B UTILIZATION false 5 min
Process Shared Memory Size MemShare B UTILIZATION false 5 min
Process Page Faults PageFaults none UTILIZATION false 10 min
Process Page Faults per Minute PageFaults1m none UTILIZATION false 10 min
Process Open File Descriptors OpenFd none UTILIZATION false 5 min
Number of Requests Served RequestCount none THROUGHPUT true 10 min
Number of Requests Served per Minute RequestCount1m none THROUGHPUT true 10 min
Total Processing Time TotalTime ms PERFORMANCE true 10 min
Total Processing Time per Minute TotalTime1m ms PERFORMANCE true 10 min

Configuration help:

Configure Tomcat 4.0 for Monitoring

To enable monitoring of Tomcat servers and services the Tomcat server must be instrumented using a filter to collect metrics and a webapp to deliver the metric data into HQ. The web application, filter and any additional jars are packaged in the HQ agent directory under product_connectors/servlet. All commands below should be issued from this directory.

If you are using Apache/JK to front your Tomcat installation you will need to setup a mount point. This can be done by adding the following to your Apache configuration file.

   JkMount /hyperic-hq/* ajp13
  

The first step to making Tomcat monitorable is to install the filter, JMX jars and webapp. These are used to collect internal Tomcat metrics.

   cp libs/hq-filter.jar ${installpath}/common/lib
   cp libs/mx4j-jmx.jar ${installpath}/common/lib
   cp -R hyperic-hq ${installpath}/webapps
  

Tomcat 4.0 Webapp control requires the use of the manager servlet. The servlet is available by default in ${installpath}/server/lib/servlets-manager.jar.

Finally, the filter must be enabled. The following must be added to ${installpath}/conf/web.xml. Keep in mind that each tag type must be grouped together.

  <filter>
    <filter-name>JMXFilter</filter-name>
    <filter-class>org.hyperic.hq.product.servlet.filter.JMXFilter</filter-class>
      
    <!-- Uncomment the following line to enable response time logging. 
            The directory you specify as the param can include properties 
            referenced from the System.properties of the vm.

            The ResponseTime log file will by default store the last 1 hour's 
            worth of response time data. This file gets truncated as soon as 
            data is succesfully sent into the server. The file is named uniquely
            for each webapp in the form: yourContextName_HQResponseTime.log

            If this fragment is included in the global web.xml for the container,
            all webapps in it will generate response time data, and have logs 
            following the format described above. You can enable it individually 
            on each webapp as well if you dont want every webapp to generate 
            response time data

         -->
    <!--
    <init-param>
      <param-name>responseTimeLogDir</param-name>
      <param-value>/home/johnmark/software/hyperic-hq-agent-3.1.0/logs</param-value>
    </init-param>
         -->

    <!-- these are optional parameters which you can override to optimize logging -->
    <!--
    <init-param>
      <param-name>bufferSize</param-name>
      <param-value>8k</param-value>
    </init-param>

    <init-param>
      <param-name>bufferTime</param-name>
      <param-value>1h</param-value>
    </init-param>
         -->
  </filter>

  <filter-mapping>
    <filter-name>JMXFilter</filter-name>
    <url-pattern>/*</url-pattern>
  </filter-mapping>

  <listener>
    <listener-class>org.hyperic.hq.product.servlet.filter.JMXSessionListener</listener-class>
    </listener>

  <servlet>
    <servlet-name>JMXWebappMetricServlet</servlet-name>
    <servlet-class>org.hyperic.hq.product.servlet.filter.JMXFilterInitServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
  </servlet>
  

This can be tested by verifying your webapps show up correctly in the JMX Servlet. You may need to modify the hostname in the URL if your jmxUrl is configured relative to the agent host.

Configure Tomcat 4.0 for Log Tracking

To enable Log Tracking in HQ, Tomcat must be configured with log4j. These steps are based on the standard Tomcat documentation.

If the file ${installpath}/common/classes/log4j.properties does not exist, create one with the following example contents:

#These properties can be modified.  The only requirement is that the
#ConversionPattern includes the priority (%p)
log4j.rootLogger=INFO, R
log4j.appender.R.File=${catalina.home}/logs/tomcat.log
log4j.appender.R.MaxBackupIndex=1
log4j.appender.R.MaxFileSize=5000KB
log4j.appender.R.layout.ConversionPattern=%d %-5p [%c{1}] %m%n
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R=org.apache.log4j.RollingFileAppender
  

Next, copy the following jars unless they have already been installed:

  cp pdk/lib/log4j.jar ${installpath}/common/lib
  cp pdk/lib/commons-logging.jar ${installpath}/common/lib
  

Restart Tomcat for the changes to take effect.


General Log and Config Track Properties


Browse Space

- Pages
- News
- Labels
- Attachments
- Bookmarks
- Mail
- Advanced

Explore Confluence

- Popular Labels
- Notation Guide

Your Account

Log In

or Sign Up  

Other Features

Add Content


System Monitoring Software
SourceForge.net Logo