hostatlas/queue-monitor 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

hostatlas/queue-monitor

最新稳定版本:v1.0.1

Composer 安装命令:

composer require hostatlas/queue-monitor

包简介

Push Laravel queue metrics to HostAtlas for monitoring, alerting, and visualization.

README 文档

README

Push Laravel queue metrics to HostAtlas for real-time monitoring, alerting, and visualization.

HostAtlas is an infrastructure visibility platform with 340+ features — server monitoring, uptime checks, incident management, attack defense, AI analysis, and more. The Queue Monitor package connects your Laravel queues to the HostAtlas dashboard, so you can track queue health alongside the rest of your infrastructure.

Sign up free — no credit card required.

Requirements

  • PHP 8.2+
  • Laravel 11 or 12
  • A HostAtlas account with an API key

Installation

composer require hostatlas/queue-monitor

The service provider is auto-discovered. No manual registration needed.

Configuration

Publish the config file:

php artisan vendor:publish --tag=hostatlas-queue-config

Add to your .env:

HOSTATLAS_URL=https://my.hostatlas.app
HOSTATLAS_API_KEY=ha_your_api_key_here
HOSTATLAS_SERVER=web-prod-01
Variable Description Default
HOSTATLAS_URL Your HostAtlas instance URL https://my.hostatlas.app
HOSTATLAS_API_KEY API key from HostAtlas (Settings > API Keys)
HOSTATLAS_SERVER Server hostname (must match a server in HostAtlas) System hostname

Queue Selection

By default, all queues are auto-detected. To monitor specific queues only, edit config/hostatlas-queue.php:

'queues' => ['default', 'emails', 'notifications'],

Use ['*'] to auto-detect all queues (default).

Usage

Via Scheduler (recommended)

Add to your routes/console.php:

Schedule::command('hostatlas:queue-metrics')->everyMinute();

Manual

php artisan hostatlas:queue-metrics

Example output:

  default: 42 pending, 2 failed
  emails: 8 pending, 0 failed
  Queue metrics reported to HostAtlas.

Supported Queue Drivers

Driver Auto-detect Queues Metrics
Redis Yes (scans Redis keys) Size, failed, system type
Database Yes (groups by queue column) Size, failed, processing count
SQS No (uses configured queue) Size

What Gets Reported

Each queue reports:

  • Queue name — auto-detected or configured
  • Pending jobs — current queue size
  • Failed jobs — count from failed_jobs table
  • Processing jobs — currently being processed (database driver)
  • System typelaravel (auto-set)

API Push Endpoint

The package pushes to POST {HOSTATLAS_URL}/api/v1/queue/push with Bearer token authentication. You can also push metrics from any language or framework using the same endpoint:

curl -X POST https://my.hostatlas.app/api/v1/queue/push \
  -H "Authorization: Bearer ha_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "server": "web-prod-01",
    "queues": [
      {"name": "default", "size": 42, "failed": 2, "processing": 3, "system": "laravel"}
    ]
  }'

Multi-System Support

The HostAtlas queue dashboard supports metrics from multiple systems:

  • Laravel (this package)
  • BullMQ (Node.js — via API push)
  • Sidekiq (Ruby — via API push)
  • Celery (Python — via API push)

Security

  • API key is transmitted via Authorization: Bearer header over HTTPS
  • No sensitive data is collected — only queue names and counts
  • 10-second HTTP timeout per request
  • Errors are reported via Laravel's report() helper (logged, never thrown)

License

MIT License. See LICENSE for details.

Built by Akyros Labs LLChello@akyroslabs.com

HostAtlas | Documentation | Sign up free

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 5
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-04-03

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固