https://github.com/eusonlito/server-monitor
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.
https://github.com/eusonlito/server-monitor
laravel monitor monitoring php server server-monitor sqlite
Last synced: about 1 month ago
JSON representation
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.
- Host: GitHub
- URL: https://github.com/eusonlito/server-monitor
- Owner: eusonlito
- License: mit
- Created: 2024-07-11T21:35:09.000Z (10 months ago)
- Default Branch: master
- Last Pushed: 2024-09-16T07:37:15.000Z (8 months ago)
- Last Synced: 2024-10-18T04:23:59.327Z (6 months ago)
- Topics: laravel, monitor, monitoring, php, server, server-monitor, sqlite
- Language: PHP
- Homepage:
- Size: 3.57 MB
- Stars: 20
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
### Requirements
- PHP 8.2 or higher (bcmath bz2 intl mbstring opcache pcntl redis sqlite3 xsl zip)
- Redis### Install
1. Clone the repository.
```bash
git clone https://github.com/eusonlito/Server-Monitor.git
```2. Launch the setup
```bash
./composer setup
```3. Edit the `.env` file and fill in the necessary variables.
```bash
vi .env
```4. Launch the deploy
```bash
./composer deploy
```5. 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
```6. Create the main user.
```bash
php artisan user:create [email protected] --name=Admin --password=StrongPassword2 --enabled
```7. Configure the web server `DocumentRoot` to `/var/www/project/public`.
8. Create your first server.
9. Connect to remote server and download the client script (never as root).
```bash
curl -H "Authorization: Bearer AUTH_TOKEN" \
-o server-monitor.sh \
https://monitor.domain.com/server/scriptchmod 755 server-monitor.sh
```10. Verify that the script matches the one at https://github.com/eusonlito/Server-Monitor/blob/master/resources/app/server/script
11. Test the script (never as root).
```bash
./server-monitor.sh
```12. 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





