Managing Tomcat

From JMXplorer

Jump to: navigation, search

Contents

Setup Tomcat for monitoring

Instructions to manage remotely Tomcat are available in Tomcat's monitoring documentation.

I added the following parameters to my tomcat startup script:

set JAVA_OPTS=-Dcom.sun.management.jmxremote.port=9003 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.password.file=c:\server\tomcat\jmxremote.password -Dcom.sun.management.jmxremote.access.file=c:\server\tomcat\jmxremote.access

with jmxremote.password containing

monitorRole tomcat
controlRole tomcat

and jmxremote.access containing

monitorRole readonly
controlRole readwrite

Monitor Tomcat using JMXplorer

Add a new MBean Server

Open the "MBean servers Explorer" view (Window->Show View->Other->JMXplorer/MBean servers Explorer), right click on the view and add a new MBean server :

  • Url : service:jmx:rmi:///jndi/rmi://localhost:9003/jmxrmi
  • Username : controlRole
  • Password : tomcat

Image:Tomcat_add_mbeanserver.png

Connect to MBean Server

Right-click on the newly added MBean server and select Connect

Image:Tomcat_connect_mbeanserver.png

Monitor a jmx bean

You can then navigate in the tree, select a jmx bean and open it in the Jmx Attributes view

Image:Tomcat_open_jmxbean.png

This view shows the jmx attributes, the operations (not implemented yet) and notifications.

Image:Tomcat_jmxattributes_view.png

Some values can me modified and for some of them (identified by a small icon in the second column) you can display a chart by double-clicking on the second column.

Creating a dashboard

Select File/New/Other.../JmxPlorer/Jmx dashboard

Image:Create_dashboard_wizard.png

You can then create a dashboard by adding picture, text, charts :

  • by clicking on the palette icons
  • by dragging a jmx attribute from the Jmx Attributes view

Image:Tomcat_sample_dashboard.png

download
development
communication