Download the PHP package jcergolj/extra-checks-for-spatie-laravel-server-monitor without Composer
On this page you can find all versions of the php package jcergolj/extra-checks-for-spatie-laravel-server-monitor. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jcergolj/extra-checks-for-spatie-laravel-server-monitor
More information about jcergolj/extra-checks-for-spatie-laravel-server-monitor
Files in jcergolj/extra-checks-for-spatie-laravel-server-monitor
Package extra-checks-for-spatie-laravel-server-monitor
Short Description Additional custom checks for Spatie laravel-server-monitor package
License MIT
Informations about the package extra-checks-for-spatie-laravel-server-monitor
Extra Checks For Spatie Laravel Server Monitor package
First you need to install Spatie Server Monitor Package.
Then you need to install this package
Finally add the following checks to config\server-monitor.php
file
Custom check overview
CpuLoadCheck
It checks server loads in last 1, 5 and 15 minutes
It executes this command on the server: uptime
.
You can specify cpu load threshold in server-monitor.php
config file. If it isn't provided the
default values are 1.3.
RedisCheck
It checks if Redis is running.
It executes this command on the server: redis-cli ping
.
RedisMemoryCheck
It checks the current redis memory consumption.
It executes this command on the server: redis-cli info memory
.
You can specify redis memory threshold in server-monitor.php
config file. Default value is 5MB.
HorizonArtisanCommandCheck
It checks if horizon artisan process is running.
It executes this command on the server: ps aux | grep -E ".*php([0-9]\.[0-9])? .*artisan horizon$" | grep -v grep
.
You can specify the number of horizon processes that should run on the server in server-monitor.php
config file. The default value is 1.
HorizonSupervisorCheck
It checks if horizon supervisor process is running.
It executes this command on the server: ps aux | grep -E ".*php([0-9]\.[0-9])? .*artisan horizon:supervisor" | grep -v grep
.
You can specify the number of horizon supervisor processes that should run on the server in server-monitor.php
config file. Default value is 1.
HorizonWorkerCheck
It checks if horizon worker process is running.
It executes this command on the server: ps aux | grep -E ".*php([0-9]\.[0-9])? .*artisan horizon:work" | grep -v grep
.
You can specify the number of min and max horizon worker processes that should run on the server in server-monitor.php
config file. The default value is 1 for both min and max.
QueueWorkerCheck
It checks if queue worker process is running.
It executes this command on the server: ps aux | grep -E ".*php([0-9]\.[0-9])? .*artisan queue:work" | grep -v grep
.
You can specify the number of queue worker processes that should run on the server in server-monitor.php
config file. The default value is 1.
DbConnectionCountCheck
It checks if the number of mysql connections.
It executes this command on the server: netstat -an | grep 3306 | grep ESTABLISHED
.
You can specify the db connection threshold in server-monitor.php
config file. The default value is 40.
Extended server-monitor.php config file
Extra custom options each host with its own values
How are custom values obtained? First we check if host specific value exists, then the general one in the config lastly if there is none the default value is used.