Skip to content

A Python library to emit Sensu events that the Yelp Sensu Handlers can understand for Self-Service Sensu Monitoring

License

Notifications You must be signed in to change notification settings

Yelp/pysensu-yelp

Repository files navigation

pysensu-yelp

Build Status Latest PyPI version

pysensu-yelp is a python library designed for interacting with the custom Yelp sensu-handlers.

This allows developers to get notified in the method of their choice, on arbitrary events that might happen in their code.

Only a very specific type of situation calls for this kind of monitoring, it does not replace general active checks against webservers and stuff.

See the docs for more information about the use-cases for this and examples on how to use it.

Installation

TODO

Usage

If you need to send an event, use pysensu_yelp.send_event:

import pysensu_yelp

result_dict = {
    'check_name': 'my_cool_code',
    'runbook': 'http://lmgtfy.com/?q=my_cool_code',
    'status': 1,
    'output': 'CRITICAL: My code broke! Check the logs!',
    'team': 'backend',
    'tip': 'This happens sometimes when you frobulate the flux restraint cannon',
    'page': True,
    'notification_email': None,
    'irc_channels': None,
    'slack_channels': None,
    'alert_after': '5m',
    'check_every': '1m',
    'realert_every': -1,
    'ttl': None
}
pysensu_yelp.send_event(**result_dict)

More Docs!

Documentation Status

Full autogen docs are on ReadTheDocs.

License

Apache 2.

Contributing

Open an issue or fork and open a Pull Request

Please do not attempt to use pysensu-yelp without Yelp's sensu_handlers unless you intend to write your own custom handlers.

About

A Python library to emit Sensu events that the Yelp Sensu Handlers can understand for Self-Service Sensu Monitoring

Resources

License

Stars

Watchers

Forks

Packages

No packages published