PHPackages                             coolseven/thinkphp-queue-monitor - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Queues &amp; Workers](/categories/queues)
4. /
5. coolseven/thinkphp-queue-monitor

AbandonedLibrary[Queues &amp; Workers](/categories/queues)

coolseven/thinkphp-queue-monitor
================================

Command line tool to monitor thinkphp-queue

4261PHP

Since Mar 9Pushed 9y agoCompare

[ Source](https://github.com/coolseven/thinkphp-queue-monitor)[ Packagist](https://packagist.org/packages/coolseven/thinkphp-queue-monitor)[ RSS](/packages/coolseven-thinkphp-queue-monitor/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

thinkphp-queue-monitor
======================

[](#thinkphp-queue-monitor)

[thinkphp-queue](https://github.com/top-think/think-queue) 的命令行监控工具。 **尚未开发完成**, **请不要在生产环境使用**

本项目基于 [thinkphp-queue](https://github.com/top-think/think-queue) 消息队列库，在该库的基础上增加了消息队列的监控功能。

### 前端效果预览

[](#前端效果预览)

[![监控前端效果预览](https://camo.githubusercontent.com/fcdfc03e4e94b40e92ad8cc3f349ceabff479836ed56478cd33ac81b52592ef3/68747470733a2f2f7374617469632e68757a686f6e677975616e2e636f6d2f7468696e6b7068702d71756575652d6d6f6e69746f722f71756575655f737461746963735f707265766965772e706e67)](https://camo.githubusercontent.com/fcdfc03e4e94b40e92ad8cc3f349ceabff479836ed56478cd33ac81b52592ef3/68747470733a2f2f7374617469632e68757a686f6e677975616e2e636f6d2f7468696e6b7068702d71756575652d6d6f6e69746f722f71756575655f737461746963735f707265766965772e706e67)

### 可监控的项目：

[](#可监控的项目)

- worker 进程监控 (可关闭) 。监控各个 worker进程 的状态，包括以下信息：

    - worker 进程负责的 queue 名称
    - worker 进程的启动时刻
    - worker 进程的最近状态，包括busy（任务处理中）， idle （无任务）
    - worker 进程从上一次监控到本次监控期间，处理的任务数量，以及 sleep 的次数
- queue 监控 (可关闭) (支持设置部分队列不作监控)。 监控各个 queue 的状态，包括以下信息：

    - queue 名称
    - queue 中等待处理的任务数量
    - queue 中延迟处理的任务数量
    - queue 中正在处理的任务数量
- Redis Server 监控 (可关闭)。监控 redis 服务的状态，包括以下信息：

    - Redis Server 的 Clients 相关信息
    - Redis Server 的 Memory 相关信息
    - Redis Server 的 Persistence 相关信息
    - Redis Server 的 Stats 相关信息
    - Redis Server 的 Replication 相关信息
    - Redis Server 的 CPU 相关信息

### 使用方法

[](#使用方法)

#### 安装tp5的消息队列

[](#安装tp5的消息队列)

```
composer require topthink/think-queue
```

#### 安装消息队列监控

[](#安装消息队列监控)

```
composer require coolseven/thinkphp-queue-monitor
```

#### 添加监控配置文件

[](#添加监控配置文件)

新增 `application\extra\queue_monitor.php` 配置文件，配置文件选项参考：

```
