Download the PHP package okipa/laravel-supervisor-downtime-notifier without Composer
On this page you can find all versions of the php package okipa/laravel-supervisor-downtime-notifier. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download okipa/laravel-supervisor-downtime-notifier
More information about okipa/laravel-supervisor-downtime-notifier
Files in okipa/laravel-supervisor-downtime-notifier
Package laravel-supervisor-downtime-notifier
Short Description Get notified when supervisor is down.
License MIT
Homepage https://github.com/Okipa/laravel-supervisor-downtime-notifier
Informations about the package laravel-supervisor-downtime-notifier
Get notified and execute PHP callback when:
- The supervisor service is not running on your server
- Your environment supervisor processes are down
Notifications can be sent by mail, Slack and webhooks (chats often provide a webhook API).
Found this package helpful? Please consider supporting my work!
Compatibility
Laravel version | PHP version | Package version |
---|---|---|
^9.0 | ^10.0 | 8.1. | 8.2. | ^2.4 |
^8.0 | ^9.0 | ^8.1 | ^8.2 | ^2.3 |
^8.0 | ^9.0 | ^8.0 | ^8.1 | ^2.2 |
^7.0 | ^8.0 | ^7.4 | ^8.0 | ^2.1 |
^7.0 | ^8.0 | ^7.4 | ^2.0 |
^6.0 | ^7.0 | ^7.4 | ^1.0 |
Upgrade guide
- From v1 to V2
Table of Contents
- Requirements
- Installation
- Configuration
- Translations
- Usage
- Testing
- Changelog
- Contributing
- Credits
- Licence
Requirements
By default, this package monitors supervisor downtime for projects running on Linux servers.
The user running PHP CLI will execute the following commands:
systemctl is-active supervisor
supervisorctl status "<your-process-name>"
As so, make sure you give him permission to execute these actions (sudo visudo -f /etc/sudoers.d/<user>
):
<user> ALL=NOPASSWD:/bin/systemctl is-active supervisor
<user> ALL=NOPASSWD:/usr/bin/supervisorctl status *
That being said, you still can use this package for other servers OS by using your own SupervisorChecker
class and defining OS-specific commands.
Installation
Install the package with composer:
If you intend to send Slack
notifications you will have to install:
If you intend to send webhook
notifications you will have to install:
Configuration
Publish the package configuration:
Translations
All words and sentences used in this package are translatable.
See how to translate them on the Laravel official documentation: https://laravel.com/docs/localization#using-translation-strings-as-keys.
Here is the list of the words and sentences available for translation by default:
Usage
Just add this command in the schedule()
method of your \App\Console\Kernel
class:
And you will be notified if your supervisor service is not running, or if your environment supervisor processes are down when the command will be executed.
Once everything has been set up, you can check if the configuration is correct by simulating supervisor processes downtime:
Testing
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Credits
- Arthur LORENT
- All Contributors
License
The MIT License (MIT). Please see License File for more information.