neoniche / laravel-app-monitor
一种简单的方式来监控Laravel应用程序的磁盘使用和其他资源。
0.4.1
2023-01-19 10:37 UTC
Requires
- php: ^8.1
- illuminate/contracts: ^9.0
- illuminate/database: ^9.0
- illuminate/http: ^9.0
- illuminate/support: ^9.0
- illuminate/view: ^9.0
- spatie/laravel-package-tools: ^1.14.0
Requires (Dev)
- laravel/pint: ^1.0
- nunomaduro/collision: ^6.0
- nunomaduro/larastan: ^2.0.1
- orchestra/testbench: ^7.0
- pestphp/pest: ^1.21
- pestphp/pest-plugin-laravel: ^1.1
- phpstan/extension-installer: ^1.1
- phpstan/phpstan-deprecation-rules: ^1.0
- phpstan/phpstan-phpunit: ^1.0
- phpunit/phpunit: ^9.5
- spatie/laravel-ray: ^1.26
This package is auto-updated.
Last update: 2024-09-09 14:09:14 UTC
README
此软件包将帮助监控Laravel应用程序的磁盘指标。
安装
您可以通过composer安装此软件包
composer require neoniche/laravel-app-monitor
您可以使用以下命令发布和运行迁移
php artisan vendor:publish --tag="app-monitor-migrations"
php artisan migrate
您可以使用以下命令发布配置文件
php artisan vendor:publish --tag="app-monitor-config"
这是发布配置文件的内容
return [ /** * The name of the disk you want to monitor. * default: 'local' */ 'disk_names' => [ 'local', ], ];
您应该设置一个计划来运行命令app-monitor:log
以记录磁盘指标。
// app/Console/Kernel.php use Neoniche\AppMonitor\Commands\AppMonitorCommand; class Kernel extends ConsoleKernel { protected function schedule(Schedule $schedule) { $schedule->command(AppMonitorCommand::class)->daily(); } }
可选地,您可以使用以下命令发布视图
php artisan vendor:publish --tag="app-monitor-views"
使用方法
If you wish to view the statistics that is logged to the database in a browser. You should add the macro below to your routes file. ```php // in a routes files Route::appMonitor('custom-monitor-url'); Now, you can see all statics when browsing /custom-monitor-url/disk-file-logs. You can change the custom-monitor-url to whatever suits you. We highly recommand using the auth middleware for this route, so guests can't see any data regarding your disks.
测试
composer test
变更日志
请参阅变更日志了解最近的变化。
贡献
请参阅贡献指南了解详细信息。
安全漏洞
请查阅我们的安全策略了解如何报告安全漏洞。
致谢
许可证
MIT许可证(MIT)。请参阅许可证文件了解更多信息。