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?
- <New id="Connectorserver" class="Org.eclipse.jetty.jmx.ConnectorServer">
- <Arg>
- <New class="Javax.management.remote.JMXServiceURL">
- <arg type="java.lang.String">rmi</arg>
- <Arg type="java.lang.String" />
- <Arg type="Java.lang.Integer">
- <systemproperty name="Jetty.jmxrmiport" default="1099"/>
- </Arg>
- < arg type= "java.lang.String" span class= "tag" >>/jndi/rmi://<systemproperty name=" jetty.jmxrmihost " default= "localhost" />:< Systemproperty name= "Jetty.jmxrmiport" default= "1099" />/jmxrmi </arg>
- </New>
- </Arg>
- <arg>org.eclipse.jetty.jmx:name=rmiconnectorserver</arg>
- <call name="Start" />
- </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