Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

Laravel Horizon can send native mail, Slack, and SMS notifications when a Redis queue has waited too long. It also provides a dashboard for queue and job wait times and throughput. Prometheus adds a broader system for collecting and storing time-series metrics and evaluating alert rules—but Horizon metrics need an exporter or instrumentation layer to reach it.

What Laravel Horizon alerts on by itself

Horizon’s built-in notifications focus on long queue waits. In your application’s HorizonServiceProvider, route them with Horizon::routeMailNotificationsTo, Horizon::routeSlackNotificationsTo, or Horizon::routeSmsNotificationsTo. Configure the wait limit in config/horizon.php, under waits, for each connection and queue.

Laravel’s current Horizon 13.x documentation says an undefined connection-and-queue pair falls back to 60 seconds. A threshold of 0 disables the long-wait notification for that queue. The documentation gives redis:critical at 30 seconds, redis:default at 60 seconds, and redis:batch at 120 seconds as examples; these are examples, not universal recommendations. See Laravel’s Horizon notification documentation and choose limits that fit the service’s workload and response expectations.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

These notifications address waits, not every operational condition a team might want to monitor. A long-wait threshold tells you when a queue has crossed a configured limit; it does not, by itself, define an alert policy for failure rates, backlog trends, or overall service health.

What Horizon’s dashboard shows—and what it needs

Laravel describes the dashboard this way: “Horizon includes a metrics dashboard which provides information regarding your job and queue wait times and throughput.” To populate its metric graphs, schedule horizon:snapshot every five minutes, as described in the Horizon metrics documentation.

The metrics.trim_snapshots setting limits how many snapshots are retained, not how old they can be. The time span visible therefore depends on both the snapshot schedule and the configured snapshot count.

What Prometheus adds

Prometheus collects and stores metrics as timestamped time series, optionally tagged with key-value labels. It can evaluate rules to create aggregated or recorded series and generate alerts. This makes it useful when a team wants queue monitoring to use the same metrics and alert-rule workflow as other services. Prometheus does not automatically read Horizon’s internal data: metrics must be exposed through an exporter or direct instrumentation. See the Prometheus overview and its exporters documentation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Example: exposing Horizon metrics with Spatie’s package

One implementation is Spatie’s laravel-prometheus package. Its documentation describes optional Horizon collectors for the following metrics:

  • horizon_master_supervisors: master supervisor count
  • horizon_current_processes: running processes by queue
  • horizon_current_workload: waiting jobs by queue
  • horizon_failed_recent_jobs: recently failed jobs
  • horizon_status: whether Horizon is running, paused, or inactive
  • horizon_jobs_per_minute: jobs processed in the last minute
  • horizon_recent_jobs: recent jobs

The package documents enabling collectors through its Prometheus service provider. Its default endpoint is /prometheus, configurable in config/prometheus.php. It also documents an IP allow-list to restrict access. Consult the Spatie Horizon collector documentation for the package’s setup and metric definitions. This is one third-party implementation, not a built-in Horizon integration or a guarantee about every exporter or package release; verify compatibility with the versions actually installed.

How to choose between Horizon alone and Prometheus

Need Horizon alone Horizon with Prometheus and an exporter
Long-wait notifications Native mail, Slack, and SMS routing with per-queue thresholds. Can use exported metrics and Prometheus alert rules; routing depends on the surrounding Prometheus alerting setup.
Dashboard and history Built-in dashboard; schedule snapshots, with retention set by snapshot count. Prometheus handles time-series collection and rules; visualization and retention depend on the deployed stack.
Horizon-specific metrics Dashboard information includes wait times and throughput. The cited Spatie package documents process, workload, status, failure, throughput, supervisor, and recent-job collectors.
Operational setup Configure notification destinations and queue thresholds; schedule snapshots for metric graphs. Add and maintain an exporter or instrumentation layer, configure scraping and rules, and secure the metrics endpoint.

Horizon alone is a reasonable fit when its wait alerts and dashboard provide the coverage the team needs. Add Prometheus when you need its time-series and rule workflow, or want Horizon metrics alongside data from other services. Compare the actual metric coverage, alert flexibility and routing, history and retention, endpoint security, and exporter compatibility before choosing; merely enabling an endpoint does not establish a useful alert policy.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Compatibility and endpoint security

Check the documentation for the Laravel and Horizon versions deployed. Laravel’s Horizon 12.x documentation stated that Horizon required Redis and was not compatible with Redis Cluster at the time; treat that as a version-specific constraint, not a timeless statement about current releases. The Laravel 12.x Horizon documentation provides that historical version context.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Do not expose an exporter endpoint publicly without deliberate access controls. For the Spatie implementation, review its IP allow-list configuration and restrict access to the systems that need to scrape the metrics endpoint. Also consider metric naming, base units, and label cardinality when designing instrumentation, as covered in Prometheus naming guidance.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.