[[actuator.jmx]]
== Monitoring and Management over JMX
Java Management Extensions (JMX) provide a standard mechanism to monitor and manage applications.
By default, this feature is not enabled and can be turned on by setting the configuration property configprop:spring.jmx.enabled[] to `true`.
Spring Boot exposes management endpoints as JMX MBeans under the `org.springframework.boot` domain by default.
To Take full control over endpoints registration in the JMX domain, consider registering your own `EndpointObjectNameFactory` implementation.



[[actuator.jmx.custom-mbean-names]]
=== Customizing MBean Names
The name of the MBean is usually generated from the `id` of the endpoint.
For example, the `health` endpoint is exposed as `org.springframework.boot:type=Endpoint,name=Health`.

If your application contains more than one Spring `ApplicationContext`, you may find that names clash.
To solve this problem, you can set the configprop:spring.jmx.unique-names[] property to `true` so that MBean names are always unique.

You can also customize the JMX domain under which endpoints are exposed.
The following settings show an example of doing so in `application.properties`:

[source,yaml,indent=0,subs="verbatim",configprops,configblocks]
----
	spring:
	  jmx:
	    unique-names: true
	management:
	  endpoints:
	    jmx:
	      domain: "com.example.myapp"
----



[[actuator.jmx.disable-jmx-endpoints]]
=== Disabling JMX Endpoints
If you do not want to expose endpoints over JMX, you can set the configprop:management.endpoints.jmx.exposure.exclude[] property to `*`, as shown in the following example:

[source,yaml,indent=0,subs="verbatim",configprops,configblocks]
----
	management:
	  endpoints:
	    jmx:
	      exposure:
	        exclude: "*"
----



[[actuator.jmx.jolokia]]
=== Using Jolokia for JMX over HTTP
Jolokia is a JMX-HTTP bridge that provides an alternative method of accessing JMX beans.
To use Jolokia, include a dependency to `org.jolokia:jolokia-core`.
For example, with Maven, you would add the following dependency:

[source,xml,indent=0,subs="verbatim"]
----
	<dependency>
		<groupId>org.jolokia</groupId>
		<artifactId>jolokia-core</artifactId>
	</dependency>
----

The Jolokia endpoint can then be exposed by adding `jolokia` or `*` to the configprop:management.endpoints.web.exposure.include[] property.
You can then access it by using `/actuator/jolokia` on your management HTTP server.

NOTE: The Jolokia endpoint exposes Jolokia's servlet as an actuator endpoint.
As a result, it is specific to servlet environments such as Spring MVC and Jersey.
The endpoint will not be available in a WebFlux application.



[[actuator.jmx.jolokia.customizing]]
==== Customizing Jolokia
Jolokia has a number of settings that you would traditionally configure by setting servlet parameters.
With Spring Boot, you can use your `application.properties` file.
To do so, prefix the parameter with `management.endpoint.jolokia.config.`, as shown in the following example:

[source,yaml,indent=0,subs="verbatim",configprops,configblocks]
----
	management:
	  endpoint:
	    jolokia:
	      config:
	        debug: true
----



[[actuator.jmx.jolokia.disabling]]
==== Disabling Jolokia
If you use Jolokia but do not want Spring Boot to configure it, set the configprop:management.endpoint.jolokia.enabled[] property to `false`, as follows:

[source,yaml,indent=0,subs="verbatim",configprops,configblocks]
----
	management:
	  endpoint:
	    jolokia:
	      enabled: false
----
