superhooks plugin for supervisord
Project description
# Superhooks
Superhooks is a supervisor "event listener" that sends events from processes that run under [supervisor](http://supervisord.org) to predefined web hooks. When `superhooks` receives an event, it sends a message notification to a configured URL.
`superhooks` uses [requests](https://2.python-requests.org/en/master/#) full-featured Python http requests library.
## Installation
```
pip install superhooks
```
## Command-Line Syntax
```bash
$ superhooks -u http://localhost:8090/ -e STARTING,RUNNING,BACKOFF,STOPPING,FATAL,EXITED,STOPPED,UNKNOWN -d a:b::c:d -H p:q::r:s
```
### Options
```-u URL, --url=http://localhost:8090/```
Post the payload to the url with http `POST`
```-d DATA, --data=a:b::c:d``` post body data as key value pair items are separated by `::` and key and values are separated by `:`
```-H HEADERS, --headers=p:q::r:s``` request headers with as key value pair items are separated by `::` and key and values are separated by `:`
```-e EVENTS, --event=EVENTS```
The Supervisor Process State event(s) to listen for. It can be any, one of, or all of
STARTING, RUNNING, BACKOFF, STOPPING, EXITED, STOPPED, UNKNOWN.
## Configuration
An `[eventlistener:x]` section must be placed in `supervisord.conf` in order for `superhooks` to do its work. See the “Events” chapter in the Supervisor manual for more information about event listeners.
The following example assume that `superhooks` is on your system `PATH`.
```
[eventlistener:superhooks]
command=python /usr/local/bin/superhooks -u http://localhost:8090/ -e BACKOFF,FATAL,EXITED,UNKNOWN -d a:b::c:d -H p:q::r:s
events=PROCESS_STATE,TICK_60
```
### Notes
* All the events will be buffered for 1 min and pushed to web hooks.
0.2 (2019-05-11)
----------------
- Fixed Readme
0.1 (2019-05-11)
----------------
- Initial release
Superhooks is a supervisor "event listener" that sends events from processes that run under [supervisor](http://supervisord.org) to predefined web hooks. When `superhooks` receives an event, it sends a message notification to a configured URL.
`superhooks` uses [requests](https://2.python-requests.org/en/master/#) full-featured Python http requests library.
## Installation
```
pip install superhooks
```
## Command-Line Syntax
```bash
$ superhooks -u http://localhost:8090/ -e STARTING,RUNNING,BACKOFF,STOPPING,FATAL,EXITED,STOPPED,UNKNOWN -d a:b::c:d -H p:q::r:s
```
### Options
```-u URL, --url=http://localhost:8090/```
Post the payload to the url with http `POST`
```-d DATA, --data=a:b::c:d``` post body data as key value pair items are separated by `::` and key and values are separated by `:`
```-H HEADERS, --headers=p:q::r:s``` request headers with as key value pair items are separated by `::` and key and values are separated by `:`
```-e EVENTS, --event=EVENTS```
The Supervisor Process State event(s) to listen for. It can be any, one of, or all of
STARTING, RUNNING, BACKOFF, STOPPING, EXITED, STOPPED, UNKNOWN.
## Configuration
An `[eventlistener:x]` section must be placed in `supervisord.conf` in order for `superhooks` to do its work. See the “Events” chapter in the Supervisor manual for more information about event listeners.
The following example assume that `superhooks` is on your system `PATH`.
```
[eventlistener:superhooks]
command=python /usr/local/bin/superhooks -u http://localhost:8090/ -e BACKOFF,FATAL,EXITED,UNKNOWN -d a:b::c:d -H p:q::r:s
events=PROCESS_STATE,TICK_60
```
### Notes
* All the events will be buffered for 1 min and pushed to web hooks.
0.2 (2019-05-11)
----------------
- Fixed Readme
0.1 (2019-05-11)
----------------
- Initial release
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
superhooks-0.3.tar.gz
(4.8 kB
view details)
Built Distributions
File details
Details for the file superhooks-0.3.tar.gz
.
File metadata
- Download URL: superhooks-0.3.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
028f7d3383c060b16e8fbba7f40533181f7baedf72c1b0938da83c883a6b730b
|
|
MD5 |
454d9b786cc12cd7f4290ab012ffee3a
|
|
BLAKE2b-256 |
f4df4b43116f166af78a40c0467b767bccae5cc126fa6e834695c231173713fb
|
File details
Details for the file superhooks-0.3-py3-none-any.whl
.
File metadata
- Download URL: superhooks-0.3-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
bd03a14ec2d282023a72e51063db4fac226c6371b8ae39aa03b529b37e1e3eb1
|
|
MD5 |
0f9671ce54c45d372496f73b326e3439
|
|
BLAKE2b-256 |
766fe4660fdcb36dbbb90b73c054aadb25c09b620b49baa28927fc484a00c4d4
|
File details
Details for the file superhooks-0.3-py2-none-any.whl
.
File metadata
- Download URL: superhooks-0.3-py2-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
36b4246fd5700b052ee35143220933c05cea663fa4803543e6c8d4f0015fc11a
|
|
MD5 |
7afa91e1a04619060c4fdeac550c31ed
|
|
BLAKE2b-256 |
63c7a6c6ca2249c9f97e36e97dd83e4c9abc801adcd82c7f4177ac3e00f99363
|