Spring Boot Actuator Web API
Spring Boot Actuator Web API
Documentation
Andy Wilkinson
Table of Contents
1. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1. URLs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2. Timestamps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
2. Audit Events (auditevents) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.1. Retrieving Audit Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.1.1. Query Parameters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.1.2. Response Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
3. Beans (beans) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3.1. Retrieving the Beans . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3.1.1. Response Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
4. Conditions Evaluation Report (conditions) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
4.1. Retrieving the Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
4.1.1. Response Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
5. Configuration Properties (configprops) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
5.1. Retrieving the @ConfigurationProperties Bean . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
5.1.1. Response Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
6. Environment (env) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
6.1. Retrieving the Entire Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
6.1.1. Response Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
6.2. Retrieving a Single Property . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
6.2.1. Response Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
7. Flyway (flyway) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
7.1. Retrieving the Migrations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
7.1.1. Response Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
8. Health (health) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
8.1. Retrieving the Health . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
8.1.1. Response Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
9. Heap Dump (heapdump) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
9.1. Retrieving the Heap Dump . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
10. HTTP Trace (httptrace) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
10.1. Retrieving the Traces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
10.1.1. Response Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
11. Info (info) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
11.1. Retrieving the Info . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
11.1.1. Response Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
build Response Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
git Response Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
12. Liquibase (liquibase) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
12.1. Retrieving the Changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
12.1.1. Response Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
13. Log File (logfile) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
13.1. Retrieving the Log File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
13.2. Retrieving Part of the Log File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
14. Loggers (loggers) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
14.1. Retrieving All Loggers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
14.1.1. Response Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
14.2. Retrieving a Single Logger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
14.2.1. Response Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
14.3. Setting a Log Level . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
14.3.1. Request Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
14.4. Clearing a Log Level . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
15. Mappings (mappings) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
15.1. Retrieving the Mappings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
15.1.1. Response Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
15.1.2. Dispatcher Servlets Response Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
15.1.3. Servlets Response Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
15.1.4. Servlet Filters Response Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
15.1.5. Dispatcher Handlers Response Structure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
16. Metrics (metrics) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
16.1. Retrieving Metric Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
16.1.1. Response Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
16.2. Retrieving a Metric . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
16.2.1. Query Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
16.2.2. Response structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
16.3. Drilling Down . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
17. Prometheus (prometheus) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
17.1. Retrieving the Metrics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
18. Scheduled Tasks (scheduledtasks) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
18.1. Retrieving the Scheduled Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
18.1.1. Response Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
19. Sessions (sessions). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
19.1. Retrieving Sessions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
19.1.1. Query Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
19.1.2. Response Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
19.2. Retrieving a Single Session . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
19.2.1. Response Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
19.3. Deleting a Session . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
20. Shutdown (shutdown) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
20.1. Shutting Down the Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
20.1.1. Response Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
21. Thread Dump (threaddump) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
21.1. Retrieving the Thread Dump. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
21.1.1. Response Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
This API documentation describes Spring Boot Actuators web endpoints.
1
Chapter 1. Overview
Before you proceed, you should read the following topics:
• URLs
• Timestamps
1.1. URLs
By default, all web endpoints are available beneath the path /actuator with URLs of the form
/actuator/{id}. The /actuator base path can be configured by using the
management.endpoints.web.base-path property, as shown in the following example:
management.endpoints.web.base-path=/manage
The preceding application.properties example changes the form of the endpoint URLs from
/actuator/{id} to /manage/{id}. For example, the URL info endpoint would become /manage/info.
1.2. Timestamps
All timestamps that are consumed by the endpoints, either as query parameters or in the request
body, must be formatted as an offset date and time as specified in ISO 8601.
2
Chapter 2. Audit Events (auditevents)
The auditevents endpoint provides information about the application’s audit events.
$ curl 'http://localhost:8080/actuator/auditevents?principal=alice&after=2018-04-
04T12%3A06%3A45.086Z&type=logout' -i -X GET
The preceding example retrieves logout events for the principal, alice, that occurred after 09:37 on
7 November 2017 in the UTC timezone. The resulting response is similar to the following:
HTTP/1.1 200 OK
Content-Type: application/vnd.spring-boot.actuator.v2+json;charset=UTF-8
Content-Length: 121
{
"events" : [ {
"timestamp" : "2018-04-04T12:06:45.088Z",
"principal" : "alice",
"type" : "logout"
} ]
}
The endpoint uses query parameters to limit the events that it returns. The following table shows
the supported query parameters:
Parameter Description
after Restricts the events to those that occurred after the given time.
Optional.
principal Restricts the events to those with the given principal. Optional.
type Restricts the events to those with the given type. Optional.
The response contains details of all of the audit events that matched the query. The following table
describes the structure of the response:
3
Path Type Description
4
Chapter 3. Beans (beans)
The beans endpoint provides information about the application’s beans.
5
HTTP/1.1 200 OK
Content-Type: application/vnd.spring-boot.actuator.v2+json;charset=UTF-8
Content-Length: 1150
{
"contexts" : {
"application" : {
"beans" : {
"defaultServletHandlerMapping" : {
"aliases" : [ ],
"scope" : "singleton",
"type" :
"org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport$EmptyHan
dlerMapping",
"resource" :
"org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration$EnableWebM
vcConfiguration",
"dependencies" : [ ]
},
"org.springframework.boot.autoconfigure.web.servlet.DispatcherServletAutoConfiguration
" : {
"aliases" : [ ],
"scope" : "singleton",
"type" :
"org.springframework.boot.autoconfigure.web.servlet.DispatcherServletAutoConfiguration
$$EnhancerBySpringCGLIB$$16ebb810",
"dependencies" : [ ]
},
"org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration"
: {
"aliases" : [ ],
"scope" : "singleton",
"type" :
"org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration$$
EnhancerBySpringCGLIB$$293fd58c",
"dependencies" : [ ]
}
}
}
}
}
The response contains details of the application’s beans. The following table describes the structure
of the response:
6
Path Type Description
7
Chapter 4. Conditions Evaluation Report
(conditions)
The conditions endpoint provides information about the evaluation of conditions on configuration
and auto-configuration classes.
HTTP/1.1 200 OK
Content-Type: application/vnd.spring-boot.actuator.v2+json;charset=UTF-8
Content-Length: 3230
{
"contexts" : {
"application" : {
"positiveMatches" : {
"EndpointAutoConfiguration#endpointOperationParameterMapper" : [ {
"condition" : "OnBeanCondition",
"message" : "@ConditionalOnMissingBean (types:
org.springframework.boot.actuate.endpoint.invoke.ParameterValueMapper; SearchStrategy:
all) did not find any beans"
} ],
"EndpointAutoConfiguration#endpointCachingOperationInvokerAdvisor" : [ {
"condition" : "OnBeanCondition",
"message" : "@ConditionalOnMissingBean (types:
org.springframework.boot.actuate.endpoint.invoker.cache.CachingOperationInvokerAdvisor
; SearchStrategy: all) did not find any beans"
} ],
"WebEndpointAutoConfiguration" : [ {
"condition" : "OnWebApplicationCondition",
"message" : "@ConditionalOnWebApplication (required) found 'session' scope"
} ]
},
"negativeMatches" : {
"WebFluxEndpointManagementContextConfiguration" : {
"notMatched" : [ {
"condition" : "OnWebApplicationCondition",
"message" : "not a reactive web application"
} ],
"matched" : [ {
8
"condition" : "OnClassCondition",
"message" : "@ConditionalOnClass found required classes
'org.springframework.web.reactive.DispatcherHandler',
'org.springframework.http.server.reactive.HttpHandler'; @ConditionalOnMissingClass did
not find unwanted class"
} ]
},
"GsonHttpMessageConvertersConfiguration.GsonHttpMessageConverterConfiguration"
: {
"notMatched" : [ {
"condition" :
"GsonHttpMessageConvertersConfiguration.PreferGsonOrJacksonAndJsonbUnavailableConditio
n",
"message" : "AnyNestedCondition 0 matched 2 did not; NestedCondition on
GsonHttpMessageConvertersConfiguration.PreferGsonOrJacksonAndJsonbUnavailableCondition
.JacksonJsonbUnavailable NoneNestedConditions 1 matched 1 did not; NestedCondition on
GsonHttpMessageConvertersConfiguration.JacksonAndJsonbUnavailableCondition.JsonbPrefer
red @ConditionalOnProperty (spring.http.converters.preferred-json-mapper=jsonb) did
not find property 'spring.http.converters.preferred-json-mapper'; NestedCondition on
GsonHttpMessageConvertersConfiguration.JacksonAndJsonbUnavailableCondition.JacksonAvai
lable @ConditionalOnBean (types:
org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
SearchStrategy: all) found bean 'mappingJackson2HttpMessageConverter'; NestedCondition
on
GsonHttpMessageConvertersConfiguration.PreferGsonOrJacksonAndJsonbUnavailableCondition
.GsonPreferred @ConditionalOnProperty (spring.http.converters.preferred-json-
mapper=gson) did not find property 'spring.http.converters.preferred-json-mapper'"
} ],
"matched" : [ ]
},
"JsonbHttpMessageConvertersConfiguration" : {
"notMatched" : [ {
"condition" : "OnClassCondition",
"message" : "@ConditionalOnClass did not find required class
'javax.json.bind.Jsonb'"
} ],
"matched" : [ ]
}
},
"unconditionalClasses" : [
"org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration"
]
}
}
}
The response contains details of the application’s condition evaluation. The following table
describes the structure of the response:
9
Path Type Description
10
Chapter 5. Configuration Properties
(configprops)
The configprops endpoint provides information about the application’s @ConfigurationProperties
beans.
11
HTTP/1.1 200 OK
Content-Type: application/vnd.spring-boot.actuator.v2+json;charset=UTF-8
Content-Length: 1266
{
"contexts" : {
"application" : {
"beans" : {
"management.endpoints.web.cors-
org.springframework.boot.actuate.autoconfigure.endpoint.web.CorsEndpointProperties" :
{
"prefix" : "management.endpoints.web.cors",
"properties" : {
"allowedHeaders" : [ ],
"allowedMethods" : [ ],
"allowedOrigins" : [ ],
"maxAge" : {
"units" : [ "SECONDS", "NANOS" ]
},
"exposedHeaders" : [ ]
}
},
"spring.http.encoding-
org.springframework.boot.autoconfigure.http.HttpEncodingProperties" : {
"prefix" : "spring.http.encoding",
"properties" : {
"charset" : "UTF-8",
"force" : false,
"forceRequest" : false,
"forceResponse" : false
}
},
"management.endpoints.web-
org.springframework.boot.actuate.autoconfigure.endpoint.web.WebEndpointProperties" : {
"prefix" : "management.endpoints.web",
"properties" : {
"pathMapping" : { },
"exposure" : {
"include" : [ "*" ],
"exclude" : [ ]
},
"basePath" : "/actuator"
}
}
}
}
}
}
12
5.1.1. Response Structure
The response contains details of the application’s @ConfigurationProperties beans. The following
table describes the structure of the response:
13
Chapter 6. Environment (env)
The env endpoint provides information about the application’s Environment.
14
HTTP/1.1 200 OK
Content-Type: application/vnd.spring-boot.actuator.v2+json;charset=UTF-8
Content-Length: 799
{
"activeProfiles" : [ ],
"propertySources" : [ {
"name" : "systemProperties",
"properties" : {
"java.runtime.name" : {
"value" : "OpenJDK Runtime Environment"
},
"java.vm.version" : {
"value" : "25.141-b15"
},
"java.vm.vendor" : {
"value" : "Oracle Corporation"
}
}
}, {
"name" : "systemEnvironment",
"properties" : {
"JAVA_HOME" : {
"value" : "/docker-java-home",
"origin" : "System Environment Property \"JAVA_HOME\""
}
}
}, {
"name" : "applicationConfig: [classpath:/application.properties]",
"properties" : {
"com.example.cache.max-size" : {
"value" : "1000",
"origin" : "class path resource [application.properties]:1:29"
}
}
} ]
}
The response contains details of the application’s Environment. The following table describes the
structure of the response:
15
Path Type Description
The preceding example retrieves information about the property named com.example.cache.max-
size. The resulting response is similar to the following:
HTTP/1.1 200 OK
Content-Disposition: inline;filename=f.txt
Content-Type: application/vnd.spring-boot.actuator.v2+json;charset=UTF-8
Content-Length: 445
{
"property" : {
"source" : "applicationConfig: [classpath:/application.properties]",
"value" : "1000"
},
"activeProfiles" : [ ],
"propertySources" : [ {
"name" : "systemProperties"
}, {
"name" : "systemEnvironment"
}, {
"name" : "applicationConfig: [classpath:/application.properties]",
"property" : {
"value" : "1000",
"origin" : "class path resource [application.properties]:1:29"
}
} ]
}
The response contains details of the requested property. The following table describes the structure
of the response:
16
Path Type Description
17
Chapter 7. Flyway (flyway)
The flyway endpoint provides information about database migrations performed by Flyway.
HTTP/1.1 200 OK
Content-Type: application/vnd.spring-boot.actuator.v2+json;charset=UTF-8
Content-Length: 506
{
"contexts" : {
"application" : {
"flywayBeans" : {
"flyway" : {
"migrations" : [ {
"type" : "SQL",
"checksum" : 0,
"version" : "1",
"description" : "init",
"script" : "V1__init.sql",
"state" : "SUCCESS",
"installedBy" : "SA",
"installedOn" : "2018-04-04T12:06:49.403Z",
"installedRank" : 1,
"executionTime" : 0
} ]
}
}
}
}
}
The response contains details of the application’s Flyway migrations. The following table describes
the structure of the response:
18
Path Type Description
19
Chapter 8. Health (health)
The health endpoint provides detailed information about the health of the application.
HTTP/1.1 200 OK
Content-Type: application/vnd.spring-boot.actuator.v2+json;charset=UTF-8
Content-Length: 385
{
"status" : "UP",
"details" : {
"diskSpaceHealthIndicator" : {
"status" : "UP",
"details" : {
"total" : 78188351488,
"free" : 41240719360,
"threshold" : 10485760
}
},
"dataSourceHealthIndicator" : {
"status" : "UP",
"details" : {
"database" : "HSQL Database Engine",
"hello" : 1
}
}
}
}
The response contains details of the health of the application. The following table describes the
structure of the response:
20
Path Type Description
21
Chapter 9. Heap Dump (heapdump)
The heapdump endpoint provides a heap dump from the application’s JVM.
$ curl 'http://localhost:8080/actuator/heapdump' -O
The preceding example results in a file named heapdump being written to the current working
directory.
22
Chapter 10. HTTP Trace (httptrace)
The httptrace endpoint provides information about HTTP request-response exchanges.
HTTP/1.1 200 OK
Content-Type: application/vnd.spring-boot.actuator.v2+json;charset=UTF-8
Content-Length: 503
{
"traces" : [ {
"timestamp" : "2018-04-04T12:06:52.010Z",
"principal" : {
"name" : "alice"
},
"session" : {
"id" : "b850cd8b-1953-430d-ae51-9c74b7b73299"
},
"request" : {
"method" : "GET",
"uri" : "https://api.example.com",
"headers" : {
"Accept" : [ "application/json" ]
}
},
"response" : {
"status" : 200,
"headers" : {
"Content-Type" : [ "application/json" ]
}
},
"timeTaken" : 3
} ]
}
The response contains details of the traced HTTP request-response exchanges. The following table
describes the structure of the response:
23
Path Type Description
24
Chapter 11. Info (info)
The info endpoint provides general information about the application.
HTTP/1.1 200 OK
Content-Type: application/vnd.spring-boot.actuator.v2+json;charset=UTF-8
Content-Length: 235
{
"git" : {
"commit" : {
"time" : "+50226-12-29T18:39:16Z",
"id" : "df027cf"
},
"branch" : "master"
},
"build" : {
"version" : "1.0.3",
"artifact" : "application",
"group" : "com.example"
}
}
The response contains general information about the application. Each section of the response is
contributed by an InfoContributor. Spring Boot provides build and git contributions.
The following table describe the structure of the build section of the response:
25
Path Type Description
The following table describes the structure of the git section of the response:
26
Chapter 12. Liquibase (liquibase)
The liquibase endpoint provides information about database change sets applied by Liquibase.
HTTP/1.1 200 OK
Content-Type: application/vnd.spring-boot.actuator.v2+json;charset=UTF-8
Content-Length: 688
{
"contexts" : {
"application" : {
"liquibaseBeans" : {
"liquibase" : {
"changeSets" : [ {
"author" : "marceloverdijk",
"changeLog" : "classpath:/db/changelog/db.changelog-master.yaml",
"comments" : "",
"contexts" : [ ],
"dateExecuted" : "2018-04-04T12:06:04.303Z",
"deploymentId" : "2843564290",
"description" : "createTable tableName=customer",
"execType" : "EXECUTED",
"id" : "1",
"labels" : [ ],
"checksum" : "7:0cfbff0a94f5ba816ab56eaca6b8affc",
"orderExecuted" : 1
} ]
}
}
}
}
}
The response contains details of the application’s Liquibase change sets. The following table
describes the structure of the response:
27
Path Type Description
28
Chapter 13. Log File (logfile)
The logfile endpoint provides access to the contents of the application’s log file.
HTTP/1.1 200 OK
Accept-Ranges: bytes
Content-Type: text/plain
Content-Length: 4723
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot ::
29
2017-08-08 17:12:31.978 INFO 19866 --- [ost-startStop-1]
o.s.web.context.ContextLoader : Root WebApplicationContext: initialization
completed in 1028 ms
2017-08-08 17:12:32.080 INFO 19866 --- [ost-startStop-1]
o.s.b.w.servlet.ServletRegistrationBean : Mapping servlet: 'dispatcherServlet' to [/]
2017-08-08 17:12:32.084 INFO 19866 --- [ost-startStop-1]
o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'characterEncodingFilter'
to: [/*]
2017-08-08 17:12:32.084 INFO 19866 --- [ost-startStop-1]
o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'hiddenHttpMethodFilter'
to: [/*]
2017-08-08 17:12:32.084 INFO 19866 --- [ost-startStop-1]
o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'httpPutFormContentFilter'
to: [/*]
2017-08-08 17:12:32.084 INFO 19866 --- [ost-startStop-1]
o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'requestContextFilter' to:
[/*]
2017-08-08 17:12:32.349 INFO 19866 --- [ main]
s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for @ControllerAdvice:
org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicati
onContext@76b10754: startup date [Tue Aug 08 17:12:30 BST 2017]; root of context
hierarchy
2017-08-08 17:12:32.420 INFO 19866 --- [ main]
s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public
org.springframework.http.ResponseEntity<java.util.Map<java.lang.String,
java.lang.Object>>
org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController.error(ja
vax.servlet.http.HttpServletRequest)
2017-08-08 17:12:32.421 INFO 19866 --- [ main]
s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}"
onto public org.springframework.web.servlet.ModelAndView
org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController.errorHtm
l(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
2017-08-08 17:12:32.444 INFO 19866 --- [ main]
o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/webjars/**] onto handler
of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2017-08-08 17:12:32.444 INFO 19866 --- [ main]
o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**] onto handler of type
[class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2017-08-08 17:12:32.471 INFO 19866 --- [ main]
o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**/favicon.ico] onto
handler of type [class
org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2017-08-08 17:12:32.600 INFO 19866 --- [ main]
o.s.w.s.v.f.FreeMarkerConfigurer : ClassTemplateLoader for Spring macros added
to FreeMarker configuration
2017-08-08 17:12:32.681 INFO 19866 --- [ main]
o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on
startup
2017-08-08 17:12:32.744 INFO 19866 --- [ main]
o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http)
30
2017-08-08 17:12:32.750 INFO 19866 --- [ main]
s.f.SampleWebFreeMarkerApplication : Started SampleWebFreeMarkerApplication in
2.172 seconds (JVM running for 2.479)
Retrieving part of the log file is not supported when using Jersey.
To retrieve part of the log file, make a GET request to /actuator/logfile by using the Range header, as
shown in the following curl-based example:
The preceding example retrieves the first 1024 bytes of the log file. The resulting response is similar
to the following:
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot ::
31
Chapter 14. Loggers (loggers)
The loggers endpoint provides access to the application’s loggers and the configuration of their
levels.
HTTP/1.1 200 OK
Content-Type: application/vnd.spring-boot.actuator.v2+json;charset=UTF-8
Content-Length: 283
{
"levels" : [ "OFF", "FATAL", "ERROR", "WARN", "INFO", "DEBUG", "TRACE" ],
"loggers" : {
"ROOT" : {
"configuredLevel" : "INFO",
"effectiveLevel" : "INFO"
},
"com.example" : {
"configuredLevel" : "DEBUG",
"effectiveLevel" : "DEBUG"
}
}
}
The response contains details of the application’s loggers. The following table describes the
structure of the response:
32
14.2. Retrieving a Single Logger
To retrieve a single logger, make a GET request to /actuator/loggers/{logger.name}, as shown in the
following curl-based example:
The preceding example retrieves information about the logger named com.example. The resulting
response is similar to the following:
HTTP/1.1 200 OK
Content-Disposition: inline;filename=f.txt
Content-Type: application/vnd.spring-boot.actuator.v2+json;charset=UTF-8
Content-Length: 61
{
"configuredLevel" : "INFO",
"effectiveLevel" : "INFO"
}
The response contains details of the requested logger. The following table describes the structure of
the response:
The preceding example sets the configuredLevel of the com.example logger to DEBUG.
The request specifies the desired level of the logger. The following table describes the structure of
33
the request:
The preceding example clears the configured level of the com.example logger.
34
Chapter 15. Mappings (mappings)
The mappings endpoint provides information about the application’s request mappings.
HTTP/1.1 200 OK
Content-Type: application/vnd.spring-boot.actuator.v2+json;charset=UTF-8
Transfer-Encoding: chunked
Date: Wed, 04 Apr 2018 12:06:57 GMT
Content-Length: 6502
{
"contexts" : {
"application" : {
"mappings" : {
"dispatcherServlets" : {
"dispatcherServlet" : [ {
"handler" : "ResourceHttpRequestHandler [locations=[class path resource
[META-INF/resources/], class path resource [resources/], class path resource
[static/], class path resource [public/], ServletContext resource [/], class path
resource []],
resolvers=[org.springframework.web.servlet.resource.PathResourceResolver@a57a36b]]",
"predicate" : "/**/favicon.ico"
}, {
"handler" : "public java.lang.Object
org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMap
ping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.
lang.String, java.lang.String>)",
"predicate" :
"{[/actuator/mappings],methods=[GET],produces=[application/vnd.spring-
boot.actuator.v2+json || application/json]}",
"details" : {
"handlerMethod" : {
"className" :
"org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMa
pping.OperationHandler",
"name" : "handle",
"descriptor" :
"(Ljavax/servlet/http/HttpServletRequest;Ljava/util/Map;)Ljava/lang/Object;"
},
35
"requestMappingConditions" : {
"consumes" : [ ],
"headers" : [ ],
"methods" : [ "GET" ],
"params" : [ ],
"patterns" : [ "/actuator/mappings" ],
"produces" : [ {
"mediaType" : "application/vnd.spring-boot.actuator.v2+json",
"negated" : false
}, {
"mediaType" : "application/json",
"negated" : false
} ]
}
}
}, {
"handler" : "protected java.util.Map<java.lang.String,
java.util.Map<java.lang.String, org.springframework.boot.actuate.endpoint.web.Link>>
org.springframework.boot.actuate.endpoint.web.servlet.WebMvcEndpointHandlerMapping.lin
ks(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)",
"predicate" :
"{[/actuator],methods=[GET],produces=[application/vnd.spring-boot.actuator.v2+json ||
application/json]}",
"details" : {
"handlerMethod" : {
"className" :
"org.springframework.boot.actuate.endpoint.web.servlet.WebMvcEndpointHandlerMapping",
"name" : "links",
"descriptor" :
"(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)Ljav
a/util/Map;"
},
"requestMappingConditions" : {
"consumes" : [ ],
"headers" : [ ],
"methods" : [ "GET" ],
"params" : [ ],
"patterns" : [ "/actuator" ],
"produces" : [ {
"mediaType" : "application/vnd.spring-boot.actuator.v2+json",
"negated" : false
}, {
"mediaType" : "application/json",
"negated" : false
} ]
}
}
}, {
"handler" : "public java.lang.String
org.springframework.boot.actuate.autoconfigure.endpoint.web.documentation.MappingsEndp
ointServletDocumentationTests$ExampleController.example()",
36
"predicate" : "{[/],methods=[POST],params=[a!=alpha],headers=[X-
Custom=Foo],consumes=[application/json || !application/xml],produces=[text/plain]}",
"details" : {
"handlerMethod" : {
"className" :
"org.springframework.boot.actuate.autoconfigure.endpoint.web.documentation.MappingsEnd
pointServletDocumentationTests.ExampleController",
"name" : "example",
"descriptor" : "()Ljava/lang/String;"
},
"requestMappingConditions" : {
"consumes" : [ {
"mediaType" : "application/json",
"negated" : false
}, {
"mediaType" : "application/xml",
"negated" : true
} ],
"headers" : [ {
"name" : "X-Custom",
"value" : "Foo",
"negated" : false
} ],
"methods" : [ "POST" ],
"params" : [ {
"name" : "a",
"value" : "alpha",
"negated" : true
} ],
"patterns" : [ "/" ],
"produces" : [ {
"mediaType" : "text/plain",
"negated" : false
} ]
}
}
}, {
"handler" : "ResourceHttpRequestHandler [locations=[class path resource
[META-INF/resources/webjars/]],
resolvers=[org.springframework.web.servlet.resource.PathResourceResolver@230b64d]]",
"predicate" : "/webjars/**"
}, {
"handler" : "ResourceHttpRequestHandler [locations=[class path resource
[META-INF/resources/], class path resource [resources/], class path resource
[static/], class path resource [public/], ServletContext resource [/]],
resolvers=[org.springframework.web.servlet.resource.PathResourceResolver@437c667]]",
"predicate" : "/**"
} ]
},
"servletFilters" : [ {
"servletNameMappings" : [ ],
37
"urlPatternMappings" : [ "/*" ],
"name" : "requestContextFilter",
"className" :
"org.springframework.boot.web.servlet.filter.OrderedRequestContextFilter"
}, {
"servletNameMappings" : [ ],
"urlPatternMappings" : [ "/*" ],
"name" : "httpPutFormContentFilter",
"className" :
"org.springframework.boot.web.servlet.filter.OrderedHttpPutFormContentFilter"
}, {
"servletNameMappings" : [ ],
"urlPatternMappings" : [ "/*" ],
"name" : "hiddenHttpMethodFilter",
"className" :
"org.springframework.boot.web.servlet.filter.OrderedHiddenHttpMethodFilter"
} ],
"servlets" : [ {
"mappings" : [ ],
"name" : "default",
"className" : "org.apache.catalina.servlets.DefaultServlet"
}, {
"mappings" : [ "/" ],
"name" : "dispatcherServlet",
"className" : "org.springframework.web.servlet.DispatcherServlet"
} ]
}
}
}
}
The response contains details of the application’s mappings. The items found in the response
depend on the type of web application (reactive or Servlet-based). The following table describes the
structure of the common elements of the response:
38
Path Type Description
The entries that may be found in contexts.*.mappings are described in the following sections.
When using Spring MVC, the response contains details of any DispatcherServlet request mappings
beneath contexts.*.mappings.dispatcherServlets. The following table describes the structure of this
section of the response:
39
Path Type Description
When using the Servlet stack, the response contains details of any Servlet mappings beneath
contexts.*.mappings.servlets. The following table describes the structure of this section of the
response:
When using the Servlet stack, the response contains details of any Filter mappings beneath
contexts.*.mappings.servletFilters. The following table describes the structure of this section of
the response:
40
Path Type Description
When using Spring WebFlux, the response contains details of any DispatcherHandler request
mappings beneath contexts.*.mappings.dispatcherHandlers. The following table describes the
structure of this section of the response:
41
Path Type Description
42
Chapter 16. Metrics (metrics)
The metrics endpoint provides access to application metrics.
HTTP/1.1 200 OK
Content-Type: application/vnd.spring-boot.actuator.v2+json;charset=UTF-8
Content-Length: 154
{
"names" : [ "jvm.memory.max", "jvm.memory.committed", "jvm.buffer.memory.used",
"jvm.memory.used", "jvm.buffer.count", "jvm.buffer.total.capacity" ]
}
The response contains details of the metric names. The following table describes the structure of
the response:
The preceding example retrieves information about the metric named jvm.memory.max. The resulting
response is similar to the following:
43
HTTP/1.1 200 OK
Content-Disposition: inline;filename=f.txt
Content-Type: application/vnd.spring-boot.actuator.v2+json;charset=UTF-8
Content-Length: 352
{
"name" : "jvm.memory.max",
"measurements" : [ {
"statistic" : "VALUE",
"value" : 2.377121791E9
} ],
"availableTags" : [ {
"tag" : "area",
"values" : [ "heap", "nonheap" ]
}, {
"tag" : "id",
"values" : [ "Compressed Class Space", "PS Old Gen", "PS Survivor Space",
"Metaspace", "PS Eden Space", "Code Cache" ]
} ]
}
The endpoint uses query parameters to drill down into a metric by using its tags. The following
table shows the single supported query parameter:
Parameter Description
The response contains details of the metric. The following table describes the structure of the
response:
44
Path Type Description
$ curl
'http://localhost:8080/actuator/metrics/jvm.memory.max?tag=area%3Anonheap&tag=id%3ACom
pressed+Class+Space' -i -X GET
The preceding example retrieves the jvm.memory.max metric, where the area tag has a value of
nonheap and the id attribute has a value of Compressed Class Space. The resulting response is similar
to the following:
HTTP/1.1 200 OK
Content-Disposition: inline;filename=f.txt
Content-Type: application/vnd.spring-boot.actuator.v2+json;charset=UTF-8
Content-Length: 141
{
"name" : "jvm.memory.max",
"measurements" : [ {
"statistic" : "VALUE",
"value" : 1.073741824E9
} ],
"availableTags" : [ ]
}
45
Chapter 17. Prometheus (prometheus)
The prometheus endpoint provides Spring Boot application’s metrics in the format required for
scraping by a Prometheus server.
46
HTTP/1.1 200 OK
Content-Type: text/plain;version=0.0.4;charset=utf-8
Content-Length: 2337
47
Chapter 18. Scheduled Tasks (scheduledtasks)
The scheduledtasks endpoint provides information about the application’s scheduled tasks.
HTTP/1.1 200 OK
Content-Type: application/vnd.spring-boot.actuator.v2+json;charset=UTF-8
Content-Length: 451
{
"cron" : [ {
"runnable" : {
"target" : "com.example.Processor.processOrders"
},
"expression" : "0 0 0/3 1/1 * ?"
} ],
"fixedDelay" : [ {
"runnable" : {
"target" : "com.example.Processor.purge"
},
"initialDelay" : 5000,
"interval" : 5000
} ],
"fixedRate" : [ {
"runnable" : {
"target" : "com.example.Processor.retrieveIssues"
},
"initialDelay" : 10000,
"interval" : 3000
} ]
}
The response contains details of the application’s scheduled tasks. The following table describes the
structure of the response:
48
Path Type Description
49
Chapter 19. Sessions (sessions)
The sessions endpoint provides information about the application’s HTTP sessions that are
managed by Spring Session.
The preceding examples retrieves all of the sessions for the user whose username is alice.
HTTP/1.1 200 OK
Content-Type: application/vnd.spring-boot.actuator.v2+json;charset=UTF-8
Content-Length: 753
{
"sessions" : [ {
"id" : "209b6abc-24ae-451e-8896-f7f417f3016e",
"attributeNames" : [ ],
"creationTime" : "2018-04-04T00:06:59.598Z",
"lastAccessedTime" : "2018-04-04T12:06:14.598Z",
"maxInactiveInterval" : 1800,
"expired" : false
}, {
"id" : "4db5efcc-99cb-4d05-a52c-b49acfbb7ea9",
"attributeNames" : [ ],
"creationTime" : "2018-04-04T07:06:59.598Z",
"lastAccessedTime" : "2018-04-04T12:06:22.598Z",
"maxInactiveInterval" : 1800,
"expired" : false
}, {
"id" : "64dc199d-9033-445f-b6be-2d001e40bb16",
"attributeNames" : [ ],
"creationTime" : "2018-04-04T10:06:59.598Z",
"lastAccessedTime" : "2018-04-04T12:06:47.598Z",
"maxInactiveInterval" : 1800,
"expired" : false
} ]
}
50
19.1.1. Query Parameters
The endpoint uses query parameters to limit the sessions that it returns. The following table shows
the single required query parameter:
Parameter Description
The response contains details of the matching sessions. The following table describes the structure
of the response:
$ curl 'http://localhost:8080/actuator/sessions/4db5efcc-99cb-4d05-a52c-b49acfbb7ea9'
-i -X GET
51
HTTP/1.1 200 OK
Content-Type: application/vnd.spring-boot.actuator.v2+json;charset=UTF-8
Content-Length: 228
{
"id" : "4db5efcc-99cb-4d05-a52c-b49acfbb7ea9",
"attributeNames" : [ ],
"creationTime" : "2018-04-04T07:06:59.598Z",
"lastAccessedTime" : "2018-04-04T12:06:22.598Z",
"maxInactiveInterval" : 1800,
"expired" : false
}
The response contains details of the requested session. The following table describes the structure
of the response:
$ curl 'http://localhost:8080/actuator/sessions/4db5efcc-99cb-4d05-a52c-b49acfbb7ea9'
-i -X DELETE
52
Chapter 20. Shutdown (shutdown)
The shutdown endpoint is used to shut down the application.
HTTP/1.1 200 OK
Content-Type: application/vnd.spring-boot.actuator.v2+json;charset=UTF-8
Content-Length: 41
{
"message" : "Shutting down, bye..."
}
The response contains details of the result of the shutdown request. The following table describes
the structure of the response:
53
Chapter 21. Thread Dump (threaddump)
The threaddump endpoint provides a thread dump from the application’s JVM.
HTTP/1.1 200 OK
Content-Type: application/vnd.spring-boot.actuator.v2+json;charset=UTF-8
Content-Length: 4520
{
"threads" : [ {
"threadName" : "Thread-201",
"threadId" : 544,
"blockedTime" : -1,
"blockedCount" : 0,
"waitedTime" : -1,
"waitedCount" : 1,
"lockOwnerId" : -1,
"inNative" : false,
"suspended" : false,
"threadState" : "TIMED_WAITING",
"stackTrace" : [ {
"methodName" : "sleep",
"fileName" : "Thread.java",
"lineNumber" : -2,
"className" : "java.lang.Thread",
"nativeMethod" : true
}, {
"methodName" : "performShutdown",
"fileName" : "ShutdownEndpoint.java",
"lineNumber" : 67,
"className" : "org.springframework.boot.actuate.context.ShutdownEndpoint",
"nativeMethod" : false
}, {
"methodName" : "run",
"lineNumber" : -1,
"className" :
"org.springframework.boot.actuate.context.ShutdownEndpoint$$Lambda$1115/836304762",
"nativeMethod" : false
}, {
54
"methodName" : "run",
"fileName" : "Thread.java",
"lineNumber" : 748,
"className" : "java.lang.Thread",
"nativeMethod" : false
} ],
"lockedMonitors" : [ ],
"lockedSynchronizers" : [ ]
}, {
"threadName" : "pool-16-thread-1",
"threadId" : 539,
"blockedTime" : -1,
"blockedCount" : 0,
"waitedTime" : -1,
"waitedCount" : 2,
"lockName" :
"java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject@35550d77",
"lockOwnerId" : -1,
"inNative" : false,
"suspended" : false,
"threadState" : "TIMED_WAITING",
"stackTrace" : [ {
"methodName" : "park",
"fileName" : "Unsafe.java",
"lineNumber" : -2,
"className" : "sun.misc.Unsafe",
"nativeMethod" : true
}, {
"methodName" : "parkNanos",
"fileName" : "LockSupport.java",
"lineNumber" : 215,
"className" : "java.util.concurrent.locks.LockSupport",
"nativeMethod" : false
}, {
"methodName" : "awaitNanos",
"fileName" : "AbstractQueuedSynchronizer.java",
"lineNumber" : 2078,
"className" :
"java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject",
"nativeMethod" : false
}, {
"methodName" : "take",
"fileName" : "ScheduledThreadPoolExecutor.java",
"lineNumber" : 1093,
"className" :
"java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue",
"nativeMethod" : false
}, {
"methodName" : "take",
"fileName" : "ScheduledThreadPoolExecutor.java",
"lineNumber" : 809,
55
"className" :
"java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue",
"nativeMethod" : false
}, {
"methodName" : "getTask",
"fileName" : "ThreadPoolExecutor.java",
"lineNumber" : 1074,
"className" : "java.util.concurrent.ThreadPoolExecutor",
"nativeMethod" : false
}, {
"methodName" : "runWorker",
"fileName" : "ThreadPoolExecutor.java",
"lineNumber" : 1134,
"className" : "java.util.concurrent.ThreadPoolExecutor",
"nativeMethod" : false
}, {
"methodName" : "run",
"fileName" : "ThreadPoolExecutor.java",
"lineNumber" : 624,
"className" : "java.util.concurrent.ThreadPoolExecutor$Worker",
"nativeMethod" : false
}, {
"methodName" : "run",
"fileName" : "Thread.java",
"lineNumber" : 748,
"className" : "java.lang.Thread",
"nativeMethod" : false
} ],
"lockedMonitors" : [ ],
"lockedSynchronizers" : [ ],
"lockInfo" : {
"className" :
"java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject",
"identityHashCode" : 894766455
}
}, {
"threadName" : "http-nio-auto-9-43945-AsyncTimeout",
"threadId" : 535,
"blockedTime" : -1,
"blockedCount" : 0,
"waitedTime" : -1,
"waitedCount" : 5,
"lockOwnerId" : -1,
"inNative" : false,
"suspended" : false,
"threadState" : "TIMED_WAITING",
"stackTrace" : [ {
"methodName" : "sleep",
"fileName" : "Thread.java",
"lineNumber" : -2,
"className" : "java.lang.Thread",
56
"nativeMethod" : true
}, {
"methodName" : "run",
"fileName" : "AbstractProtocol.java",
"lineNumber" : 1133,
"className" : "org.apache.coyote.AbstractProtocol$AsyncTimeout",
"nativeMethod" : false
}, {
"methodName" : "run",
"fileName" : "Thread.java",
"lineNumber" : 748,
"className" : "java.lang.Thread",
"nativeMethod" : false
} ],
"lockedMonitors" : [ ],
"lockedSynchronizers" : [ ]
} ]
}
The response contains details of the JVM’s threads. The following table describes the structure of
the response:
57
Path Type Description
58
Path Type Description
59