Server Monitor platform built with Laravel 11 + PHP 8.2 and SQLite. Plataforma de Monitorización de Servidores creada con Laravel 11 + PHP 8.2 y SQLite.
MIT License
git clone https://github.com/eusonlito/Server-Monitor.git
./composer setup
.env
file and fill in the necessary variables.vi .env
./composer deploy
* * * * * cd /var/www/monitor.domain.com && install -d storage/logs/artisan/$(date +"\%Y/\%m/\%d") && /usr/bin/php artisan schedule:run >> storage/logs/artisan/$(date +"\%Y/\%m/\%d")/schedule-run.log 2>&1
php artisan user:create --email[email protected] --name=Admin --password=StrongPassword2 --enabled
Configure the web server DocumentRoot
to /var/www/project/public
.
Create your first server.
Connect to remote server and download the client script (never as root).
curl -H "Authorization: Bearer AUTH_TOKEN" \
-o server-monitor.sh \
https://monitor.domain.com/server/script
chmod 755 server-monitor.sh
Verify that the script matches the one at https://github.com/eusonlito/Server-Monitor/blob/master/resources/app/server/script
Test the script (never as root).
./server-monitor.sh
* * * * * cd /script/path && ./server-monitor.sh >> server-monitor.log 2>&1
Updating the platform can be done in a simple way with the ./composer deploy
command executed by the user who manages that project (usually www-data
).