Spring Boot Actuator endpoints are built-in HTTP endpoints that provide operational information about an application, such as health status, metrics, configuration details, and application behavior. They are mainly used for monitoring, troubleshooting, and managing applications in development and production environments.
Key Points
Actuator endpoints expose application health, performance metrics, and runtime information.
They help DevOps and support teams monitor applications without accessing the server directly.
Sensitive endpoints should be secured using Spring Security and proper access controls.
Example
Consider an e-commerce application running in production.
Operations Team wants to know
Is the application running?
What is the memory usage?
How many requests are being processed?
Are database connections healthy?
Actuator endpoints provide this information instantly.
Common Actuator Endpoints
/actuator/health
/actuator/info
/actuator/metrics
/actuator/env
/actuator/beans
/actuator/mappings
/actuator/threaddump
/actuator/heapdump
/actuator/loggers
Most Frequently Used Endpoints
1. Health Endpoint
URL
/actuator/health
Purpose
Displays application health status.
Example Response
{
status": "UP
}
Checks
Database connectivity
Disk space
External service availability
2. Metrics Endpoint
URL
/actuator/metrics
Purpose
Provides performance and usage metrics.
Examples
JVM memory usage
CPU utilization
HTTP request count
Thread pool statistics
3. Info Endpoint
URL
/actuator/info
Purpose
Displays application information.
Examples
Application version
Build information
Environment details
4. Beans Endpoint
URL
/actuator/beans
Purpose
Lists all Spring-managed beans.
5. Mappings Endpoint
URL
/actuator/mappings
Purpose
Displays all available REST endpoints and mappings.
management.endpoints.web.exposure.include=
health,info,metrics
This exposes only selected endpoints.
Expose All Endpoints
management.endpoints.web.exposure.include=*
Production Recommendation
Avoid exposing all endpoints publicly.
Security Best Practices
Protect endpoints using Spring Security.
Restrict access to administrators only.
Enable HTTPS communication.
Expose only required endpoints.
Example
Only expose
health
info
metrics
Restrict
heapdump
env
beans
because they may reveal sensitive information.
Real-World Example
Microservices Environment
Monitoring Tools
Prometheus collects metrics.
Grafana visualizes dashboards.
Kubernetes uses health checks for pod management.
Actuator endpoints provide the data required by these tools.
Benefits
Faster troubleshooting.
Improved observability.
Better system monitoring.
Simplified production support.
Interview Tip
A concise interview answer is: Spring Boot Actuator endpoints are built-in monitoring and management endpoints that expose information such as application health, metrics, environment details, and bean information. They are widely used for monitoring, troubleshooting, and integrating with tools like Prometheus and Grafana, and should always be secured in production environments.