Download the PHP package mohsenabrishami/stethoscope without Composer

On this page you can find all versions of the php package mohsenabrishami/stethoscope. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package stethoscope

Stethoscope
For listening to your Laravel app server heartbeat

Features | Installation | Usage | Dashboard | Configuration | Notification | Testing | Changelog | Contributing | Credits | License

Packagist license downloads total tests tests

This Laravel package allows you to monitor the infrastructure.

With this package, You can check your server health at any time.

Features

Do you need more options? you can make an issue or contributes to the package

Get Started

Requirements

Installation

This package requires PHP 8.0 and Laravel 8.0 or higher. You can install the package via composer:

and then run:

Stethoscope allows you to record reports both in a file and in a database. If you set the database driver in the config file, you must run migrate command:

Usage

Once installed, see your server health details with a command:

The output will be like this:


But the work of this package didn't stop there. you can set thresholds for CPU, memory and Storage consumption. if CPU and memory consumption exceeds thresholds or Storage free space is less than thresholds, then a log is created from details consumption. also, you can config this package so that if the deactivated web server or disconnected internet log is created. To start monitoring your server, just run this command:

You can monitor your server constantly with the run this command by a cron job. You may want to be notified if there is a problem in the server. For this, it is enough to set your email admin in the config file.

If you are worried about the increase in logs, use the following command. This command deletes old logs based on the number of days you defined in the config file.

Dashboard

Stethoscope provides a dashboard where you can easily see the current status of the server at any time. Also, in this dashboard, you can see a history of the times when resource consumption exceeded the limit or when the network and web server were disabled.

monitoring-panel

If you use the monitoring panel, you must publish the build files:

Remember that the monitoring dashboard is disabled by default. To activate, you must set monitoring_panel.status to true in config file. Also, the log storage driver must be a database, not a file.

You can put a key to access the admin panel. If you define a key, you can access the dashboard only when you enter the key in the address.

you can access this panel with address https://yoursite/monitoring-panel?key=sampletoken

Configuration

You can easily customize this package in the config/stethoscope.php.

In this file, You can configure the following:

By default, the configuration looks like this:

Notification

stethoscope can send you server problems through notifications. By default, sending notifications via email is supported. To use this feature, you must enter the email address of the admin user in the config file.

Adding extra notification channels

It's easy to add an extra notification channel such as Telegram or native mobile push notification, etc. In the following example we're going to add the Telegram push notifications channel. Other notification drivers can be added in the same way.

1. Install the notification channel driver

First you need to create your custom driver. For Telegram push notifications, you can use following package:

After composer has pulled in the package, just follow the installation instructions of the package to complete the installation.

2. Creating your own custom notification

In the following, you'll need to create your own notification class like the one below:

3. Creating your own custom notifiable

Also, you should create notifiable class. For this example, as you can see below, the Telegram channel ID should be returned:

4. Register your custom notification in the config file

Finally, you should register notification and notifiable classes and add the telegram channel id:

Testing

Run the tests with:

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of stethoscope with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
guzzlehttp/guzzle Version ^7.5
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package mohsenabrishami/stethoscope contains the following files

Loading the files please wait ....