Introducing a new Laravel package: API Health

Pascal Baljet, 30 Jul 2018


Today we are releasing a new Laravel package! It's a toolbox for monitoring first and third-party services and APIs, it keeps you notified about services going down (and up!). Out of the box it supports checking HTTP endpoints and verifying SSL certificates and the package allows you to generate your own checkers as well.

For sending notifications it uses Laravel's excellent built-in Notifications component. We've made it really easy to send notifications to Slack and mail but of course you can use every notification channel that Laravel supports. It dispatches events whenever the status of checker changes so you can write listeners and hook into these changes.

It has an Artisan CLI interface to see the status of all your checkers. In addition to that, there are dedicated method so you can fetch the status of a checker in your code as well. Best of all, it has a scheduling feature. You can configure each checker individually within your code so you don't have to worry about managing cron entries. We've built this feature upon Laravel's Task Scheduling options. Furthermore, there is an automatic retry feature and helpers for writings tests.

The GitHub repository contains full documentation of the package. It shows you how to use the built-in checkers, create your own checkers and configure the notification and scheduling options. It supports Laravel 5.6 and requires PHP 7.1 or higher. We're planning to add some additional checkers out of the box, so if you want to stay updated you can follow me on Twitter (@pascalbaljet)!