aping/laravel-alarm
Laravel package for sending alarms/notifications from exceptions, logs, or custom events. Includes DingTalk robot handler with signature support, configurable event-to-alarm mapping, localization, and queued delivery via laravel-alarm queue. Mail, rate limit, and tests are planned.
config/alarm.php) from delivery channels (e.g., SlackAlarm, EmailAlarm) enables modular integration with existing event systems (e.g., Laravel’s Event facade or third-party queues).Alarm::dispatch().AlarmChannel interface, though the package itself only includes Slack and email out of the box.AlarmTestCase for unit testing, but integration tests for custom channels may need additional setup.guzzlehttp/guzzle:^6.0).JobFailed, InvoiceOverdue).composer require aping/laravel-alarm).guzzlehttp/guzzle (for HTTP channels): Pin to a supported version (e.g., ^7.0).monolog/monolog: May need updates for Laravel 10+.Event::dispatch(new JobFailed)).php artisan vendor:publish --tag=alarm-config).config/alarm.php (e.g., slack_job_failed).public function handle(JobFailed $event) {
Alarm::dispatch('slack_job_failed', $event->job);
}
| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Package incompatibility | Alarms fail silently | Test in staging; fork and patch if needed. |
| Channel API failures | Missed alerts (e.g., Slack down) | Implement retries with exponential backoff. |
| Queue worker crashes | Async alarms delayed/failed | Monitor queue length; use dead-letter queues. |
| Configuration errors | Wrong recipients/alerts | Validate config in CI; use environment variables. |
| PHP/Laravel version mismatch | Runtime errors | Pin versions in composer.json. |
How can I help you explore Laravel packages today?