Giter Club home page Giter Club logo

laravel-health-check's Introduction

Health Check for Laravel

Installation in a Laravel project

  1. Edit the Laravel project's composer.json repositories section:
    "repositories": [
        {
            "type": "git",
            "url": "[email protected]:ambientiaoy/laravel-health-check.git"
        }
    ],
  1. Run composer require ambientia/health-check in the app root

Installation for development in a Laravel project

  1. Clone this repository outside of your Laravel project directory
  2. Edit the Laravel project's composer.json repositories section:
    "repositories": [
        {
            "type": "path",
            "url": "../health-check",
            "options": {
                "symlink": true
            }
        }
    ],
  1. Run composer update in the app root

Now you have a symlink in vendor/ambientia/health-check that points to the original directory that you cloned in step 1.

Using the health checks

You can set your monitoring system to ping the liveness and readiness URLs to get alerted if there are any problems.
In Kubernetes and OpenShift you can use the probes also for container health checks.

Liveness Probes

There are dedicated liveness probes for different services.
They will response with http 200 status code if the service is up and functions without problems.
Https status 503 is returned if the service is not available.

  • Backend service: {APP_URL}/health-check/liveness/backend
  • Database service: {APP_URL}/health-check/liveness/database
  • Schedule service: {APP_URL}/health-check/liveness/schedule
  • Queue service: {APP_URL}/health-check/liveness/queue

Readiness Probe

Readiness probe is identical for all services: {APP_URL}/health-check/readiness
It will response with http 200 status code if the service is ready to take http requests.

laravel-health-check's People

Contributors

nidhalkratos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.