Reputation: 15876
I am trying to write a client tool which monitors an application running in Tomcat 5.5. I know there are quite a few already available but the majority of them are web based and dont provide a lot of support for automating the monitoring process.
The tool i am writing now is very simple. Its a client java process that connects to the Tomcat instance remotely. I have managed to connect to it but now i am stuck as to how to use the MBeans that are already available in Tomcat.
My question really is which Mbeans within Tomcat do i query to find out the following information
Are there any MBeans that provide this info? if so how do i access it?
it would be very usefull to see a full list of all mbeans available in Tomcat and how to access them. I have seen this list http://tomcat.apache.org/tomcat-5.5-doc/catalina/funcspecs/mbean-names.html but it is quite confusing.
Thanks
Upvotes: 2
Views: 3677
Reputation: 2525
You could use the check_jmx4perl configuration with pre-defined Tomcat checks as a starting point. It references the names of quite some MBeans which can be found on a standard Tomcat installation.
I.e. the following metrics are pre-defined:
You can find this sample tomcat.cfg
configuration here: https://github.com/rhuss/jmx4perl/blob/master/config/tomcat.cfg
Upvotes: 0
Reputation: 3128
You can use jConsole utility of Java to see the MBeans available in remote Tomcat server. It will connect to remote server with jmx port. All the MBeans available are listed in MBean tab. This can help you finding the MBeans you wants and exact name of the MBean attribute.
Thanks.
Upvotes: 4