PHPackages                             pbmedia/laravel-api-health - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Logging &amp; Monitoring](/categories/logging)
4. /
5. pbmedia/laravel-api-health

AbandonedArchivedLibrary[Logging &amp; Monitoring](/categories/logging)

pbmedia/laravel-api-health
==========================

Monitor first and third party services and get notified when something goed wrong!

5.4.0(3y ago)873.6k8[1 PRs](https://github.com/protonemedia/laravel-api-health/pulls)MITPHPPHP ^8.0 || ^8.1 || ^8.2

Since Jul 30Pushed 2y ago3 watchersCompare

[ Source](https://github.com/protonemedia/laravel-api-health)[ Packagist](https://packagist.org/packages/pbmedia/laravel-api-health)[ Docs](https://github.com/protonemedia/laravel-api-health)[ GitHub Sponsors](https://github.com/pascalbaljet)[ RSS](/packages/pbmedia-laravel-api-health/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (13)Versions (26)Used By (0)

> ⚠️ This package is unmaintained. Consider using [Oh Dear](https://ohdear.app/?via=pascal).

Laravel API Health
==================

[](#laravel-api-health)

[![Latest Version on Packagist](https://camo.githubusercontent.com/fd62a7814022afdbc3ed8ea619fc52b8e2ca39c2453b6a023224c5a81f7541cb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f70626d656469612f6c61726176656c2d6170692d6865616c74682e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/pbmedia/laravel-api-health)[![Build Status](https://camo.githubusercontent.com/7b80324e1c17916c989911670f898b56f7523b853e82999ec0844f70704ac2e8/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f70726f746f6e656d656469612f6c61726176656c2d6170692d6865616c74682f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/protonemedia/laravel-api-health)[![Quality Score](https://camo.githubusercontent.com/eafdd73a553129c39cd3b0ec13f9d83b4ee3a32f025d98697ad9a28c1a32b19f/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f70726f746f6e656d656469612f6c61726176656c2d6170692d6865616c74682e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/protonemedia/laravel-api-health)[![Total Downloads](https://camo.githubusercontent.com/52657cd8417600cb66775e418fda7adcd22545d857393f638201c6867226ec0d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f70626d656469612f6c61726176656c2d6170692d6865616c74682e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/pbmedia/laravel-api-health)

This is a package to monitor first and third party services that your app uses. It can send a notification if a service goes down (or up!) and supports scheduling. You can create *checkers* for whatever API or service you want to monitor but it also comes with some built-in checkers so you can fire up some checkers really quickly.

Sponsor this package
--------------------

[](#sponsor-this-package)

We proudly support the community by developing Laravel packages and giving them away for free. Keeping track of issues and pull requests takes time, but we're happy to help! If this package saves you time or if you're relying on it professionally, please consider [supporting the maintenance and development](https://github.com/sponsors/pascalbaljet).

Requirements
------------

[](#requirements)

- Laravel 8.0 and 9.0 supported.
- PHP 7.4 or higher required.
- Support for [Package Discovery](https://laravel.com/docs/6.0/packages#package-discovery).

Features
--------

[](#features)

- Built-in HTTP and Ssl Certificate checkers
- You can build your own checkers
- It can schedule checkers
- Automatic retries of failed checkers
- Sends notifications about failed checkers
- Sends notifications when a failed checker recovers
- Caches the status of checkers
- You can fetch the status of checkers in your code
- It can print the status of the checkers in the console
- Customize notifications per checker (optionally)
- Ability to fake the ApiHealth facade to test your app

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require pbmedia/laravel-api-health
```

If you're still using Laravel 5.6, please use version 1.2, for Laravel 5.7 use version 2.0, for Laravel 5.8 use version 3.0. Older versions are not maintained anymore.

Publish the translation resources and config file using the Artisan CLI tool.

```
php artisan vendor:publish --provider="ProtoneMedia\ApiHealth\ApiHealthServiceProvider"
```

Upgrading to v5
---------------

[](#upgrading-to-v5)

- The namespace has changed to `ProtoneMedia\ApiHealth`. Please update your code accordingly.

Build your first checker
------------------------

[](#build-your-first-checker)

So let's create our first checker. Assume you want to request an URL and verify that the status code of the response is in the 200 range. You can build this checker on your own using the `make:checker` command, but this one we've pre-built for you. Open up the terminal and let's make a HTTP checker!

```
php artisan make:http-checker LaravelDocumentationChecker
```

In your `app` folder you'll find a new `Checkers` folder with the newly created checker. The only thing you have to do is adjust the `$url` property to your needs:

```
