adata-team/healthchecker

Package for check some services to health

v2.2.0 2024-09-30 14:44 UTC

README

PHP Latest version Stars Downloads Contributors Release

Quick start for Lumen/Laravel application

1. Install via composer:

composer require adata-team/healthchecker

2. Make configuration file in config/health.php with content

<?php

return [
    'router' => [
        'group_prefix' => 'health',
        'check_prefix' => 'check',
        'check_name'   => 'healthCheck',
        'url'          => '/health/check',
    ],
];

The above code is the minimum to run this plugin.

group_prefix - the name of the route group, for health
check_prefix - health route prefix
check_name   - route name
url          - url where healthcheck will be available

See full documentation in Examples folder

3. Register service provider in Lumen bootstrap/app.php

$app->register(Adata\HealthChecker\HealthCheckerProvider::class);

and register configuration file

$app->configure('health');

Parameters in configuration file

Configuration services to check

RabbitMQ configuration params

  • type = rabbitmq

Redis configuration params

  • type = redis

Database configuration params

  • type = database

HealthCheck configuration params

  • type = healthCheck

HTTP configuration params

  • type = http

ElasticSearch configuration params

  • type = elastic

FileServer configuration params

  • type = fileServer

Arango configuration params

  • type = arango