Spring Actuator Endpoints1 min read

Actuator Endpoints

There are numerous Actuator Endpoints in Spring Boot, that lets you monitor and manage your Spring Boot Application. Endpoints can be remotely accessed through HTTP by simply prefixing the endpoint with /actuator followed by the ID such as info/loggers.
By default, endpoints are disabled, to enable its use:

management.endpoint.enabled=true

 

1. Maven Dependency for Actuator

To enable Spring Boot Actuator for your project, we’ll just need to add below dependency in our project POM.

<dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-actuator</artifactId>
</dependency>

2. Endpoints Enabled by Default

beans Displays a complete list of all the Spring beans in your application.
conditions Shows the conditions that were evaluated on configuration and auto-configuration classes and the reasons why they did or did not match.
configprops Displays a collated list of all @ConfigurationProperties.
env Exposes properties from Spring’s ConfigurableEnvironment.
flyway Shows any Flyway database migrations that have been applied.
health Shows application health information.
httptrace Displays HTTP trace information (by default, the last 100 HTTP request-response exchanges).
info Displays arbitrary application info.
loggers Shows and modifies the configuration of loggers in the application.
liquibase Shows any Liquibase database migrations that have been applied.
metrics Shows ‘metrics’ information for the current application.
mappings Displays a collated list of all @RequestMapping paths.
scheduledtasks Displays the scheduled tasks in your application.
sessions Allows retrieval and deletion of user sessions from a Spring Session-backed session store. Not available when using Spring Session’s support for reactive web applications.
threaddump Performs a thread dump.

3. Endpoint not enabled by default

shutdown Lets the application be gracefully shutdown.

 

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.