kalakotra/silverstripe-monitoring-admin 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

kalakotra/silverstripe-monitoring-admin

最新稳定版本:1.0.0

Composer 安装命令:

composer require kalakotra/silverstripe-monitoring-admin

包简介

SilverStripe 6 monitoring – active pull collector and CMS admin UI

README 文档

README

Active pull collector and CMS admin interface for the SilverStripe 6 monitoring system.
It periodically pulls data from passive client endpoints.

Installation

composer require kalakotra/silverstripe-monitoring-admin
vendor/bin/sake dev/build flush=1

Set Up a New Client

  1. On the client site, install kalakotra/silverstripe-monitoring-client
  2. Set MONITORING_SECRET_KEY in the client's .env
  3. On the admin site, open /admin/monitoringAdd Project
  4. Enter:
    • Title – the client name
    • Endpoint URLhttps://client.example/
    • Secret Key – the MONITORING_SECRET_KEY value from the client's .env
  5. Save, then run a manual pull or wait for cron

Crontab Configuration (on the admin site)

Option A - run sake directly (recommended if you have SSH)

# Every hour - pulls data from all projects
0 * * * * /usr/bin/php /var/www/html/vendor/bin/sake dev/tasks/MonitoringPullTask >> /var/log/monitoring-pull.log 2>&1

Option B - curl the sake task URL

0 * * * * curl -s "https://admin-page.com/dev/tasks/MonitoringPullTask" > /dev/null 2>&1

Option C - cPanel Cron Jobs

Frequency Command
Every hour curl -s "https://admin-page.com/dev/tasks/MonitoringPullTask"

Note: dev/tasks is available by default only from 127.0.0.1 or for admins.
For a curl request from an external IP, add that IP to the DevAdmin.allowed_ips YAML configuration.

Manual Pull (for testing)

vendor/bin/sake dev/tasks/MonitoringPullTask

Status Logic

State Color Condition
Online green Pull within 25h
Warning yellow Pull older than 25h and newer than 48h
Offline red Pull older than 48h or never ran

Errors are counted in ConsecutiveErrors and shown next to the status badge as (Nx).

Collected Data

Category Fields
Versions PHP, SilverStripe framework, recipe-cms
Content Total pages, published, draft, broken links, DB objects, tables
Users Total members, admins
Environment live/dev/test, base URL, locale
System Memory limit, max execution time, free/total disk

Struktura

src/
├── Admin/
│   └── MonitoringAdmin.php           # ModelAdmin – /admin/monitoring
├── Model/
│   └── Project.php                   # DataObject + status/disk badge
├── Service/
│   └── ProjectPullService.php        # Guzzle pull logika
└── Task/
    └── MonitoringPullTask.php        # BuildTask for cron
_config/
└── routes.yml

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-05-12

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固