Download the PHP package renjiangfeng/rabbitmq-monitor without Composer
On this page you can find all versions of the php package renjiangfeng/rabbitmq-monitor. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download renjiangfeng/rabbitmq-monitor
More information about renjiangfeng/rabbitmq-monitor
Files in renjiangfeng/rabbitmq-monitor
Download renjiangfeng/rabbitmq-monitor
More information about renjiangfeng/rabbitmq-monitor
Files in renjiangfeng/rabbitmq-monitor
Please rate this library. Is it a good library?
Informations about the package rabbitmq-monitor
PHP版本 - rabbitmq-monitor
简介
rabbitmq-monitor使用PHP实现,配合定时计划任务或者supervisor,对Rabbitmq服务监控预警
功能实现
- rabbitmq服务连接是否正常
- rabbitmq队列是否存在消息积压
特点
- 使用swoole process派生子进程,对rabbitmq服务和队列的消息长度进行监控
- 使用redis对队列消息积压的次数进行记录
- 当服务需要告警,可使用钉钉/邮件/短信方式预警(目前只实现了钉钉通知)。
- 可以单独作为服务使用,也可以与PHP框架无缝结合。
钉钉机器人注意事项
钉钉机器人配置(在PC端群组找智能助手添加自定义机器人),参考地址:https://open.dingtalk.com/document/group/custom-robot-access, 这里 自定义机器人 Webhook 的消息推送,安全设置 自定义关键词是:Error 和 Notice , Webhook 的地址复制出来,里面的access_token就是配中的 钉钉机器人token,需要注意的是管给的调用频率是:每个机器人每分钟最多发送20条消息到群里,如果超过20条,会限流10分钟。
安装
环境依赖:
- php >= 7.0
- swoole扩展(版本无要求)
- redis扩展 >= 2.6
- amqp扩展(操作rabbitmq)
docker安装扩展
独立安装:
- 进入目录:composer install
接入项目:
- github https://github.com/Renjiangfeng/rabbitmq-monitor
- composer require renjiangfeng/rabbitmq-monitor
使用
复制根目录下的config.demo.php,并重命名为:config.php,修改配置文件里的参数。 主要配置说明:
启动
由于rabbitmq-warning不是常驻进程,需使用定时计划任务配合,例: * php /PATH/server start (每分钟执行一次) 参考 server 文件
支持
swoole
laravel 安装使用:
- composer require renjiangfeng/rabbitmq-monitor
- 执行 php artisan vendor:publish --force --provider="Eric\EricRabbitmqMonitorServiceProvider",config目录下会多出rabbitmq-monitor.php 文件,可以把配置写入到这里面
- 把执行的命令封装成artisan命令,使用supervisor管理起来,参考代码laravel-command
All versions of rabbitmq-monitor with dependencies
PHP Build Version
Package Version
Requires
php Version
>=7.0
ext-swoole Version *
ext-redis Version >=2.6
ext-amqp Version *
enqueue/amqp-ext Version ^0.8
cheprasov/php-redis-client Version *
ext-swoole Version *
ext-redis Version >=2.6
ext-amqp Version *
enqueue/amqp-ext Version ^0.8
cheprasov/php-redis-client Version *
The package renjiangfeng/rabbitmq-monitor contains the following files
Loading the files please wait ....