Response Time FilterIn order to measure response times from web applications, you need to install a servlet filter on the target web container Generic InstallThe installation consists of two parts:
Library installationYou need to copy the file rhq-rtfilter-<version>.jar to a directory in the classpath of your servlet container. The specifics for containers are described below. This library can be built from the RHQ source at http://svn.rhq-project.org/repos/rhq/trunk/modules/helpers/rtfilter/. Configuration updateThe configuration update consists of two additions to the servlet container configuration. The exact file is mentioned below in the section for individual servlet containers. The two parts are a <filter/> and <filter-mapping/> directive. For the <filter/> directive, you can just use the first one if you are happy with the defaults. If you want to change parameters, you can use the enhanced one. Remember to use only one of both. Previous to Servlet version 2.4 you must be careful to put the directives next to other directives of the same kind. Filter related directives go in front of the <servlet/> sections.
Simplest <filter/> section <filter> <filter-name>RHQRtFilter</filter-name> <filter-class>org.rhq.helpers.rtfilter.filter.RtFilter</filter-class> </filter> Enhanced <filter/> section <filter> <filter-name>RHQRtFilter</filter-name> <filter-class>org.rhq.helpers.rtfilter.filter.RtFilter</filter-class> <init-param> <description>Shall the filter directly chop off the query parameters from the URL? Default is true.</description> <param-name>chopQueryString</param-name> <param-value>true</param-value> </init-param> <init-param> <description>Directory where logs are written to</description> <param-name>logDirectory</param-name> <param-value>/tmp</param-value> </init-param> <init-param> <description>Prefix to written logfile names</description> <param-name>logFilePrefix</param-name> <param-value>localhost_7080_</param-value> </init-param> <init-param> <description>Patterns that should not be logged</description> <param-name>dontLogRegEx</param-name> <param-value></param-value> </init-param> <init-param> <description>Should the dontLog pattern be applied to the URI only?</description> <param-name>matchOnUriOnly</param-name> <param-value>true</param-value> </init-param> <init-param> <description>How many seconds between auto flushes of the logfile</description> <param-name>timeBetweenFlushesInSec</param-name> <param-value>73</param-value> </init-param> <init-param> <description>How many lines shall be written to the logfiles before a flush</description> <param-name>flushAfterLines</param-name> <param-value>13</param-value> </init-param> <init-param> <description>The maximum allowed size, in bytes, of the logfiles; if a logfile exceeds this limit, the filter will truncate it; the default value is 5242880 (5 MB)</description> <param-name>maxLogFileSize</param-name> <param-value>5242880</param-value> </init-param> </filter> and <filter-mapping> <filter-name>RHQRtFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> If your Servlet container's Servlet version is below Servlet 2.4, you will need to place it in the correct section/order in the file - otherwise your servlet container will not start. Description of init parameters
Specific install instructions for various containersJBoss AS with embedded Servlet containersCopy the jar file to the lib directory at JBOSS_HOME/server/<config>/lib/
|