jbelien / ovh-monitoring
此包已被弃用且不再维护。没有建议的替代包。
通过 OVH API 监控 OVH VPS/云服务
v1.8.0
2021-03-15 20:57 UTC
Requires
- ovh/ovh: ^2.0
This package is auto-updated.
Last update: 2023-04-30 08:58:30 UTC
README
OVH-Monitoring
使用 PHP 通过 OVH API 监控 OVH VPS/云服务。
要求
- PHP 7.0+
- PHP
gettext
扩展
配置
第一步
创建凭据: https://api.ovh.com/createToken/index.cgi?GET=/vps*&GET=/cloud*&GET=/status*
第二步
在 public/
文件夹旁边创建 monitoring.ini
文件
application_key = your_application_key
application_secret = your_application_secret
endpoint = ovh-eu
consumer_key = your_consumer_key
使用 Composer 安装
第一步
composer create-project jbelien/ovh-monitoring
第二步
在 public/
文件夹旁边创建 monitoring.ini
文件(见 配置)。
使用 Docker 安装
第一步
从 GitHub 构建 Docker 镜像
docker build --rm -t jbelien/ovh-monitoring https://github.com/jbelien/OVH-Monitoring.git
或者
从 Docker Hub 拉取镜像
docker pull jbelien/ovh-monitoring
第二步
创建 monitoring.ini
文件(见 配置)。
第三步
使用您配置的 monitoring.ini
文件作为卷运行 Docker 容器
docker run --rm -p 80:80 -v "$PWD/monitoring.ini:/var/www/html/monitoring.ini" jbelien/ovh-monitoring
警告:您可能需要修复 monitoring.ini
文件的路径(将 $PWD/monitoring.ini
替换为正确的路径)。
第四步
转到 http://myserver/(使用端口 80
),其中 myserver
是您服务器的 IP 地址,查看监控工具。