Creating Simple, Custom Tools for Tomcat Monitoring with Jython and JMX


News: Creating Simple, Custom Tools for Tomcat Monitoring with Jython and JMX

  1. Often times a developer or operations professional needs access to monitor a Tomcat instance for purposes of capacity planning, troubleshooting, and performance tuning. There are many tools available already for Tomcat, some of them open source, and others paid for. Some tools are simple and others are complex management suites.

    There are comprehensive monitoring suites available that monitor and manage Tomcat, and do it well; however, there is always a benefit to being able to create your own custom Tomcat/application management tools. The first advantage is that you get exactly what you want out of your utility. In my example, I wanted to have a way to browse a Tomcat server’s Java Management Extensions’ MBeans with a hierarchical, bash-like navigation. This allows me to quickly find and diagnose problems with my Tomcat server or custom applications running within Tomcat, and is more precise than trending those MBeans over time using a more comprehensive monitoring suite. I liken it to purchasing a ready-made suit, or having one custom tailored to your exact specification. It just feels better sometimes, and other times it is not practical.

    Many utilities will not provide the specific feature that you need. There are usually a host of open source or commercial utilities for anything that one goal any developer or operations professional may want to achieve; however, often times that utility will not integrate well into their existing infrastructure, or not play well with automated processes that are pre-existing in the enterprise. In such cases, a custom utility can come in handy. Writing your own tools from scratch is a quick solution to a specific problem, and cuts out a lot of the fat. For simple tools, the complexity risk argument just isn't there, and in the time it takes to write a simple custom application.

    Learn more about using Jython and JMX in the following tutorial: Creating Custom Tools for Monitoring Tomcat

    Related Reading

    Professional Apache Tomcat 6 (WROX Professional Guides) ~ Vivek Chopra
    Jython Essentials (O'Reilly Scripting)  ~ Noel Rappin
    The Definitive Guide to Jython: Python for the Java Platform  ~ Josh Juneau

    Threaded Messages (2)

  2. Great tool![ Go to top ]

    Thanks! I was checking for the tools to replace the aging jmxterm command line client, and this tool is quite nice and customizable.

  3. Add those JMX beans![ Go to top ]

    To efficiently manage Tomcat, you need enough information. You can add quite pertinent data with the JMX output of MessAdmin, my very own monitoring utility. Check it out! :-)