mpge/govel-monitor
Composer 安装命令:
composer require mpge/govel-monitor
包简介
Real-time task monitoring dashboard for Govel.
README 文档
README
Real-time task monitoring dashboard for Govel.
Features
- Live Dashboard — total executions, success rates, avg/p95 durations with auto-refresh
- Execution History — searchable, filterable, paginated list of every Go task execution
- Task Breakdown — per-task metrics (volume, success rate, avg duration)
- Detail View — full payload, output, and error for each execution
- Auto-Recording — transparently hooks into GoManager, zero code changes
- Payload Redaction — automatically redacts sensitive keys (passwords, tokens, secrets)
- Data Retention — configurable auto-purge of old records
- Authorization — local-only by default, customizable gate for production
- Security Hardened — OWASP-audited with security headers, audit logging, input validation
- Vue.js SPA — modern dark-themed UI, no frontend build step (CDN-loaded)
Requirements
- PHP 8.3+
- Laravel 11+
- mpge/govel ^0.1
Installation
composer require mpge/govel-monitor
Run migrations:
php artisan migrate
Visit /govel-monitor in your browser.
Configuration
Publish the config:
php artisan vendor:publish --tag=govel-monitor-config
// config/govel-monitor.php return [ 'path' => 'govel-monitor', // Dashboard URL prefix 'enabled' => true, // Enable/disable recording 'connection' => null, // Database connection (null = default) 'retention' => 168, // Hours to keep records (168 = 7 days) 'middleware' => ['web', Authorize::class], 'redact_keys' => [ // Keys redacted from stored payloads 'password', 'token', 'secret', 'api_key', 'authorization', ], ];
Authorization
By default, the dashboard is only accessible in the local environment. For production, define a gate:
// config/govel-monitor.php 'gate' => function ($request) { return in_array($request->user()?->email, [ 'admin@example.com', ]); },
The gate accepts any callable — closures, invokable classes, or [Class::class, 'method'] arrays.
Unauthorized access attempts are logged with the request IP and path.
How It Works
Govel Monitor decorates the GoManager singleton with a RecordingManager that logs every run(), dispatch(), and queue() call to the database. No changes to your application code are needed — just install the package and task executions are automatically recorded.
Govel::run(Task::class, $payload)
→ RecordingManager (records execution)
→ GoManager (executes task)
→ Result (returned to caller)
Payload Redaction
Sensitive data is automatically redacted before being stored in the database. Any key matching redact_keys in the config will have its value replaced with ********:
// Payload sent to task: ['path' => '/tmp/img.jpg', 'api_key' => 'sk-live-xxx'] // What gets stored: ['path' => '/tmp/img.jpg', 'api_key' => '********']
Redaction applies recursively to nested arrays in both payloads and outputs. Customize the redacted keys in your config:
'redact_keys' => ['password', 'token', 'secret', 'api_key', 'authorization', 'ssn'],
Dashboard
The dashboard is a Vue.js SPA with three views:
| View | Route | Description |
|---|---|---|
| Dashboard | / |
Stats cards, task breakdown table, recent executions (auto-refreshes every 10s) |
| Executions | /executions |
Paginated list with filters for task, status, and driver |
| Detail | /executions/:id |
Full payload, output, error, and timing for a single execution |
API Endpoints
All data is served via JSON APIs under your configured path prefix:
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/stats |
Dashboard statistics (24h totals, success rate, avg/p95 duration) |
GET |
/api/executions |
Paginated execution list with ?task=, ?status=, ?driver=, ?per_page= filters |
GET |
/api/executions/{id} |
Single execution detail |
GET |
/api/filters |
Available filter options (task names, driver names) |
DELETE |
/api/purge |
Purge records older than the configured retention period |
Security
Govel Monitor has been audited against the OWASP Top 10:
- Mass assignment protection — explicit
$fillablewhitelist on the model - Input validation —
per_pageclamped to 1-100, route IDs constrained to integers - Security headers —
X-Frame-Options: DENY,X-Content-Type-Options: nosniff,Referrer-Policy: no-referrer - Payload redaction — sensitive keys automatically replaced before database storage
- Audit logging — auth failures and purge operations logged with IP addresses
- Authorization — environment-gated access with customizable callable gate
License
The MIT License (MIT). Please see License File for more information.
mpge/govel-monitor 适用场景与选型建议
mpge/govel-monitor 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 0 次下载、GitHub Stars 达 2, 最近一次更新时间为 2026 年 04 月 05 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「monitoring」 「laravel」 「dashboard」 「go」 「govel」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 mpge/govel-monitor 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 mpge/govel-monitor 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 mpge/govel-monitor 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A Symfony bundle for chameleon-system/sanitycheck
SoftWax Health Check Bundle for Symfony framework
1Pilot client for Symfony
A short description of what your package does
Scout support for MoonShine
Statsd (Object Oriented) client library for PHP
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 28
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-04-05
