shakvoort/lumen-health

A Lumen extension for providing API health endpoints

v0.21.5 2019-04-08 13:01 UTC

This package is auto-updated.

Last update: 2021-09-08 19:25:34 UTC


README

Lumen health API

A Lumen extension which adds health metrics on the /api/v1/health endpoint.

Currently the following metrics are available:

  • appKeyStatus: true if the app key is set and at least 32 characters long
  • storageWriteable: true if the storage folder and all its subfolders are writeable
  • debugMode: true if debug mode is on
  • databaseStatus: an object providing database metrics for each database defined in the connections config.
  • migrationsUpToDate: true if all migrations have been executed on the database
  • size: a string in the format x.xxMB specifying the used size of the database
  • online: true if a connection can be established to the database

Installation

Install the plugin using the following command

composer require shakvoort/lumen-health

After the installation make sure to uncomment the following line in your bootstrap/app.php: $app->withFacades();

Also make sure to register the service provider:

$app->register(\shakvoort\LumenHealth\LumenHealthServiceProvider::class);