Actuator
Master Spring Boot Actuator — the production-ready features for health checks, metrics, info, and management endpoints that every enterprise Spring Boot application needs.
Last reviewed: January 2025
🔍 What Is It?
Spring Boot Actuator provides HTTP endpoints for monitoring and managing your application.
Key endpoints:
- →
/actuator/health— application health (UP/DOWN) + component details - →
/actuator/metrics— metrics (JVM, HTTP, DB connection pool, custom) - →
/actuator/info— application info (version, build time) - →
/actuator/env— all environment properties (sensitive!) - →
/actuator/loggers— view and change log levels at runtime - →
/actuator/threaddump— thread dump for debugging - →
/actuator/heapdump— heap dump for memory analysis - →
/actuator/prometheus— Prometheus-format metrics scraping - →
/actuator/shutdown— graceful shutdown (disabled by default) - →
/actuator/refresh— refresh @RefreshScope beans (Spring Cloud)
Kubernetes integration:
- →
/actuator/health/liveness— is the app alive? (restart if DOWN) - →
/actuator/health/readiness— is the app ready for traffic? (remove from load balancer if DOWN)
🎯 Why Do We Need It?
Production applications need observability:
- →Kubernetes needs /health for liveness and readiness probes
- →Prometheus scrapes /actuator/prometheus for metrics
- →Operations team needs /actuator/loggers to debug without restart
- →Security team needs /actuator/env to verify config (access-controlled)
- →On-call engineers need /actuator/threaddump for deadlock debugging
🏗️ What Happens in Real Projects?
Every production Spring Boot service exposes:
- →/actuator/health for Kubernetes probes
- →/actuator/prometheus for Prometheus/Grafana metrics
- →/actuator/info for deployment tracking
- →/actuator/loggers for runtime log level changes
⚙️ How It Works
Actuator endpoints are auto-configured when spring-boot-starter-actuator is on the classpath. Each endpoint is a Spring MVC (or WebFlux) controller. You control which are enabled and which are exposed via HTTP through properties.
💻 Example
Actuator Configuration — Secure Actuator setup for production with Kubernetes probes.
🤔 Common Confusions
❓ What is the difference between liveness and readiness probes?
Liveness: is the app alive? If DOWN, Kubernetes restarts the pod. Use for deadlocks or unrecoverable states. Readiness: is the app ready to serve traffic? If DOWN, Kubernetes removes the pod from the load balancer but doesn't restart it. Use for temporary unavailability (DB connection lost, cache warming). Spring Boot maps these to /actuator/health/liveness and /actuator/health/readiness.
❓ Are Actuator endpoints secure by default?
Only /actuator/health and /actuator/info are exposed by default. Others must be explicitly enabled. But even /actuator/health can expose sensitive info (DB credentials in error messages) with show-details=always. Always secure Actuator endpoints with authentication or IP restriction in production.
🚨 Common Production Issues
/actuator/env exposed publicly showing database passwords and API keys
Health endpoint returning DOWN due to a non-critical component (cache) causing unnecessary Kubernetes restarts
Liveness probe too aggressive — restarting pods during high load instead of waiting
No readiness probe — traffic routed to pods that aren't ready yet
✅ Best Practices
Only expose health, info, metrics, prometheus in production
Secure Actuator endpoints with IP restriction or authentication
Use separate liveness and readiness probes in Kubernetes
Configure health groups — separate critical from non-critical health checks
Add custom health indicators for external dependencies
Use /actuator/loggers to change log levels in production without restart
🏛️ Architect's Note
Actuator + Micrometer + Prometheus + Grafana is the standard observability stack for Spring Boot in production. Actuator exposes metrics, Micrometer translates them to Prometheus format, Prometheus scrapes and stores them, Grafana visualizes them. Spring Boot auto-configures all of this — add spring-boot-starter-actuator and micrometer-registry-prometheus and you have metrics in Grafana in minutes.
💬 Frequently Asked Questions
🎯 Key Takeaways
🔗 Related Topics
🎯 Practice this topic in interviews
↗ Where this topic fits
Spring Boot Technology Guide
Return to the Spring Boot learning hub.
Backend Engineer Career Path
A structured journey through Core Java, Spring Boot, production backend engineering, and interview preparation.
Full Stack Java Developer Career Path
A guided route through frontend foundations, Java backend engineering, delivery workflows, and interview readiness.
Sources
Sources / References
Use these Spring Boot references to verify the concept in official docs and continue into the most relevant SplashRide pages.
Official documentation
Related SplashRide pages
SplashRide Spring Boot learning path
Browse the full Spring Boot topic collection and learning order on SplashRide.
Spring Boot Interview Prep
Practice Spring Boot interview questions and scenario-based answers.
Backend Engineer Career Path
A structured journey through Core Java, Spring Boot, production backend engineering, and interview preparation.
Full Stack Java Developer Career Path
A guided route through frontend foundations, Java backend engineering, delivery workflows, and interview readiness.
Monitoring
Implement production monitoring for Spring Boot applications — Micrometer metrics, Prometheus integration, Grafana dashboards, and distributed tracing with Micrometer Tracing.
Profiles
Master Spring Profiles for environment-specific configuration — separating dev, test, staging, and production settings without code changes.