Download the PHP package jacotheron/forge-monitor without Composer
On this page you can find all versions of the php package jacotheron/forge-monitor. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jacotheron/forge-monitor
More information about jacotheron/forge-monitor
Files in jacotheron/forge-monitor
Package forge-monitor
Short Description A simple package to monitor storage used by sites on a Forge provisioned server. Also monitors database sizes. Sends email with the details after each run.
License MIT
Homepage https://github.com/Jacotheron/forge-monitor
Informations about the package forge-monitor
A simple package to monitor storage used by sites on a Forge provisioned server. Also monitors database sizes. Sends email with the details after each run.
Easily get notifications of the storage used by sites on a Forge provisioned server including database sizes. Sends email with the details after each run.
Installation
You can install the package via composer:
You can publish the config file with:
This is the contents of the published config file:
Optionally, you can publish the views using
In order for the command to read database sizes, we need a db connection to the 'information_schema' database on the server. This can be done by copying the mysql driver in your config/database.php file.
For example:
Note the database set to 'information_schema'; if you want to be more secure, you can create a new user for this purpose, and change the env keys to use the dedicated details.
You can then set the db_driver in the config to the name of the new driver you created.
Usage
Run the command using:
Schedule the command to run at regular intervals by editing your app/Console/Kernel.php file or in newer Laravel versions, routes/console.php file
Changelog
Please see CHANGELOG for more information on what has changed recently.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- Jacotheron
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
Important details
Global disk usage is default fetched using the command df -h / - your current user needs to be able to run this command successfully, otherwise to skip this, set to null in config.
Default project folder is /home/forge/.
Project disk usage is fetched using the command du -hs {project_folder}/{dir} - your current user needs to be able to run this command successfully, otherwise to skip this, set to null in config.
Currently only 1 project folder is supported; when using isolated sites, this package will be needed on each one you want to monitor, since they are run in different user accounts.
Database size includes both the Data and Index lengths, as stored in the information_schema database's TABLES table. This package is currently only compatible with MySQL / MariaDB.
This package does not make any changes to the server (no files and databases), it is only a monitoring tool. While I do take security very seriously, and the commands used are quite safe to use, I am not responsible for any damage that may occur due to the use of this package. The commands that are used can be changed in the config file, and a malicious command here can cause damage to the server.
All versions of forge-monitor with dependencies
illuminate/contracts Version ^12.0|^13.0
spatie/laravel-package-tools Version ^1.16
symfony/process Version ^7.4