drakelid/interface-alert-policy-manager
Manage interface alert policies in Laravel with configurable thresholds, severity levels, and notification routing. Define escalation rules, suppress noisy alerts, and keep monitoring behavior consistent across your PHP applications.
composer require drakelid/interface-alert-policy-manager and let Laravel's package discovery register the service provider. If you are on a version-pinned setup, confirm the constraint resolves to ^1.9 before running composer update.php artisan vendor:publish --provider="Drakelid\InterfaceAlertPolicyManager\InterfaceAlertPolicyManagerServiceProvider"
Review the published config file first — for a policy engine the config is the real API surface (default policy resolution, evaluation cadence, notification channels, queue connection). Most "why isn't my alert firing" reports trace back to a config default rather than a bug.policies, policy_assignments (or a pivot), and an alert_events/alert_history table. Read the migration files to learn the schema — the README is usually thinner than the migrations.src/Contracts (the extension points you'll actually implement), src/Models, src/Console/Commands (what runs and when), then src/Notifications.php artisan interface-alert:... — check php artisan list for the exact signature). Watching one policy produce one alert end-to-end teaches you more than reading the whole README.compare/v1.8.1...v1.9.0 and scan for changes under src/Contracts, config keys, and migrations before upgrading.$this->app->bind(AlertEvaluator::class, App\Alerts\CustomEvaluator::class);
This survives minor upgrades far better than subclassing internals.routes/console.php or Kernel::schedule() with withoutOverlapping() and onOneServer() if you run multiple app nodes.alerts) so a noisy incident never starves your transactional jobs. Set a short retry_after relative to your evaluation interval.Notification::fake()-style assertion or a log driver so alert tests don't page anyone. Assert on the persisted alert-event rows; that's the durable contract.src/Contracts (breaking for your bindings). Pin to 1.8.* in production until you've done that read.php artisan config:clear in local and remember that config:cache in deploy means you cannot mutate policy defaults at runtime via config().for 5 minutes) are usually evaluated against now() in app timezone while stored timestamps may be UTC. Assert this explicitly with a test that freezes time.withoutOverlapping() and consider a minimum re-notify interval; interfaces flapping at a threshold boundary will otherwise generate a notification storm.debug line per policy/subject with the compared values is what turns a support ticket into a five-minute fix.class ... extends on package internals and avoid relying on protected methods — both are the first things a minor release changes.How can I help you explore Laravel packages today?