noahjahn/craft-php-fpm-status-monitor
Composer 安装命令:
composer require noahjahn/craft-php-fpm-status-monitor
包简介
Monitor PHP FPM status from within the Craft CMS control panel dashboard
README 文档
README
Craft PHP FPM Status Monitor is a Craft CMS 3 plugin that allows you to monitor PHP FPM status from within the Craft CMS control panel dashboard.
This plugin is a work in progress.
Requirements
- PHP 8.0 (probably works with 7.4 as well)
- PHP running with the FastCGI Process Manager (PHP FPM)
- Including PHP FPM
pm.status_pathconfigured
- Including PHP FPM
- Web server configured to allow requests to the configured PHP FPM status path
- This has only been tested on Craft 3.7.35, but probably works on all of 3.x.x
- Composer (I mean, this is a Craft dependency too :))
Installation
- In terminal, from the root of your Craft project install the package with composer:
composer require noahjahn/craft-php-fpm-status-monitor
or, if you're like me and don't like having dependencies installed on your local machine and would rather install with Docker:
docker run --rm --user $UID:$UID -w /app -v "$(pwd):/app" composer require noahjahn/craft-php-fpm-status-monitor
- In your browser, logged in to an admin user for your Craft site, open the Control Panel > Settings > Plugins and install the plugin
Configuration
-
Configure the
pm.status_pathin the PHP FPM configuration on your serverExample PHP FPM configuration (on your server, or in your container, PHP FPM config probably lives
/usr/local/etc/php-fpm.d/):pm.status_path = /fpm-status -
Configure the web server to be able to send requests to the status path previously configured
It's recommended not to allow public access to this endpoint.
Here is some example nginx configuration under the
serverblock (yourfastcgi_passvalue will probably be different):# Allow fpm ping and status from localhost and private IPs location ~ ^/(fpm-status)$ { access_log off; # Private IPs: allow 10.0.0.0/8; allow 172.16.0.0/12; allow 192.168.0.0/16; allow 127.0.0.1; deny all; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_pass php-fpm; }
-
In the control panel of your site, set the
pathto your chosen path value in the settings of the plugin
Use cases
- View php-fpm status information from the control panel dashboard
Ideas & future
- Store metrics about past number of in use php-fpm workers
- Provide a better possible configuration given total amount of memory, PHP memory limit, and OPCache memory config
noahjahn/craft-php-fpm-status-monitor 适用场景与选型建议
noahjahn/craft-php-fpm-status-monitor 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 8 次下载、GitHub Stars 达 0, 最近一次更新时间为 2022 年 03 月 10 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「php」 「utility」 「control」 「monitor」 「panel」 「dashboard」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 noahjahn/craft-php-fpm-status-monitor 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 noahjahn/craft-php-fpm-status-monitor 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 noahjahn/craft-php-fpm-status-monitor 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Provide a way to secure accesses to all routes of an symfony application.
A collection of enhancements and utilities for the Silverstripe UserForms module
Extends TYPO3 EXT:seo hreflang functionality
PHP7 utility classes
GHT D-Tools Bundle
Basic json helper/utility
统计信息
- 总下载量: 8
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-03-10