• Reading time ~ 1 min
  • 01.02.2023

Laravel Stethoscope is a Laravel package to monitor CPU, memory, hard disk, web server, and network connection. You can use this package to provide configurable thresholds for CPU, memory, and hard disk space and continuously monitor those thresholds to trigger alerts.

The package's main features include the following:

  • Monitor CPU usage percentage
  • Monitor memory usage percentage
  • Monitor hard disk free space
  • Check network connection status
  • Check Nginx status
  • Record log when exceeding the consumption CPU, memory, and hard disk of thresholds
  • Record log when the network connection fails, or Nginx deactivated

This package comes with a few helpful artisan commands to quickly diagnose useful health metrics. For example, the listen command will show you the current stats for the configured metrics:

$ php artisan stethoscope:listen
2023-01-26 02:27:43
cpu usage ===> 0.00%
memory usage ===> 0.00%
network connection status ===> connected
web server status ===> web server status
hard disk free space ===> 46330949632 Byte (43.15 GB)

You can continuously monitor configured stats and run them on a cron using the monitor command:

$ php artisan stethoscope:monito

This package is available on Composer, and the source code is in GitHub. It supports PHP 8+ and Laravel 8+. You can add it to your application with the following:

composer require mohsenabrishami/stethoscope

Comments

No comments yet
Yurij Finiv

Yurij Finiv

Full stack

ABOUT

Professional Fullstack Developer with extensive experience in website and desktop application development. Proficient in a wide range of tools and technologies, including Bootstrap, Tailwind, HTML5, CSS3, PUG, JavaScript, Alpine.js, jQuery, PHP, MODX, and Node.js. Skilled in website development using Symfony, MODX, and Laravel. Experience: Contributed to the development and translation of MODX3 i...

About author CrazyBoy49z
WORK EXPERIENCE
Contact
Ukraine, Lutsk
+380979856297