Tomcat is a popular open source implementation of the Java Servlet specification. For more information visit tomcat.apache.org.
Even if the Tomcat plugin is not configured, Cloud Monitoring discovers Tomcat services as a web server.
The services discovered are displayed on the Tomcat Services page in the Resources menu. After you install the monitoring agent and configure the Tomcat plugin on your instances, Monitoring populates the Tomcat Services page with inventory and metrics.
Configuring Monitoring to monitor Tomcat
After you install the monitoring agent, use the following instructions to configure the Tomcat plugin on your instances.
The Tomcat plugin requires version 5.5.0-257 or later of the monitoring agent. To update the agent, see Upgrading the agent.
Tomcat must be set to enable external JMX monitoring. See the JMX documentation at tomcat.apache.org.
Enabling the Tomcat monitoring plugin
Tomcat is monitored via JMX. Monitoring supports monitoring Tomcat version 7. Tomcat version 8 is not currently supported.
(cd /etc/stackdriver/collectd.d/ && sudo curl -O https://raw.githubusercontent.com/Stackdriver/stackdriver-agent-service-configs/master/etc/collectd.d/tomcat-7.conf)
The downloaded plugin configuration file assumes that your Tomcat instance is configured to accept JMX connections on port 9012. If you have configured Tomcat with a different JMX port, as root, edit the file and follow the instructions to change the JMX port settings.
After adding the configuration file, restart the monitoring agent by running the following command:
sudo service stackdriver-agent restart
For more information on the
GenericJMX plugin used to monitor
Tomcat, see Plugin:GenericJMX.