Video in progress
What is Spring Boot Actuator, and what does /actuator/health show?
Actuator is a set of ready-made endpoints for monitoring the application: health, metrics, info, loggers and more. /actuator/health shows whether the application and its dependencies (database, disk, Redis) are alive.
📖 Answer
You add spring-boot-starter-actuator and:
curl localhost:8080/actuator/health
{"status":"UP"}
Health is made up of several indicators: db (database connection), diskSpace, redis and so on. If one is DOWN, the overall status is DOWN too and HTTP 503 comes back — a load balancer or Kubernetes routes traffic based on that.
By default only health is exposed over the web. To turn on others:
management:
endpoints:
web:
exposure:
include: health,info,metrics,prometheus
endpoint:
health:
show-details: when-authorized
Be careful: endpoints like env, heapdump and loggers expose sensitive data or change the application. Don't open them to the internet — hide them behind a separate port (management.server.port) or authentication.
Sign up to mark studied questions and save your progress.