Add @EndpointServlet and migrate Jolokia
Add first class support for Servlet based endpoints and rework the Jolokia endpoint to use it. Fixes gh-10264
This commit is contained in:
@@ -1258,6 +1258,10 @@ content into your application. Rather, pick only the properties that you need.
|
||||
management.endpoint.trace.cache.time-to-live=0ms # Maximum time that a response can be cached.
|
||||
management.endpoint.trace.enabled= # Whether to enable the trace endpoint.
|
||||
|
||||
# JOLOKIA ENDPOINT ({sc-spring-boot-actuator-autoconfigure}/jolokia/JolokiaProperties.{sc-ext}[JolokiaProperties])
|
||||
management.endpoint.jolokia.config.*= # Jolokia settings. See the Jolokia manual for details.
|
||||
management.endpoint.jolokia.enabled=true # Whether to enable Jolokia.
|
||||
|
||||
# HEALTH INDICATORS
|
||||
management.health.db.enabled=true # Whether to enable database health check.
|
||||
management.health.cassandra.enabled=true # Whether to enable Cassandra health check.
|
||||
@@ -1288,11 +1292,6 @@ content into your application. Rather, pick only the properties that you need.
|
||||
management.info.git.enabled=true # Whether to enable git info.
|
||||
management.info.git.mode=simple # Mode to use to expose git information.
|
||||
|
||||
# JOLOKIA ({sc-spring-boot-actuator-autoconfigure}/jolokia/JolokiaProperties.{sc-ext}[JolokiaProperties])
|
||||
management.jolokia.config.*= # Jolokia settings. See the Jolokia manual for details.
|
||||
management.jolokia.enabled=false # Whether to enable Jolokia.
|
||||
management.jolokia.path=/jolokia # Path at which Jolokia is available.
|
||||
|
||||
# METRICS
|
||||
management.metrics.binders.jvm.enabled=true # Whether to enable JVM metrics.
|
||||
management.metrics.binders.logback.enabled=true # Whether to enable Logback metrics.
|
||||
|
||||
@@ -136,8 +136,13 @@ content.
|
||||
|`prometheus`
|
||||
|Exposes metrics in a format that can be scraped by a Prometheus server.
|
||||
|
||||
|
||||
|`jolokia`
|
||||
|Exposes JMX beans over HTTP (when Jolokia is on the classpath, not availble for WebFlux).
|
||||
|
||||
|===
|
||||
|
||||
|
||||
To learn more about the Actuator's endpoints and their request and response formats,
|
||||
please refer to the separate API documentation ({spring-boot-actuator-api}/html[HTML] or
|
||||
{spring-boot-actuator-api}/pdf/spring-boot-actuator-web-api.pdf[PDF]).
|
||||
@@ -857,8 +862,9 @@ Maven, you would add the following dependency:
|
||||
</dependency>
|
||||
----
|
||||
|
||||
Jolokia can then be accessed by using `/actuator/jolokia` on your management HTTP
|
||||
server.
|
||||
The Jolokia endpoint can then be exposed by adding `jolokia` or `*` to the
|
||||
`management.endpoints.web.expose` property. You can then be accessed it by using
|
||||
`/actuator/jolokia` on your management HTTP server.
|
||||
|
||||
|
||||
|
||||
@@ -866,11 +872,12 @@ server.
|
||||
==== 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.jolokia.config.`, as shown in the following example:
|
||||
prefix the parameter with `management.endpont.jolokia.config.`, as shown in the following
|
||||
example:
|
||||
|
||||
[source,properties,indent=0]
|
||||
----
|
||||
management.jolokia.config.debug=true
|
||||
management.endpoint.jolokia.config.debug=true
|
||||
----
|
||||
|
||||
|
||||
@@ -878,7 +885,7 @@ prefix the parameter with `management.jolokia.config.`, as shown in the followin
|
||||
[[production-ready-disabling-jolokia]]
|
||||
==== Disabling Jolokia
|
||||
If you use Jolokia but do not want Spring Boot to configure it, set the
|
||||
`management.jolokia.enabled` property to `false`, as follows:
|
||||
`management.endpoint.jolokia.enabled` property to `false`, as follows:
|
||||
|
||||
[source,properties,indent=0]
|
||||
----
|
||||
|
||||
Reference in New Issue
Block a user