supervisor-alert
Are you using Supervisor to manage processes on a server? With supervisor-alert you can receive messages when the state of your processes change. Be the first to know when your services die!
With the default configuration supervisor-alert sends messages over Telegram. For this to work you need to install telegram-send system-wide first. You can also use any shell command to send the notifications.
Installation
Install supervisor-alert on your system:
sudo pip install supervisor-alert
Then run:
sudo supervisor-alert --configure
for the default configuration. This will send notifications over Telegram. Read the next section to customize or if you dislike automatic configurations.
Manual Configuration
Create the file /etc/supervisor/conf.d/supervisor_alert.conf as root:
[eventlistener:supervisor_alert]
command=supervisor-alert --telegram
events=PROCESS_STATE_RUNNING,PROCESS_STATE_EXITED,PROCESS_STATE_FATAL
autostart=true
autorestart=true
user=supervisor_alert
This will send the notifications over Telegram, to use something else, for example ntfy, pass in the command:
command=supervisor-alert -c 'ntfy send'
This configuration will run the event listener as the user supervisor_alert. It is a good practice to isolate services by running them as separate users (and avoiding running them as root). Add the user with:
sudo adduser supervisor_alert --system --no-create-home
Optionally, you can also subscribe to different supervisor events, look at the docs to see on which ones you’d like to be notified.
Finally, load the config and start the event listener:
sudo supervisorctl reread
sudo supervisorctl update
You should now receive your first alert, notifying you that supervisor_alert has started running.
Release files for supervisor-alert 0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| supervisor-alert-0.4.tar.gz | 3.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| supervisor_alert-0.4-py2-none-any.whl | Python 2 | none | any | Details |
Total release size: 10.1 kB
Release files / supervisor-alert-0.4.tar.gz
| Download URL | supervisor-alert-0.4.tar.gz |
|---|---|
| Size | 3.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3da38bb1d0df98f91327b8a67997aa9430cabe926a28a5b8453c3822cc22fd64
|
|
BLAKE2b-256 checksum How to use checksums |
1bb685ba6a5764eddfc64b2db8d081820bcbe86ebd7fdc656108a903f3d0673e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / supervisor_alert-0.4-py2-none-any.whl
| Download URL | supervisor_alert-0.4-py2-none-any.whl |
|---|---|
| Size | 6.4 kB |
| Tags | Python 2 |
|
SHA-256 checksum How to use checksums |
f7787371a97dfb806746b07a5832186255052a6949917537ba70ae1677903273
|
|
BLAKE2b-256 checksum How to use checksums |
544ea868b6e65d43ccc7c7264df86b8253e68b0a392bf951884b604a567aced2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |