Jetty Server JMX Monitoring

Source: Internet
Author: User

Jetty Server JMX Monitoring

Jetty Server Add Jmx,jmx-remote module

1. Modify the corresponding jetty server configuration file Start.ini append the following two lines
–module=jmx
–module=jmx-remote

2. Cancel Etc/jetty-jmx.xml configuration notes about JMX

[HTML]View PlainCopyprint?
  1. <New id="Connectorserver" class="Org.eclipse.jetty.jmx.ConnectorServer">
  2. <Arg>
  3. <New class="Javax.management.remote.JMXServiceURL">
  4. <arg type="java.lang.String">rmi</arg>
  5. <Arg type="java.lang.String" />
  6. <Arg type="Java.lang.Integer">
  7. <systemproperty name="Jetty.jmxrmiport" default="1099"/>
  8. </Arg>
  9.             < arg type= "java.lang.String" span class= "tag" >>/jndi/rmi://<systemproperty name=" jetty.jmxrmihost " default= "localhost" />:< Systemproperty name= "Jetty.jmxrmiport"  default= "1099" />/jmxrmi </arg>  
  10. </New>
  11. </Arg>
  12. <arg>org.eclipse.jetty.jmx:name=rmiconnectorserver</arg>
  13. <call name="Start" />
  14. </New>


3. Cancel the Etc/jetty-jmx.xml comment in Start.ini

4. Start Jetty
Add the JVM parameters to the bin/jetty.sh-djava.rmi.server.hostname=xxx.xxx.xxx.xxx

java_options+= ("-djava.rmi.server.hostname=xxx.xxx.xxx.xxx")

If necessary, you can see the corresponding property configuration in Etc/jetty-jmx.xml and Jetty-jmx-remote.xml
Like what:
Jetty.jmxrmiport
Jetty.jmxrmihost

View the processes that are started under
[Email protected] logs]# jps-vml |grep WebApp
13165.. /jetty-man/start.jar-server-xms2g-xmx2g-xx:permsize=64m-xx:maxpermsize=128m-djava.rmi.server.hostname= 10.128.31.5

In the VISUALVM
Inserting a JMX monitor

Next, we see that the JVM process on the entire server is visible.

Jetty Server JMX Monitoring

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.