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.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package alarm

Alarm

这个是一个基于hyperf的告警组件。

支持发送告警到钉钉群机器人和企业微信群机器人。

大概的告警流程是:

  1. 创建自定义告警进程
  2. worker进程与task进程通过日志组件发送日志到告警进程,该日志包含告警组件的配置文件的handler信息
  3. 告警进程接收到日志后,解析其中的告警组件的handler信息,然后循环丢给每一个handler进行处理

安装

下载包 composer require buexplain/alarm

发布告警组件的配置 php bin/hyperf.php vendor:publish buexplain/alarm

NOTE: 告警机器人地址的获取,请前往相关网站了解,申请成功后,请手动修改此配置文件。 目前钉钉群机器人和企业微信群机器人的发送频率限制皆为每分钟20条。 为避免触发对方接口的限流警告,本组件限制为单个机器人每分钟20条,可以配置多个机器人,缓解大量发送的需求。

修改日志配置文件 config/autoload/logger.php

NOTE:

  1. 如果配置文件logger.php存在,则直接在需要告警的日志渠道上添加告警日志处理器,否则请先安装日志组件
  2. 如果配置文件signal.php存在,则需要配置\Alarm\Signal\AlarmStopHandler::class => PHP_INT_MAX
  3. 必须在协程环境下使用
  4. 不支持协程风格的服务器

使用

README.feishu.md , 飞书的使用例子

License

Apache-2.0


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
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package buexplain/alarm contains the following files

Loading the files please wait ....