softwarepunt/phonehome
Composer 安装命令:
composer require softwarepunt/phonehome
包简介
Software Punt module for remote monitoring and customer service utilities
README 文档
README
Software Punt module for remote monitoring and customer service utilities.
This library provides "phone home" functionality for Software Punt projects. It is intended for managed services and SLA customers.
🪟 This project is open-source so we can be transparent about what data is collected and sent to our servers for monitoring purposes.
✉️ If you have any questions, contact us at support@softwarepunt.nl.
Installation
Install the package using Composer:
composer require softwarepunt/phonehome
This package is compatible with PHP 8.3+.
Usage
Use the PhoneHome client to send a ping to the receiving API:
use SoftwarePunt\PhoneHome\PhoneHome; $response = (new PhoneHome()) ->setApiBaseUrl("https://sample.api.com/") ->setToken("set_api_token") ->setTimeout(30) ->send(); if ($response?->sla?->active) echo "Have active SLA!";
The server response will include SLA details if applicable to the caller.
A ping should be sent every minute or so for monitoring purposes. This is typically performed by a background task or cronjob.
Standalone installation
You can set up PhoneHome as a standalone application without integrating it into existing software.
Note
We strongly recommend running under a user with limited privileges. These examples target www-data with /var/www/ as home directory:
sudo su www-data -s /bin/bash
To do so, install it as a global composer package:
composer global require softwarepunt/phonehome --prefer-install=source
Then set up a cron job to run every minute (crontab example):
* * * * * (cd /var/www/.config/composer/vendor/softwarepunt/phonehome; TOKEN=SET_ME /var/www/.config/composer/vendor/bin/sp-phone-home)
Providers
The following information is currently collected and sent:
Environment
- Server hostname
- OS type and version (e.g.
Ubuntu 24.04.2 LTS (Noble Numbat) (Linux 6.8.0-55-generic)) - PHP version
- Working directory
- Reboot required flag
- Mounted storage devices and their capacity / usage
Network
- Public/outgoing (WAN) address, IPv4 and IPv6
- Private address
Git version
- Commit hash
- Commit date/time
Installed software versions
- nginx
- MySQL Server (
mysqld) - Redis Server (
redis-server) - .NET Runtime / SDK (
dotnet) - Python (
python) - Node.JS (
node) - Composer (
composer) - OpenSSL (
openssl) - vsftpd
Status monitors
Project specific status monitors can be registered to collect additional information. The results of these monitors will be included in the collected data.
softwarepunt/phonehome 适用场景与选型建议
softwarepunt/phonehome 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 496 次下载、GitHub Stars 达 0, 最近一次更新时间为 2023 年 01 月 06 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 softwarepunt/phonehome 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 softwarepunt/phonehome 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 496
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: proprietary
- 更新时间: 2023-01-06