public class JmxServlet
extends javax.servlet.http.HttpServlet
This servlet generally will be placed under the /jmx URL for each
HttpServer. It provides read only
access to JMX metrics. The optional qry
parameter
may be used to query only a subset of the JMX Beans. This query
functionality is provided through the
MBeanServer.queryNames(ObjectName, javax.management.QueryExp)
method.
For example http://.../metrics/jmx?qry=org.alluxio:*
will return
all alluxio metrics exposed through JMX.
Modifier and Type | Field and Description |
---|---|
protected MBeanServer |
mBeanServer
MBean server.
|
protected com.fasterxml.jackson.core.JsonFactory |
mJsonFactory
Json Factory to create Json generators for write objects in json format.
|
Constructor and Description |
---|
JmxServlet() |
Modifier and Type | Method and Description |
---|---|
void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Process a GET request for the specified resource.
|
protected void |
doTrace(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
Disable TRACE method to avoid TRACE vulnerability.
|
void |
init()
Initialize this servlet.
|
doDelete, doHead, doOptions, doPost, doPut, getLastModified, service, service
protected MBeanServer mBeanServer
protected com.fasterxml.jackson.core.JsonFactory mJsonFactory
public void init() throws javax.servlet.ServletException
init
in class javax.servlet.GenericServlet
javax.servlet.ServletException
protected void doTrace(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws javax.servlet.ServletException, IOException
doTrace
in class javax.servlet.http.HttpServlet
javax.servlet.ServletException
IOException
public void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
doGet
in class javax.servlet.http.HttpServlet
request
- The servlet request we are processingresponse
- The servlet response we are creatingCopyright © 2023. All Rights Reserved.