1 Monitoring Tomcat with JMX for Etics

1.1 How to set up JMX on etics-int

  • Add the following line into the file /etc/tomcat5/tomcat5.conf:
 
CATALINA_OPTS="-Dcom.sun.management.jmxremote  -Dcom.sun.management.jmxremote.port=8999  -Dcom.sun.management.jmxremote.ssl=false  -Dcom.sun.management.jmxremote.authenticate=true  -Djava.rmi.server.hostname=etics-int.cern.ch  -Dcom.sun.management.jmxremote.password.file=/etc/tomcat5/jmxremote.password   -Dcom.sun.management.jmxremote.access.file=/etc/tomcat5/jmxremote.access" 

  • For password authentication purposes, create the file /etc/tomcat5/jmxremote.password with the following content:
admin ********* 

admin being the user name allowed to access jmx and ******* its password

  • Create /etc/tomcat5/jmxremote.access with the following content:
 
admin readwrite 

The admin user is allowed readwrite access (readonly is a valid keyword otherwise).

  • Set the right permissions on the auth files, assigning them to the user who runs tomcat:
 chown tomcat4:tomcat4 /etc/tomcat5/jmxremote.password 
 chown tomcat4:tomcat4 /etc/tomcat5/jmxremote.access 
 chmod 600 /etc/tomcat5/jmxremote.password 
 chmod 600 /etc/tomcat5/jmxremote.access 

  • Restart the tomcat service:
/etc/init.d/tomcat5 restart 

1.2 How to display JMX data through jconsole

jconsole is a java tool which is able to display data generated by JMX through a graphical interface. In order to display it:

  • launch jconsole
jconsole
A window will load. What the window displays will depend on whether you are running jconsole on the same machine as you are running Tomcat.
  • If you are running it on the same machine as Tomcat you should see an option to select the Tomcat server in the local tab. To connect to the server select the item listed and click "Connect".
  • If Tomcat is running on a machine remote from jconsole. Click on the Remote tab. Enter etics-int.cern.ch:8999 and enter username and password in the proper fields. Click "Connect".

See also https://wiki.internet2.edu/confluence/display/CPD/Monitoring+Tomcat+with+JMX.

jconsole.png

-- - 11-Nov-2011

Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r2 - 2011-11-14 - FabioCapanniniExternal
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    EMI All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback