Artisan commands
php artisan alerts:check disk_usage_check # run one check now, pretty-print result
php artisan alerts:check disk_usage_check --notifiable='App\Models\Team:1' # full side-effect path
php artisan alerts:list --tag=critical # inventory: key, name, frequency, last run, status, muted, tags
php artisan alerts:status --tag=db # status table, tag-filterable
php artisan alerts:prune-runs --days=30 # prune run history (also auto-scheduled)| Command | Options | What it does |
|---|---|---|
alerts:perform-health-checks | — | Calls Health::runDue(): dispatches the configured job for every scheduled check whose cron is due this minute, and prints how many it queued. A row whose cron cannot be evaluated is skipped and reported. |
alerts:check | key, --notifiable=Model:id | Runs one registered check now and prints status, message, latency and meta. Exit 0 for ok/skipped, 1 for an alertable result or an unknown key. |
alerts:list | --tag= | Inventory of registered checks: key, name, frequency (or on demand), last run, status, muted, tags. |
alerts:status | --tag= | Status table of every scheduled check plus the overall status. Exits non-zero when anything is alertable. |
alerts:prune-runs | --days= | Calls Health::prune(): deletes runs older than the given days (default history.retention_days). Auto-scheduled daily when history is enabled. |
alerts:check
Without --notifiable it runs a pure probe: check() only, no side effects, under the same exception guard as a real run — a throwing check prints as a failed result. With --notifiable='App\Models\Team:1' the full alert, notify and history path runs through Health::for($owner)->run() — through that owner’s scheduled row, or an on-demand row that is never scheduled (see Running checks). An unknown key prints the registered keys and exits 1.
alerts:list
Lists the registered checks, joined with their newest scheduled row, falling back to an on-demand row (shown as on demand). Frequencies are labelled from the check’s frequencies() map where possible. The Muted? column is decided the way the run pipeline decides it: an active mute on the check key, on any of its tags (the check’s or the row’s), or on *.
php artisan about
The package adds an Alerts section: the four model classes, the number of registered checks, scheduling, history, silences, the depth of the default escalation policy, and whether the health endpoint URI is the default. It never prints check classes, group names or the endpoint path.
php artisan about --only=alertsShow your open-source love
This package is free and MIT-licensed. If it saves you time, a one-off donation or a Patreon membership keeps it maintained, tested and documented.
More ways to support, including cryptoBy donating, you agree to our donation terms.
Want this built into your product?
We integrate our packages into custom Laravel and AI builds. Tell us what you're working on and we'll reply within 48 hours.