Download the PHP package amazeeio/healthz-php without Composer

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

Healthz PHP

This is a simple PHP app used to determine the overall health of a site hosted on Lagoon.

As it stands, it relies on Lagoon conventions to determine which services are available and then checks if the services are up.

Configuration

This script should reside in a directory separate from the application that is being hosted. For instance, the convention is that a webapp is stored in /app - you could store Healthz-php in /healthz.

Adding this to your nginx configuration will reroute all incoming traffic on /healthz to our current script.

Setting failure response code

By default, we return an http 500 response code for any failed checks. This can be a potential problem for setups that involve negative caching of errors.

If you would like to have the system return something other than a 500, you can set the environment variable HEALTHZ_PHP_HTTP_FAIL_CODE with the return code.

Extending checks

Checks can be created by implementing AmazeeIO\Health\Check\CheckInterface which principally does two things.

First, it checks whether the check is actually applicable in the present environment. For example, to know whether it should be checking the status of the Solr service, the CheckSolr class will first check whether the environment variable SOLR_PORT is available. If the CheckInterface::appliesInEnvironment call to any particular check returns true that check will be registered to run.

Second, all applicable checks are required to return both a result and a status. The status returns one of STATUS_PASS STATUS_FAIL and STATUS_WARN - These three statuses really determine the health of the service under test. They're used to determine health of the overall system.

The status of the check as a whole is determined by the most negative applicable check's result. That is, if any one of the checks return a STATUS_FAIL, the entire check is considered to have failed. If any one check returns a STATUS_WARN, the entire system check is considered to be in a warning state.

When you have created your checks you register them in the checks.conf.php file.


All versions of healthz-php with dependencies

PHP Build Version
Package Version
Requires predis/predis Version ^1.0
guzzlehttp/psr7 Version ^1.0
solarium/solarium Version ^5.2
nyholm/psr7 Version ^1.3
nyholm/psr7-server Version ^1.0
zendframework/zend-httphandlerrunner Version ^1.0
tightenco/collect Version ^7.0
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 amazeeio/healthz-php contains the following files

Loading the files please wait ....