Download the PHP package nagy/health-check without Composer

On this page you can find all versions of the php package nagy/health-check. 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 health-check

health-checker

Monitor your laravel server and application health and get notified immediately.

Features

Install

publish config files and resources

Dashboard

http://localhost/health-check/dashboard

screen shot 2018-09-22 at 15 52 53

APIs

get all checkers: http://localhost/health-check/checkers response:

get all check results http://localhost/health-check response:

get specific checker result http://localhost/health-check/checker-name response:

Artisan Command

screen shot 2018-09-22 at 15 55 16

Schedule

Package will run peridcally in the background to check you application and server health. the frequency is being set based on the laravel frequency options

Notifications

First the package is enabled by checking notifications => [ 'enabled' => true] in the configuration file, then check if the result type is exists on notifications => 'notify_on' The current suporrted notification channels is MailChannel, you can add your custom channel by creating a class with a notify method. The notify method accepts a collection of results.

Checkers

The package shipped with two global checkers

ProcessCount

used to check the count of running process, for exampl, you need to check that at least a 10 workers are ruuning, then add a new elemet to the checkers in the configuration file

Note The package consider the checker key as the checker name, so it's highly recommend to name avoid the spaces in the checker name.

Expression

Expression checker evalutes a Specfic expression, the evalution should be true to consider the it as healthy.

ServerAvailability

Check if the provided host is accessable via a specific port (port is optional, default is 80)

Custom Checkers

in case you need to build your own checkers then all you need to do is creating a class that extends from AbstractBaseChecker and implements HealthCheckInterface. then you have to implement methods check, isHealthy and getMessage


class CustomChecker extends AbstractBaseChecker implements HealthCheckInterface
{
    public function check(): Result
    {
        if ($this->isHealthy()) {
            return $this->makeHealthyResult();
        } else {
            return $this->makeUnHealthyResult();
            // return $this->makeUnHealthyResult(Result::WARNING_STATUS);
        }
    }

    public function isHealthy(): bool
    {
        return true;
    }

    public function getMessage(): string
    {
        // return your message to be attached in case of unhealthy result
    }
}

All versions of health-check with dependencies

PHP Build Version
Package Version
Requires php Version >7.1
illuminate/support Version ^5.5
orchestra/testbench Version ^3.7
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 nagy/health-check contains the following files

Loading the files please wait ....