# 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
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.2.tar.gz
(4.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file superhooks-0.2.tar.gz.
File metadata
- Download URL: superhooks-0.2.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 |
6ee52b733de6e49415e3a285230ffa78ec4a1b9e88b70e7fd19ff353ff1f09ba
|
|
| MD5 |
f759b553a590d1808a1a16d31716b518
|
|
| BLAKE2b-256 |
5ff86cc34ccf634867117d24b0cbac8c13f951332d56eca2f44384bc09a3486d
|
File details
Details for the file superhooks-0.2-py3-none-any.whl.
File metadata
- Download URL: superhooks-0.2-py3-none-any.whl
- Upload date:
- Size: 7.5 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 |
7bad8ab10fe498adac19d4c938f44d8791c79f83a9f12ad411418a962ca75736
|
|
| MD5 |
c984d51390e8e6ba9b8e1a43af9c35a6
|
|
| BLAKE2b-256 |
5d2a143ea13236c06dc1e91e105a7baac1e38526a2c2ea45f30399b12facc201
|