This extension works only with the standalone machine agent.
Apache Tomcat is an open source software implementation of the Java Servlet and JavaServer Pages technologies. This eXtension monitors Tomcat instance and collects useful statistics exposed through MBeans and reports to AppDynamics Controller.
Before the extension is installed, the prerequisites mentioned here need to be met. Please do not proceed with the extension installation if the specified prerequisites are not met.
By default, JMX is disabled in the Tomcat distribution. To use this extension please enable JMX in your instance. For information on enabling JMX, please refer to http://tomcat.apache.org/tomcat-7.0-doc/monitoring.html.
<MachineAgent_Dir>/monitors/The metricPrefix of the extension has to be configured as specified here. Please make sure that the right metricPrefix is chosen based on your machine agent deployment, otherwise this could lead to metrics not being visible in the controller.
In the AppDynamics Metric Browser, look for: Application Infrastructure Performance | <Tier> | Custom Metrics | Tomcat in case of default metric path
Note : Please make sure not to use tab (\t) while editing yaml files. You can validate the yaml file using a yaml validator
Specify the Tomcat instance host, JMX port, username and password in the config.yml. Configure the MBeans for this extension to report the metrics to Controller. By default, "Catalina" is the domain name. Specify the keyproperty 'type' of MBeans you are interested. Tomcat MBean ObjectName is of the form 'Catalina:type=ThreadPool,name="ajp-bio-8009"'. Please refer here for detailed Tomcat MBean Names. You can also add excludePatterns (regex) to exclude any metric tree from showing up in the AppDynamics controller.
# Tomcat instance servers: - host: "localhost" port: 9044 username: "" password: "" displayName: "" # Tomcat mbeans. Exclude patterns with regex can be used to exclude any unwanted metrics. mbeans: - domainName: "Catalina" types: [ThreadPool,GlobalRequestProcessor] excludePatterns: [ "Cache|.*", "connectionCount", ] # number of concurrent tasks numberOfThreads: 10 #timeout for the thread threadTimeout: 30 #prefix used to show up metrics in AppDynamics metricPrefix: "Custom Metrics|Tomcat|"
In the above config file, metrics are being pulled from two mbeans with type=ThreadPool and type=GlobalRequestProcessor. Note that the patterns mentioned in the "excludePatterns" will be excluded from showing up in the AppDynamics Metric Browser.
Configure the path to the config.yml file by editing the in the monitor.xml file in the
<MACHINE_AGENT_HOME>/monitors/TomcatMonitor/ directory. Below is the sample
<task-arguments> <!-- config file--> <argument name="config-file" is-required="true" default-value="monitors/TomcatMonitor/config.yml" /> .... </task-arguments>
Please look at the troubleshooting document and make sure that everything is followed correctly.
Always feel free to fork and contribute any changes directly via GitHub.
For any support questions, please contact email@example.com.