Download the PHP package sbasu/laravel-actuator without Composer
On this page you can find all versions of the php package sbasu/laravel-actuator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download sbasu/laravel-actuator
More information about sbasu/laravel-actuator
Files in sbasu/laravel-actuator
Package laravel-actuator
Short Description Spring Boot Actuator-like monitoring and management for Laravel applications
License MIT
Homepage https://github.com/sbasu/laravel-actuator
Informations about the package laravel-actuator
Laravel Actuator
Spring Boot Actuator-like monitoring endpoints for Laravel applications.
Overview
Laravel Actuator provides production-ready HTTP endpoints to monitor and manage your Laravel application. Inspired by Spring Boot Actuator, it brings enterprise-grade monitoring to Laravel.
Get instant visibility into your app's health, performance metrics, and configuration.
Why Laravel Actuator?
- Production Ready — Know your app's health in real-time
- Kubernetes Compatible — Built for container orchestration (liveness/readiness probes)
- Zero Configuration — Works out of the box with sensible defaults
- Comprehensive Health Checks — Database, cache, queue, disk space
- Live Metrics — Memory usage, request timing, database statistics
- DevOps Friendly — Standard endpoints for monitoring systems and dashboards
- Spring Boot Compatible — Familiar if you know Spring Boot Actuator
Requirements
- PHP: 8.1 or higher
- Laravel: 10, 11, 12, or 13+
- Composer: For package installation
Installation
Step 1: Install via Composer
Step 2: Publish Configuration (Required)
This creates config/actuator.php in your application where you can customize behavior.
Step 3: Verify Installation
Start your Laravel server:
Test the health endpoint:
You should see a JSON response with status "UP".
Usage
Once installed and configured, your Laravel app automatically has monitoring endpoints available.
1. Health Check Endpoint
Check if your application and all dependencies are healthy.
Request:
Response:
Use Cases:
- Kubernetes liveness probes (restart unhealthy pods)
- Kubernetes readiness probes (route traffic only to ready pods)
- Load balancer health checks
- Monitoring dashboards
- CI/CD deployment verification
2. Metrics Endpoint
List available performance metrics and monitoring data.
Request:
Response:
Use Cases:
- Integration with Prometheus/Grafana
- Performance monitoring
- Identifying bottlenecks
- Tracking resource usage
3. Application Info Endpoint
Get metadata about your application.
Request:
Response:
Use Cases:
- Verify deployment version
- Check environment configuration
- CI/CD pipeline information
- Application identification
4. Environment Variables Endpoint
View environment configuration. Disabled by default for security.
Enabling the Endpoint
Follow these steps to enable (development environments only):
Step 1: Open your .env file
Step 2: Add this line
ACTUATOR_SHOW_ENV=true
Step 3: Restart your server
Step 4: Test the endpoint
Example Response
⚠️ Security Warning
NEVER enable this endpoint in production!
Environment variables may contain:
- Database passwords
- API keys
- Encryption keys
- OAuth tokens
- Third-party service credentials
Only enable in development environments.
Configuration
Edit config/actuator.php to customize the package behavior:
Configuration Options
| Option | Default | Purpose |
|---|---|---|
path |
actuator |
URI prefix for endpoints |
middleware |
['api'] |
Middleware to apply |
indicators.database |
true |
Enable database health check |
indicators.disk_space |
true |
Enable disk space check |
indicators.cache |
true |
Enable cache health check |
indicators.queue |
true |
Enable queue health check |
show_details |
true |
Show detailed health info |
show_env |
false |
Enable environment endpoint |
log_access |
false |
Log endpoint requests |
Real-World Examples
Kubernetes Deployment
Docker Health Check
Prometheus Monitoring
Load Balancer Health Check (Nginx)
Endpoints Reference
| Endpoint | Method | Purpose | Returns | Status |
|---|---|---|---|---|
/actuator/health |
GET | Application health | JSON with status | 200/503 |
/actuator/metrics |
GET | Available metrics | JSON array | 200 |
/actuator/info |
GET | App information | JSON metadata | 200 |
/actuator/env |
GET | Environment variables | JSON config | 200/403 |
Security Best Practices
Health Endpoints
- ✅ Public by default (no authentication required)
- ✅ No sensitive data exposed
- ✅ Safe to expose to monitoring systems
- ✅ Include in Kubernetes probes
Environment Endpoint
- ⚠️ Disabled by default for security
- ⚠️ Only enable in development environments
- ⚠️ Never enable in production
- ⚠️ Can expose sensitive configuration
Protecting Endpoints
If you want authentication on actuator endpoints, edit config/actuator.php:
Option 1: Require API Authentication
Option 2: Rate Limiting
Option 3: Custom Middleware
Troubleshooting
Endpoints Return 404
Problem: Getting "Route not found" when accessing endpoints
Solution: You must publish the configuration first
Then restart your server.
Config File Not Found
Problem: config/actuator.php doesn't exist
Solution: Run the publish command
Database Shows DOWN
Problem: Health check returns database status as DOWN
Solution: Check your database connection
Cannot Enable /env Endpoint
Problem: Still get 403 when ACTUATOR_SHOW_ENV=true
Solution: Restart your server after editing .env
Roadmap
This is the first in a series of Spring Boot → Laravel packages bringing enterprise patterns to Laravel:
- ✅ Laravel Actuator v1.0 — Health checks & monitoring
- 🔄 Laravel Profiles — Environment-specific configuration
- 🔄 Laravel Repository — Data access abstraction layer
- 🔄 Laravel Events — Advanced event bus
- 🔄 Laravel Scheduler — Improved task scheduling
Follow @sbasu on GitHub for updates.
Support
- Issues: github.com/sbasu/laravel-actuator/issues
- Discussions: github.com/sbasu/laravel-actuator/discussions
- GitHub: github.com/sbasu/laravel-actuator
Reporting Issues
Found a bug or have a suggestion?
- 🐛 Report Bugs: GitHub Issues
- ✨ Request Features: GitHub Issues
- 💬 Ask Questions: GitHub Discussions
Please include details like:
- Laravel and PHP version
- Steps to reproduce
- Expected vs actual behavior
- Error messages or logs
The more information you provide, the faster we can help!
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
The MIT License (MIT). Please see LICENSE file for more information.
About
Built by Shantanu Basu.
Inspired by Spring Boot Actuator.
Made with ❤️ for the Laravel community.