The spring-boot-starter-actuator dependency adds production-ready monitoring and management features to a Spring Boot application. It exposes operational endpoints such as health, metrics, info and loggers over HTTP and JMX, and integrates with Micrometer to publish metrics to systems like Prometheus. With it you can answer "is the app up, what is it doing, and how is it performing" without writing that code yourself.
By default only a few endpoints are exposed over the web, because many of them can reveal sensitive data. You choose which ones to expose and secure them.
Add one dependency to a Maven project:
For Gradle, use implementation 'org.springframework.boot:spring-boot-starter-actuator'. The version comes from the Spring Boot BOM. After starting the app, /actuator lists the available links, and /actuator/health returns the status.
| Endpoint | Purpose |
|---|---|
health | Application and dependency status such as database, disk and message broker |
info | Custom application info, build and git details |
metrics | Names and values of Micrometer meters (JVM, HTTP, datasource) |
prometheus | Metrics in Prometheus format, needs micrometer-registry-prometheus |
loggers | View and change log levels at runtime |
env and configprops | Configuration properties and environment, sensitive |
beans and mappings | Spring beans and request mappings |
threaddump and heapdump | Diagnostics for performance incidents |
httpexchanges | Recent HTTP request and response exchanges, needs a repository bean |
shutdown | Graceful shutdown, disabled by default |
A health request returns JSON like this:
Over HTTP, only health is exposed by default in current Spring Boot versions. Expose more in application.yml:
Setting management.server.port runs the endpoints on a separate port, which you can keep off the public internet. Never expose env, heapdump, configprops or shutdown to untrusted users: they can leak secrets, memory contents or stop the service.
With Spring Security on the classpath, restrict the endpoints by role:
Health and info are open for load balancers and monitors, and everything else needs the OPS role.
The health endpoint aggregates HealthIndicator beans. Spring Boot auto-configures indicators for the datasource, disk space, Redis, Kafka and more when those are present. With management.endpoint.health.probes.enabled=true it also provides /actuator/health/liveness and /actuator/health/readiness, which map directly to Kubernetes liveness and readiness probes.
Add your own indicator for an external dependency:
The indicator name in the response is derived from the class name, here paymentGateway. Keep checks fast, since monitoring tools poll them often.
Actuator uses Micrometer as its metrics facade. Add a registry dependency, for example micrometer-registry-prometheus, expose the prometheus endpoint and your monitoring system can scrape it. You can record custom metrics through MeterRegistry:
Recent Spring Boot versions build on the Micrometer Observation API, so one instrumentation can produce both metrics and traces.
Most endpoints are enabled except shutdown, but only health is exposed over HTTP by default. Use management.endpoints.web.exposure.include to expose others.
Yes if you secure it: expose the minimum, protect sensitive endpoints with authentication, and consider a separate management port.
Set management.endpoints.web.base-path, for example to /management. Moving it does not replace authentication.
Enable probes and point the liveness and readiness checks at /actuator/health/liveness and /actuator/health/readiness.
spring-boot-starter-actuator provides health, metrics, info, logger and diagnostic endpoints with minimal setup. Expose only what you need, secure sensitive endpoints, use probe groups for Kubernetes, add custom health indicators for external dependencies, and publish Micrometer metrics to your monitoring system.