nwidart / laravel-actuator
Production-ready monitoring endpoints for Laravel, modelled on Spring Boot Actuator.
Requires
- php: ^8.2
- illuminate/contracts: ^12.0|^13.0
- illuminate/support: ^12.0|^13.0
- nwidart/laravel-metrics: ^0.3
Requires (Dev)
- larastan/larastan: ^3.0
- laravel/pint: ^1.20
- orchestra/testbench: ^10.0|^11.0
- predis/predis: ^2.3|^3.0
Suggests
- ext-redis: Required by the Redis health indicator and the Redis metrics store when using the phpredis client.
- predis/predis: Required by the Redis health indicator and the Redis metrics store when using the predis client.
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-11-22 22:37:09 UTC
README
Laravel Actuator
Production-ready endpoints to monitor your Laravel application: health checks for Kubernetes probes and load balancers, metrics for Prometheus, build and runtime info, configuration, routes and scheduled tasks.
Documentation: nwidart.github.io/laravel-actuator
Requirements
- PHP 8.2 or later
- Laravel 12 or 13
- Redis for the metrics in production
Installation
composer require nwidart/laravel-actuator
The service provider registers itself. To change the defaults, publish the configuration file:
php artisan vendor:publish --tag=actuator-config
Usage
The health endpoint is exposed at once:
curl http://localhost/actuator/health
{"status": "UP", "groups": ["liveness", "readiness"]}
/actuator/health/liveness and /actuator/health/readiness are ready for Kubernetes probes.
The other endpoints (info, env, mappings, scheduledtasks and prometheus) reveal details about your application, so they are not exposed by default. Protect them with middleware, then expose them in config/actuator.php:
'exposure' => [ 'include' => ['health', 'info', 'prometheus'], ], 'info' => [ 'middleware' => ['web', 'auth', 'can:viewActuator'], ],
Define the viewActuator gate in your application, as secure endpoints shows.
Metrics are recorded with no code. Point Prometheus at /actuator/prometheus to scrape them.
Learn more
The documentation covers the rest:
- Tutorial: your first health check
- Expose and secure endpoints
- Configure health indicators and write your own
- Kubernetes probes
- Collect metrics with Prometheus, record custom metrics and the Grafana dashboard
- Write a custom endpoint
- Configuration reference
Testing
composer test
composer analyse
composer lint
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email n.widart@gmail.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.
