Skip to content

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.

License

Notifications You must be signed in to change notification settings

eusonlito/Server-Monitor

Repository files navigation

Requirements

  • PHP 8.2 or higher (bcmath bz2 intl mbstring opcache pcntl redis sqlite3 xsl zip)
  • Redis

Install

  1. Clone the repository.
git clone https://github.com/eusonlito/Server-Monitor.git
  1. Launch the setup
./composer setup
  1. Edit the .env file and fill in the necessary variables.
vi .env
  1. Launch the deploy
./composer deploy
  1. Configure the cron job for the user related to the project.
* * * * * 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
  1. Create the main user.
php artisan user:create --email=user@domain.com --name=Admin --password=StrongPassword2 --enabled
  1. Configure the web server DocumentRoot to /var/www/project/public.

  2. Create your first server.

  3. 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
  1. Verify that the script matches the one at https://github.com/eusonlito/Server-Monitor/blob/master/resources/app/server/script

  2. Test the script (never as root).

./server-monitor.sh
  1. Add the script to cron jobs (never as root).
* * * * * cd /script/path && ./server-monitor.sh >> server-monitor.log 2>&1

Upgrade

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).

Screenshots

screencapture-server-monitor-01 screencapture-server-monitor-02 screencapture-server-monitor-03 screencapture-server-monitor-04 screencapture-server-monitor-05 screencapture-server-monitor-06

About

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.

Topics

Resources

License

Stars

Watchers

Forks