Search by

amjadiqbal / laravel-logpulse

amjadiqbal

Proactive log health monitoring & intelligent alerting for Laravel applications. Catch production issues before your customers do.

1.0.0 2026-09-12 09:39 UTC

This package is auto-updated.

Last update: 2026-09-20 09:07:52 UTC


README

Laravel LogPulse

๐Ÿซ€ Laravel LogPulse

Proactive Log Health Monitoring & Intelligent Alerting for Laravel

Latest Version on Packagist Total Downloads License Tests PHPStan

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.

LogPulse Dashboard

๐Ÿš€ 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, or custom โ€” pre-tuned thresholds and pattern detection for common application shapes. logpulse:quickstart walks you through picking one.
  • Dashboard: a built-in /logpulse route (behind web+auth middleware 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

  1. Every logged error is aggregated by (exception_class, route) into a logpulse_events row, with an occurrence_count rather than one row per occurrence.
  2. FrequencyAnalyzer checks the rolling count against your configured thresholds.
  3. PatternMatcher looks 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.
  4. 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