Skip to the workspace
Pebellslearn by building
Actuators  ›  Lesson

Actuator Endpoints — A Window Into the Running App

Actuators 12 minActuator provides endpoints such as health, metrics, beans and mappings under /actuator, but only health is exposed over HTTP until you choose more.

spring boot / Actuator Endpoints — A Window Into the Running App

Explore each scene at your own pace.

01 · The rule

The rule

Actuator Endpoints — A Window Into the Running App

library-service is live, and the hosting platform asks a simple question every ten seconds: "Are you alive?" Later, an engineer wants to know which beans loaded, which URLs are mapped, and how much memory is in use, without attaching a debugger to production. Spring Boot Actuator answers all of these through ready-made endpoints.

The rule

Actuator builds many endpoints, but over HTTP it shows only health until you choose more.

Add one starter:

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

Endpoints appear under the /actuator base path. Two separate ideas control them:

  • Enabled means the endpoint exists in the app at all. Most are enabled by default. shutdown is the exception, and it stays off unless you deliberately turn it on.
  • Exposed means it can be reached over a given channel. Over HTTP, only health is exposed by default.

You choose what to expose over the web with one property:

management.endpoints.web.exposure.include=health,info,metrics

A few endpoints worth knowing:

Endpoint Shows
/actuator/health Whether the app and its dependencies are up
/actuator/info Build and app information you choose to publish
/actuator/metrics Measurements such as memory, request timings, pool usage
/actuator/beans Every bean in the application context
/actuator/mappings Every URL mapped to a controller method
/actuator/env Configuration properties and where each came from
/actuator/loggers Log levels, which you can change while running
/actuator/conditions The auto-configuration condition report

You can also move all of them to a separate port, management.server.port=8081, so the public load balancer only ever sees the API port.

Scene 1 of 5
Hover to wake the cannons. Drag to move, or use arrow keys when focused. Press Enter to fire a shot.