Send status events to flapjack from python.
Project description
# pyflapjackevents
pyflapjackevents is a small library that serializes [Flapjack](flapjack|http://flapjack.io/) events as described in it's own [Data structures](http://flapjack.io/docs/1.0/development/DATA_STRUCTURES/). It's main intention is to allow sending monitor events to flapjack from python programs.
An example:
```
server = redis.Redis(host='localhost', port='6380')
sink = FlapjackEventSink(server, 'events')
event = FlapjackEvent(
'test-entity',
'test-check',
FlapjackEvent.EVENT_SERVICE,
FlapjackEvent.STATE_OK,
summary = 'test-summary',
details = 'test-details',
)
sink.send(event)
```
This would serialize the event and send it to the appropriate Redis channel for flapjack consumption.
## Installation
Just do:
```
pip install pyflapjackevents
```
or installing it from source:
```
git clone https://github.com/tuenti/pyflapjackevents.git
cd pyflapjackevents
python setup.py install
```
## Requirements
There're no special requirements for this library.
## Credits & Contact
pyflapjackevents was created by Tuenti Technologies S.L.. You can follow Tuenti engineering team on Twitter @tuentieng.
## License
pyflapjackevents is available under the Apache License, Version 2.0. See LICENSE file for more info.
pyflapjackevents is a small library that serializes [Flapjack](flapjack|http://flapjack.io/) events as described in it's own [Data structures](http://flapjack.io/docs/1.0/development/DATA_STRUCTURES/). It's main intention is to allow sending monitor events to flapjack from python programs.
An example:
```
server = redis.Redis(host='localhost', port='6380')
sink = FlapjackEventSink(server, 'events')
event = FlapjackEvent(
'test-entity',
'test-check',
FlapjackEvent.EVENT_SERVICE,
FlapjackEvent.STATE_OK,
summary = 'test-summary',
details = 'test-details',
)
sink.send(event)
```
This would serialize the event and send it to the appropriate Redis channel for flapjack consumption.
## Installation
Just do:
```
pip install pyflapjackevents
```
or installing it from source:
```
git clone https://github.com/tuenti/pyflapjackevents.git
cd pyflapjackevents
python setup.py install
```
## Requirements
There're no special requirements for this library.
## Credits & Contact
pyflapjackevents was created by Tuenti Technologies S.L.. You can follow Tuenti engineering team on Twitter @tuentieng.
## License
pyflapjackevents is available under the Apache License, Version 2.0. See LICENSE file for more info.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for pyflapjackevents-0.1dev-r0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | de3371a2ab39df364525f2d09de1db262f40909208a1b5f9008301fb6b545a50 |
|
MD5 | 444292f3851d0f8f55d4645aa1bf1220 |
|
BLAKE2b-256 | d6ad4efd3bc93c80e49c825050ae43ab27d2f2ef773d7b128a40ba02da5dbdf2 |