Download the PHP package buexplain/alarm without Composer
On this page you can find all versions of the php package buexplain/alarm. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package alarm
Alarm
这个是一个基于hyperf的告警组件。
支持发送告警到钉钉群机器人和企业微信群机器人。
大概的告警流程是:
- 创建自定义告警进程
- worker进程与task进程通过日志组件发送日志到告警进程,该日志包含告警组件的配置文件的handler信息
- 告警进程接收到日志后,解析其中的告警组件的handler信息,然后循环丢给每一个handler进行处理
安装
下载包 composer require buexplain/alarm
发布告警组件的配置 php bin/hyperf.php vendor:publish buexplain/alarm
NOTE: 告警机器人地址的获取,请前往相关网站了解,申请成功后,请手动修改此配置文件。 目前钉钉群机器人和企业微信群机器人的发送频率限制皆为每分钟20条。 为避免触发对方接口的限流警告,本组件限制为单个机器人每分钟20条,可以配置多个机器人,缓解大量发送的需求。
修改日志配置文件 config/autoload/logger.php
NOTE:
- 如果配置文件
logger.php
存在,则直接在需要告警的日志渠道上添加告警日志处理器
,否则请先安装日志组件- 如果配置文件
signal.php
存在,则需要配置\Alarm\Signal\AlarmStopHandler::class => PHP_INT_MAX
- 必须在协程环境下使用
- 不支持协程风格的服务器
使用
README.feishu.md , 飞书的使用例子
License
All versions of alarm with dependencies
PHP Build Version
Package Version
Requires
php Version
>=8.1
psr/log Version *
monolog/monolog Version ^3.0
hyperf/contract Version ^3.0
hyperf/utils Version ^3.0
hyperf/guzzle Version ^3.0
hyperf/exception-handler Version ^3.0
hyperf/process Version ^3.0
psr/log Version *
monolog/monolog Version ^3.0
hyperf/contract Version ^3.0
hyperf/utils Version ^3.0
hyperf/guzzle Version ^3.0
hyperf/exception-handler Version ^3.0
hyperf/process Version ^3.0
The package buexplain/alarm contains the following files
Loading the files please wait ....