amjadiqbal / laravel-logpulse
Proactive log health monitoring & intelligent alerting for Laravel applications. Catch production issues before your customers do.
Requires
- php: ^8.0|^8.1|^8.2|^8.3
- guzzlehttp/guzzle: ^7.0
- laravel/framework: ^9.0|^10.0|^11.0
- laravel/prompts: ^0.1.15
Requires (Dev)
- larastan/larastan: ^2.0|^3.0
- laravel/pint: ^1.0
- orchestra/testbench: ^9.0
- pestphp/pest: ^2.0
- pestphp/pest-plugin-laravel: ^2.0
- phpstan/phpstan: ^1.10
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-09-20 09:07:52 UTC
README
๐ซ Laravel LogPulse
Proactive Log Health Monitoring & Intelligent Alerting for Laravel
Installation โข Configuration โข Usage โข How it works
๐ค The Problem
Your production app is silently failing. A webhook endpoint returns 500 errors 200 times per hour. Your disk fills with logs. Your database connections exhaust. And you don't know until a customer complains.
Traditional log viewers are reactive โ you only see problems when you manually check.
โจ The Solution
LogPulse acts as a heartbeat monitor for your Laravel application. It listens to your logging engine in real-time, detects abnormal error patterns, and alerts you before your customers notice.
๐ Features
- โก Real-time error detection โ Catches error spikes as they happen
- ๐ฏ Intelligent threshold alerts โ Not just count, but pattern-based detection
- ๐ System Burden Score โ Understand the impact, not just the count
- ๐ Multi-channel notifications โ Slack, Discord, Email, SMS, Webhooks
- ๐ก๏ธ Self-protecting โ Circuit breaker prevents alert storms
- ๐ Adaptive baselines โ Learns your normal patterns (Pro)
- ๐จ Beautiful dashboard โ Built-in health monitoring UI
- ๐งช Simulation mode โ Test your alerts without waiting for real errors
- ๐ฎ Interactive CLI โ Laravel Prompts-powered installation wizard
- ๐ Ecosystem integration โ Works with Pulse, Horizon, Telescope
๐ฆ Installation
composer require amjadiqbal/laravel-logpulse
Guided setup (recommended):
php artisan logpulse:install
Or non-interactively (CI/scripted installs):
php artisan logpulse:install --no-interaction
Publish the config manually instead, if you'd rather configure by hand:
php artisan vendor:publish --tag=logpulse-config
โ๏ธ Configuration
Everything lives in config/logpulse.php, driven by environment variables:
LOGPULSE_CHANNELS=slack,mail LOGPULSE_SLACK_WEBHOOK=https://hooks.slack.com/services/... LOGPULSE_DISCORD_WEBHOOK=https://discord.com/api/webhooks/... LOGPULSE_ALERT_EMAIL=oncall@yourcompany.com LOGPULSE_CRITICAL_COUNT=10 LOGPULSE_CRITICAL_WINDOW=5 LOGPULSE_WARNING_COUNT=50 LOGPULSE_WARNING_WINDOW=15 LOGPULSE_PRESET=saas-webhook LOGPULSE_DASHBOARD=true LOGPULSE_DASHBOARD_PATH=/logpulse
- Channels:
slack,discord,mail,webhook,vonage(SMS) โ any combination. - Thresholds: error count within a rolling time window, per severity (
critical/warning/info). - Presets:
saas-webhook,ecommerce,api-gateway,cms-blog, orcustomโ pre-tuned thresholds and pattern detection for common application shapes.logpulse:quickstartwalks you through picking one. - Dashboard: a built-in
/logpulseroute (behindweb+authmiddleware by default) showing live burden score, top errors, and circuit-breaker status.
๐ฅ๏ธ Usage
# Live terminal dashboard โ burden score, top errors, alert status, refreshing every N seconds php artisan logpulse:monitor --refresh=3 # Current status as a table, or as JSON for scripting/health checks php artisan logpulse:status php artisan logpulse:status --json # Generate test errors to verify your alert channels actually fire php artisan logpulse:simulate
LogPulse listens to Laravel's own MessageLogged event automatically once installed โ no extra
wiring needed for Log::error()/Log::critical() calls to start feeding the dashboard and
alert pipeline.
๐ก๏ธ How alerting works
- Every logged error is aggregated by
(exception_class, route)into alogpulse_eventsrow, with anoccurrence_countrather than one row per occurrence. FrequencyAnalyzerchecks the rolling count against your configured thresholds.PatternMatcherlooks for higher-level patterns across recent events โ cascade failures (many different exceptions in a burst), retry storms (exponentially shortening intervals), dependency outages, resource exhaustion, and degraded performance.- A triggered alert goes out over your configured channels โ unless the circuit breaker for that channel is open, which caps how many alerts can fire per minute so a real incident doesn't also turn into an alert flood.
๐ License
MIT License. See LICENSE.md.
Changelog
See CHANGELOG.md.
Support & Community
Custom Development
Hire me on Upwork for:
- Package integration
- Custom feature development
- Technical consultation
- Project implementation
Community Support
For priority support and enterprise solutions, please reach out via Upwork for direct assistance.
Author
Amjad Iqbal โ amjad.com.pk ยท hi@amjad.com.pk ยท GitHub