Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Laravel Failed Job Monitor

Laravel Failed Job Monitor Laravel Package

spatie/laravel-failed-job-monitor

Laravel package that notifies you when queued jobs fail. Uses Laravel’s notification system and supports email and Slack out of the box, with configurable notifiables and custom notification classes for your own alerting needs.

View on GitHub
Deep Wiki
Context7

spatie/laravel-failed-job-monitor notifies you when a Laravel queued job fails, using Laravel’s native Notification system. Set a notifiable target (e.g., a team inbox or Slack channel) and get alerted automatically whenever a job hits the failed jobs table.

Ideal for production monitoring with minimal setup—publish the config, choose your notification/notifiable, and optionally add Slack support via Guzzle.

  • Sends failure alerts via mail and/or Slack
  • Built on Laravel’s notification channels and conventions
  • Configurable Notification class and Notifiable recipient
  • Simple installation with auto-registered service provider
  • Quick setup via vendor:publish config tagging
Frequently asked questions about Laravel Failed Job Monitor
How do I set up email notifications for failed Laravel jobs?
Publish the config with `php artisan vendor:publish --tag=failed-job-monitor-config`, then configure the `mail.to` address in `.env` or the config file. Ensure your Laravel mail driver is properly set up to send emails.
Can I use Slack instead of email for job failure alerts?
Yes. Install Guzzle (`composer require guzzlehttp/guzzle`), add your Slack webhook URL to `.env` as `FAILED_JOB_SLACK_WEBHOOK_URL`, and configure the Slack channel in the published config file.
Does this package work with Laravel Horizon?
Yes, it integrates with Horizon. The default notification includes a link to Horizon’s job dashboard if it’s installed. If you’re not using Horizon, customize the notification class to remove the link.
What Laravel versions does spatie/laravel-failed-job-monitor support?
The latest version (v4.x) supports Laravel 8+ through 13. For Laravel 6.x, use v3.x. Check the [release notes](https://github.com/spatie/laravel-failed-job-monitor/releases) for version-specific details.
How do I filter out specific job failures (e.g., transient errors)?
Use the `notificationFilter` in the config file. Pass a closure that returns `false` for jobs you want to ignore. Note: Closures aren’t serializable, so use a static method instead for `config:cache` compatibility.
Will this package slow down my job processing in production?
No, the package adds minimal overhead during job execution. However, sending notifications (e.g., Slack API calls) could introduce latency if jobs fail en masse. Consider rate-limiting notifications or queuing them.
Can I extend this to use PagerDuty or other alerting services?
Absolutely. Replace the default `Notification` class with your own, leveraging Laravel’s notification system. Override the `toMail` or `toSlack` methods to forward alerts to PagerDuty or other channels.
How do I test this package in a staging environment?
Force a job failure in staging by throwing an exception in a job class. Verify notifications arrive by checking your mail inbox or Slack channel. Use a test Slack webhook or mail service like Mailtrap for isolated testing.
Does this work with all Laravel queue drivers (Redis, SQS, etc.)?
Yes, it supports all Laravel queue drivers. However, database queues may require tuning if job failures are frequent, as they could lead to table locking. Monitor performance if using this driver heavily.
What if I need dynamic recipients (e.g., based on job type)?
Create a custom `Notifiable` class and bind it in the config. Use environment variables or a service container to dynamically resolve recipients. Override the `routeNotificationFor` method to implement your logic.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport